Next revision | Previous revision |
software:arcgis:mills [2017-10-23 16:19] – created sraskar | software:arcgis:mills [2021-04-27 16:21] (current) – external edit 127.0.0.1 |
---|
====== ArcGIS on Mills ====== | ====== ArcGIS on Mills ====== |
| |
===== ArcGIS shell installation example ===== | ===== Batch job ===== |
| |
| In order to use the [[:software:arcgis:arcgis#install-arcgis-shell|ArcGIS shell]] it needs to be installed in your account. For account ''traine'' in workgroup ''it_css'', the ArcGIS shell was installed in ''$WORKDIR/traine/arcgis-10.1-shell''. |
| A python script is used to execute the GIS tasks like the ''arc-test.py'' below. This example refers to the full path of the input file as ''/lustre/work/it_css/ArcGIS'' and the output file as ''/lustre/work/it_css/traine/ArcGIS''. |
| |
| <code - arc-test.py> |
| # This example code produces a 100 Meter buffer of a point located in the center of Newark, DE |
| import arcpy |
| arcpy.Buffer_analysis("z:\\lustre\\work\\it_css\\ArcGIS\\nwkcntr.shp","z:\\lustre\\work\\it_css\\traine\\ArcGIS\\nwkcntr_Buffer","100 Meters","FULL","ROUND","NONE","#") |
| </code> |
| |
| You will also need a queue submission file to run your GIS tasks which will be based on the ''serial.qs'' template in ''/opt/shared/templates/gridengine''. The example below is a modified version called ''arc-submit.qs'' for the account ''traine'' in workgroup ''it_css'' using the installed ArcGIS shell in ''/archive/it_css/traine/arcgis-10.1-shell''. |
| |
| <code - arc-submit.qs> |
| # Setup the environment; add vpkg_require commands after this |
| # line: |
| |
| # Now append all of your shell commands necessary to run your program |
| # after this line: |
| |
| $WORKDIR/traine/arcgis-10.1-shell arc-test.py |
| </code> |
| |
| |
| Create a directory ''<//ArcGIS_projects//>'' to store your ''.py'' and ''.qs'' file. This is also the directory you most likely will want to reference for your input and output files. For account ''traine'' in workgroup ''it_css'' we will use ''$WORKDIR/traine/ArcGIS''. Now we can submit our batch run by using |
| |
| <code bash> |
| [traine@mills ArcGIS]$ workgroup -g it_css |
| [(it_css:traine)@mills ArcGIS]$ qsub arc-submit.qs |
| </code> |
| |
| ===== Interactive job ===== |
| |
| All interactive jobs should be run on a compute node by setting your ''workgroup'' and using ''qlogin''. For account ''traine'' in workgroup ''it_css'', the ArcGIS shell was installed in ''$WORKDIR/traine/arcgis-10.1-shell''. The same python script, [[http://docs.hpc.udel.edu/_export/code/clusters/mills/arcgis?codeblock=1|arc-test.py]], used for the [[:software:arcgis:mills#batch-job|batch job]] can be used for an interactive job. |
| |
| Although there is no GUI with the ArcGIS shell, if it detects that your SSH connection is configured to enable X11-forwarding you will get an [[:software:arcgis:arcgis#troubleshooting | error]] unless you run an X-Windows server (e.g. Xming) or ''unset DISPLAY'' before running the ArcGIS shell. |
| ==== Running X-Windows and DISPLAY set properly ==== |
| |
| The example below shows an ArcGIS interactive job with an X-Windows server running. |
| <code bash> |
| [traine@mills ArcGIS]$ workgroup -g it_css |
| [(it_css:traine)@mills ArcGIS]$ qlogin |
| Your job 357451 ("QLOGIN") has been submitted |
| waiting for interactive job to be scheduled ... |
| Your interactive job 357451 has been successfully scheduled. |
| Establishing /opt/shared/OpenGridScheduler/local/qlogin_ssh session to host n016 ... |
| [traine@n016 ArcGIS]$ $WORKDIR/traine/arcgis-10.1-shell |
| Adding package `x11/RHEL6.1` to your environment |
| Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32 |
| Type "help", "copyright", "credits" or "license" for more information. |
| >>> execfile("arc-test.py") |
| >>> quit() |
| [traine@n016 ArcGIS]$ |
| </code> |
| |
| |
| ===== ArcGIS Shell Installation Example ===== |
| |
The following example shows the install steps of the ArcGIS shell on the Mills cluster for account ''traine'' in the install directory ''$WORKDIR/traine''. Remember each user must install the ArcGIS shell for their own account. Once the install is complete, the ArcGIS shell (''$WORKDIR/traine/arcgis-10.1-shell'') will only work for the account ''traine'' on Mills. | The following example shows the install steps of the ArcGIS shell on the Mills cluster for account ''traine'' in the install directory ''$WORKDIR/traine''. Remember each user must install the ArcGIS shell for their own account. Once the install is complete, the ArcGIS shell (''$WORKDIR/traine/arcgis-10.1-shell'') will only work for the account ''traine'' on Mills. |