Table of Contents

Using ArcGIS on Farber

Batch job

In order to use the 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.

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","#")

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.

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

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

[traine@farber ArcGIS]$ workgroup -g it_css
[(it_css:traine)@farber ArcGIS]$ qsub arc-submit.qs

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, arc-test.py, used for the 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 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.

[traine@farber ArcGIS]$ workgroup -g it_css
[(it_css:traine)@farber 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]$

ArcGIS shell installation example

The following example shows the install steps of the ArcGIS shell on the Farber 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 Farber.

[traine@farber ~]$ workgroup -g it_css
[(it_css:traine)@farber ~]$ qlogin
Your job 357310 ("QLOGIN") has been submitted
waiting for interactive job to be scheduled ...
Your interactive job 357310 has been successfully scheduled.
Establishing /opt/shared/univa/local/qlogin_ssh session to host n038                               ...
[traine@n038 ~]$  /opt/shared/arcgis/bin/install-arcgis-10.1 $WORKDIR/traine
Adding package `openjdk/1.7.0` to your environment
[ArcGIS 10.1 for Server Installation Details]
UI Mode..................silent
Agreed to Esri License...yes
Authorization File......./opt/shared/arcgis/data/10.1/ArcGISforServerAdvancedEnterprise_server_194954.prvc
Installation Directory.../home/work/it_css/traine/arcgis/server
 
Starting installation of ArcGIS 10.1 for Server...
...ArcGIS 10.1 for Server installation is complete.
 
You will be able to access ArcGIS Server Manager by navigating to http://n038:6080/arcgis/manager.
 
Killing 4 process(es) started by the installer...
 
Patching the init_Xvfb.sh script...
 
Adding ArcGIS shell startup script.  You can run the Python shell with the command
 
  /home/work/it_css/traine/arcgis-10.1-shell
 
[traine@n038 ~]$  exit
exit
Connection to n038 closed.
/opt/shared/univa/local/qlogin_ssh exited with exit code 0
[(it_css:traine)@farber ~]$

Update ArcGIS shell License example

The following example shows updating the ArcGIS shell license on the Farber cluster for account traine in the install directory $WORKDIR/traine.

[(it_css:traine)@farber ~]$ $WORKDIR/traine/arcgis/server/tools/authorizeSoftware /opt/shared/arcgis/data/10.1/ArcGISforServerAdvancedEnterprise_server.prvc
--------------------------------------------------------------------------
Starting the ArcGIS Software Authorization Wizard
 
Run this script with --help for additional information.
--------------------------------------------------------------------------
Product          Ver   ECP#           Expires
-------------------------------------------------
arcsdeserver     101   ecp202688495   29-aug-2015
svrenterprise    101   ecp202688495   29-aug-2015
arcgisserver     101   ecp202688495   29-aug-2015
schematicssvr    101   ecp202688495   29-aug-2015
capacitysvr_4    101   ecp202688495   29-aug-2015
svradvanced      101   ecp202688495   29-aug-2015
3dserver         101   ecp354306806   29-aug-2015
spatialserver    101   ecp334244774   29-aug-2015
networkserver    101   ecp024156793   29-aug-2015
imageextserver   101   ecp375117235   29-aug-2015
interopserver    101   ecp633064094   29-aug-2015
geostatserver    101   ecp302546023   29-aug-2015
datareviewersvr  101   ecp096386809   29-aug-2015
geoeventsvr      101   ecp153720790   29-aug-2015
arcsdeserver     101   ecp202688495   29-aug-2015
svrenterprise    101   ecp202688495   29-aug-2015
arcgisserver     101   ecp202688495   29-aug-2015
schematicssvr    101   ecp202688495   29-aug-2015
capacitysvr_4    101   ecp202688495   29-aug-2015
svradvanced      101   ecp202688495   29-aug-2015
3dserver         101   ecp354306806   29-aug-2015
spatialserver    101   ecp334244774   29-aug-2015
networkserver    101   ecp024156793   29-aug-2015
imageextserver   101   ecp375117235   29-aug-2015
interopserver    101   ecp633064094   29-aug-2015
geostatserver    101   ecp302546023   29-aug-2015
datareviewersvr  101   ecp096386809   29-aug-2015
geoeventsvr      101   ecp153720790   29-aug-2015
arcsdeserver     101   ecp056057463   29-aug-2016
svrenterprise    101   ecp056057463   29-aug-2016
arcgisserver     101   ecp056057463   29-aug-2016
schematicssvr    101   ecp056057463   29-aug-2016
capacitysvr_4    101   ecp056057463   29-aug-2016
svradvanced      101   ecp056057463   29-aug-2016
3dserver         101   ecp014449115   29-aug-2016
spatialserver    101   ecp194669772   29-aug-2016
networkserver    101   ecp138127809   29-aug-2016
imageextserver   101   ecp187875580   29-aug-2016
interopserver    101   ecp702896384   29-aug-2016
jtxserver        101   ecp326582940   29-aug-2016
geostatserver    101   ecp060377653   29-aug-2016
businesssvr      101   ecp262072383   29-aug-2016
geoportalextsvr  101   ecp031201190   29-aug-2016
highwayssvr      101   ecp298838744   29-aug-2016