"Seegrid will be due for a migration to confluence on the 1st of August. Any update on or after the 1st of August will NOT be migrated"

Snark/Underworld Clients

These notes are for the current deployment and will be updated when clients change -- RyanFraser - 25 Jul 2006

Use the Clients on your machine which has been configured

Inital steps.

  1. Log into your submittion computer and open a command prompt
  2. Get/Refresh a Proxy Certificate -
    • (LINUX) grid-proxy-init
      OR
      (WINDOWS) grid-proxy-init.bat
              

    • Type in your certificate password when asked
  1. Set up the client environment
Run the following script file please, (LINUX) $GLOBUS_LOCATION/etc/globus-devel-env.sh (WINDOWS) Ignore this step

  1. Upload your input files. (LINUX) Use globus-url-copy program, (WINDOWS) use WinSCP program on your desktop, upload your input files to "ngdata.ivec.org". Please place files in a new input folder at the following location:

ngdata.ivec.org:/store/PROJECTCODE/USERID/

  1. Keep a record of where you uploaded the files, you'll need it as input to the clients
  2. Using the command prompt, go into the directory where the Client code is installed -
    (LINXU) cd $SNARK_CLIENT
    (WINDOWS) cd %SNARK_CLIENT%
         

  1. Run the Client code

Run a Job

Current host to run on: ng2.ivec.org

This script simply wraps up the java lines and makes sure your paths are correct to run the client.

Usage

You can get options for what is does from the command line
(LINUX) snark-client.sh help
(WINDOWS) snark-client.bat help
results in-
Options are kill|stdout|stderr|submit|getresults

(LINUX)
snark-client.sh submit  ~/run1.txt SITE Underworld /store/<project_id>/<userid>/inputs/ demo.xml /store/<project_id>/<userid>/outputs/ fra283 ryan.fraser@csiroNOSPAM.au
or
./snark-clients.sh submit ~/testryan.txt SITE Underworld /store/cg01/fra283/inputs/snark3/ sweep20060522_09_007_007_007 /store/cg01/fra283/outputs/ fra283 ryan.fraser@csiro.au
or
./snark-clients.sh submit c:\testryan.txt ivec Underworld /store/cg01/fra283/inputs/snark3/ \$INPUTDIR/mytestfile.py /store/cg01/fra283/outputs/ fra283 ryan.fraser@csiro.au


(WINDOWS)
snark-clients.bat submit c:\testryan.txt SITE Underworld /store/cg01/fra283/inputs/snark3/ sweep20060522_09_007_007_007 /store/cg01/fra283/outputs/ fra283 ryan.fraser@csiro.au
or
snark-clients.bat submit c:\testryan.txt SITE Underworld /store/cg01/fra283/inputs/snark3/ ^$INPUTDIR/mytestfile.py /store/cg01/fra283/outputs/ fra283 ryan.fraser@csiro.au

For a submittion it requires
  1. EPR: a text file where the job reference is written to.
  2. SITE refers to which site you would like to run this job at: please place either ivec, hpsc etc.
  3. name of the software - Underworld OR StG_FEM
  4. /store///inputs/: the directory of the input folder
  5. demo.xml: the name of the main input file or 1st argument for the software
  6. /store///outputs/: the directory of the output folder
  7. fra283: the username for the run/stage
  8. email address

All other operations now only need that EPR (endpoint reference).
./snark-client.sh (kill|stdout|stderr|results) ~/run1.txt

The script is picky with its errors and will tell you if you put too much information in for most calls.


ROUTINES THAT DETAIL SETUP of clients, build and USAGE --used to build VMs -- RyanFraser - 31 May 2006


To Install the Clients on a Client Machine from source - Gridftp version

Requirements

Software

Configuration You will require the following:
  • Valid APAC Grid certificate
  • contact help@ivec.org for accounts at IVEC (if you'd like to know more of what is required, see here HowToGetGridForUsers else if you don't care and like iVEC to sort it out, carry on!)

Installation

  • Check-out the java code from our SVN repository at: https://cgsrv1.arrc.csiro.au/subversion/apacgrid/trunk/SnarkGTService-clients/
  • the clients are precompiled, but if you need to compile them for your system: run (LINUX) "source $GLOBUS_LOCATION/etc/globus-devel-env.sh" and (WINDOWS) %GLOBUS_LOCATION%\etc\globus-devel-env.bat
  • compile clients: o (LINUX)javac -classpath $CLASSPATH:au_csiro_services_SimulationSnarkService.jar:au_csiro_services_SimulationSnarkService_stubs.jar:jargon_v1.4.16.jar au/csiro/clients/SimulationSnarkService/ClientAllAuto.java
    o (WINDOWS) javac -classpath %CLASSPATH%;au_csiro_services_SimulationSnarkService.jar;au_csiro_services_SimulationSnarkService_stubs.jar;jargon_v1.4.16.jar au\csiro\clients\SimulationSnarkService\ClientAllAuto.java o Do the same for the other clients - ClientAllGridFtp.java, ClientStatus.java, ClientStandardout.java, ClientResults.java and ClientKill.java. Note: to do this, you have to make sure you (as a client) have the appropriate rights!

  • set the following environment variables:
(LINUX):

export CLASPATH=$CLASSPATH:$GLOBUS_LOCATION/lib:
export LD_LIBRARY_PATH=$GLOBUS_LOCATION/lib
export JAVA_HOME=/usr/local/java
#GLOBUS_LOCATION where you installed the globus ws-core package
export GLOBUS_LOCATION=/usr/local/ws-core-4.0.1

export PATH=$GLOBUS_LOCATION/bin:$JAVA_HOME/bin:$PATH

export TRUSTED_CA=$HOME/.globus/certificates
export X509_CERT_DIR=$TRUSTED_CA
export X509_USER_CERT=$HOME/.globus/usercert.pem
export X509_USER_KEY=$HOME/.globus/userkey.pem

source $GLOBUS_LOCATION/etc/globus-devel-env.sh

ALSO add the location of the Globus, SRB and Java binaries to your path variable. For WINDOWS use: set VARIABLE=value and replace the "$" with "%"

Usage of Clients

Inital setup.

  1. On your initial use of the service or when you want to operate under a different project code: go to https://ngportal.ivec.org/auth/, log in and map your DN to a user name
  2. Log into your submittion computer
  3. Get/Refresh a Proxy Certificate -
    • grid-proxy-init
              
    • Type in your certificate password when asked
  4. Upload your input files.

Gridftp Please use the globus-url-copy client program and upload files to respective host, currently:
ngdata.ivec.org:/store/<PROJECT CODE>/<USERID>/

  1. Keep a record of where you uploaded the files, you'll need it as input to the clients
  2. Go into the directory where the Client code is installed -
    cd $SNARK_CLIENT
         

  1. Run the Client code

PLEASE NOTE: if running on Windows, replace $CLASSPATH with %CLASSPATH%

This script simply wraps up the java lines and makes sure your paths are correct to run the client.

Usage of wrapped batch or shell script (use in place of calling clients natively in java)

You can get options for what is does from the command line
(LINUX) snark-client.sh help
(WINDOWS) snark-client.bat help
results in-
Options are kill|stdout|stderr|submit|getresults

(LINUX)
snark-client.sh submit  ~/run1.txt python /store/<project_id>/<userid>/inputs/ demo.xml /store/<project_id>/<userid>/outputs/ fra283 ryan.fraser@csiroNOSPAM.au

OR
(WINDOWS)
snark-clients.bat submit c:\testryan.txt $INPUTDIR/EXE.PY /store/cg01/fra283/inputs/snark3/ sweep20060522_09_007_007_007 /store/cg01/fra283/outputs/ fra283 ryan.fraser@csiro.au

For a submittion it requires
  1. EPR: a text file where the job reference is written to.
  2. python or the script to run: name of the software, HOWEVER if staged in script is the exe - the exe please specify this here prefixed with "$INPUTDIR/YOUREXE.py" . ALSO NOTE ALL INPUT FILES ARE PLACED IN A INPUTS DIRECTORY AND THE PROGRAM WILL EXE IN AN OUTPUTS DIRECTORY SO TO REFERENCE FILES IN INPUTS GO - "$INPUTDIR/FILE"
  3. /store///inputs/: the directory of the input folder
  4. demo.xml: the name of the main input file or 1st argument for the software
  5. /store///outputs/: the directory of the output folder
  6. fra283: the username for the run/stage
  7. email address

All other operations now only need that EPR (endpoint reference).
./snark-client.sh (kill|stdout|stderr|getresults) ~/run1.txt

The script is picky with its errors and will tell you if you put too much information in for most calls.

Run a Job using java source

Current host to run on: ng2.ivec.org

SRB
java -classpath $CLASSPATH:au_csiro_services_SimulationSnarkService.jar:\
au_csiro_services_SimulationSnarkService_stubs.jar:jargon_v1.4.16.jar au.csiro.clients.SimulationSnarkClients.ClientAllAuto \
https://ng2.ivec.org:8443/wsrf/services/SimulationSnarkFactoryService epr_file code_to_run input_file_DIR_on_ngdata main_input_file output_dir_on_ngdata user_id user_email
     

java -classpath $CLASSPATH:au_csiro_services_SimulationSnarkService.jar:\
au_csiro_services_SimulationSnarkService_stubs.jar:jargon_v1.4.16.jar  au.csiro.clients.SimulationSnarkClients.ClientAllGridFtp \
https://ng2.ivec.org:8443/wsrf/services/SimulationSnarkFactoryService /tmp/epr.txt $INPUTDIR/something.py \
/store/cg01/fra283/inputs/ demo.xml /store/cg01/fra283/outputs/ fra283 ryan.fraser@csiro.au
     

where-
    • "/tmp/epr.txt" - is my referencing file for the grid
    • "something.py" - is the code I want to run (if not a *.py script use python)
    • "/store/cg01/fra283/inputs/" is where I placed my input files on ngdata. Note the "/" on the end MUST be present.
    • "demo.xml" is my main input file
    • "/store/cg01/fra283/outputs/" is where I want my output files on ngdata. Note the "/" on the end MUST be present.
    • "fra283" is my user id
    • and "ryan.fraser@csiro.au" is my email address for receiving email notifications of job completion (please note this does not work yet!)

Get the results so far

You can transfer the result files during your jobs execution so you can see how it is going, via:
java -classpath $CLASSPATH:au_csiro_services_SimulationSnarkService.jar:au_csiro_services_SimulationSnarkService_stubs.jar:\
jargon_v1.4.16.jar  au.csiro.clients.SimulationSnarkClients.ClientResults /tmp/epr.txt
     

Get the status of your job

java -classpath $CLASSPATH:au_csiro_services_SimulationSnarkService.jar:au_csiro_services_SimulationSnarkService_stubs.jar:jargon_v1.4.16.jar\
 au.csiro.clients.SimulationSnarkClients.ClientStatus /tmp/epr.txt
     

Get the Standard Output and Error

java -classpath $CLASSPATH:au_csiro_services_SimulationSnarkService.jar:au_csiro_services_SimulationSnarkService_stubs.jar:jargon_v1.4.16.jar\
 au.csiro.clients.SimulationSnarkClients.ClientStandardout /tmp/epr.txt
     

When your job is done:

  • You will receive an email notification (Sorry not yet implemented!)
  • Check if your job is complete by running the "Get the Status" program as in above, if it says done you can view your completed set of result files in SRB or ngdata.ivec.org
  • To view or retrieve your result files on ngdata.ivec.org please use globus-url-copy


To Install the Clients on a Client Machine from source - SRB version

Requirements

Software

  • Install your APAC grid certificates in $HOME/.globus/usercert.pem and userkey.pem
  • Install the APAC's CA cert and signing policy into $HOME/.globus/certificates (ie: 1e12d831.0 & 1e12d831.signing_policy)
Configuration You will require the following:
  • Valid APAC Grid certificate
  • contact help@ivec.org for accounts at IVEC (if you'd like to know more of what is required, see here RunningJobsOnTheGrid else if you don't care and like iVEC to sort it out, carry on!)

Installation

  • Check-out the java code from our SVN repository at: https://cgsrv1.arrc.csiro.au/subversion/apacgrid/trunk/SnarkGTService-clients/
  • to compile/run the clients: "source $GLOBUS_LOCATION/etc/globus-devel-env.sh" first
  • compile clients: o (LINUX)javac -classpath $CLASSPATH:au_csiro_services_SimulationSnarkService.jar:au_csiro_services_SimulationSnarkService_stubs.jar:jargon_v1.4.16.jar au/csiro/clients/SimulationSnarkService/ClientAllAuto.java
    o (WINDOWS) javac -classpath %CLASSPATH%;au_csiro_services_SimulationSnarkService.jar;au_csiro_services_SimulationSnarkService_stubs.jar;jargon_v1.4.16.jar au\csiro\clients\SimulationSnarkService\ClientAllAuto.java o Do the same for the other clients - ClientAllGridFtp.java, ClientStatus.java, ClientStandardout.java, ClientResults.java and ClientKill.java. Note: to do this, you have to make sure you (as a client) have the appropriate rights!

  • set the following environment variables in your profile script, for example for bash (LINUX):
export CLASPATH=$CLASSPATH:$GLOBUS_LOCATION/lib:
export LD_LIBRARY_PATH=$GLOBUS_LOCATION/lib
export JAVA_HOME=/usr/local/java

export GLOBUS_LOCATION=/usr/local/ws-core-4.0.1

export PATH=$GLOBUS_LOCATION/bin:$JAVA_HOME/bin:$PATH

export TRUSTED_CA=$HOME/.globus/certificates
export X509_CERT_DIR=$TRUSTED_CA
export X509_USER_CERT=$HOME/.globus/usercert.pem
export X509_USER_KEY=$HOME/.globus/userkey.pem

source $GLOBUS_LOCATION/etc/globus-devel-env.sh

ALSO add the location of the Globus, SRB and Java binaries to your path variable. For WINDOWS use: set VARIABLE=value

Usage of Clients

  • Assuming bash shell

Inital setup.

  1. On your initial use of the service or when you want to operate under a different project code: go to https://ngportal.ivec.org/auth/, log in and map your DN to a user name
  2. Log into your submittion computer
  3. Get/Refresh a Proxy Certificate -
    • grid-proxy-init
              
    • Type in your certificate password when asked
  4. Upload your input files.
SRB To upload to SRB using the SRB Client either inQ on your desktop OR Scommands (Sinit, Sput ...., Sexit)

*Note: Please place all files in a single directory in SRB, service will not work with multiple directories or directories with sub directories at this point in time. ALSO please place files on the BUGFOOT resource of SRB (connect to bugfoot.arrc.csiro.au)

For information on how to use SRB clients:

  1. Keep a record of where you uploaded the files, you'll need it as input to the clients
  2. Go into the directory where the Client code is installed -
    cd $SNARK_CLIENT
         

  1. Run the Client code

Run a Job

Current host to run on: ng2.ivec.org

SRB
java -classpath $CLASSPATH:au_csiro_services_SimulationSnarkService.jar:\
au_csiro_services_SimulationSnarkService_stubs.jar:jargon_v1.4.16.jar au.csiro.clients.SimulationSnarkClients.ClientAllAuto \
https://ng2.ivec.org:8443/wsrf/services/SimulationSnarkFactoryService epr_file code_to_run input_file_DIR_in_srb \
main_input_file user_id user_email
     

For example, I go:
java -classpath $CLASSPATH:au_csiro_services_SimulationSnarkService.jar:\
au_csiro_services_SimulationSnarkService_stubs.jar:jargon_v1.4.16.jar  au.csiro.clients.SimulationSnarkClients.ClientAllAuto \
https://ng2.ivec.org:8443/wsrf/services/SimulationSnarkFactoryService /tmp/epr.txt something.py \
/CSIRO-COMPGEO/home/fra283.CSIRO-COMPGEO/inputs/ demo.xml fra283 ryan.fraser@csiro.au
     

where-
    • "/tmp/epr.txt" - is my referencing file for the grid
    • "something.py" - is the code I want to run (if not a *.py script use python)
      • NOTE: Make sure the script that you are staging in has its executable bit set (e.g. chmod +x script.py).
    • "CSIRO-COMPGEO/home/fra283.CSIRO-COMPGEO/inputs/" is where I placed my input files on SRB. Note the "/" on the end MUST be present.
    • "demo.xml" is my main input file
    • "fra283" is my user id
    • and "ryan.fraser@csiro.au" is my email address for receiving email notifications of job completion (please note this does not work yet!)

NOTE: For Windows replace "$" with "%" and ":" with ";"

Get the results so far

You can transfer the result files during your jobs execution so you can see how it is going, via:
java -classpath $CLASSPATH:au_csiro_services_SimulationSnarkService.jar:au_csiro_services_SimulationSnarkService_stubs.jar:\
jargon_v1.4.16.jar  au.csiro.clients.SimulationSnarkClients.ClientResults /tmp/epr.txt
     

Get the status of your job

java -classpath $CLASSPATH:au_csiro_services_SimulationSnarkService.jar:au_csiro_services_SimulationSnarkService_stubs.jar:jargon_v1.4.16.jar\
 au.csiro.clients.SimulationSnarkClients.ClientStatus /tmp/epr.txt
     

Get the Standard Output and Error

java -classpath $CLASSPATH:au_csiro_services_SimulationSnarkService.jar:au_csiro_services_SimulationSnarkService_stubs.jar:jargon_v1.4.16.jar\
 au.csiro.clients.SimulationSnarkClients.ClientStandardout /tmp/epr.txt
     

When your job is done:

  • You will receive an email notification (Sorry not yet implemented!)
  • Check if your job is complete by running the "Get the Status" program as in above, if it says done you can view your completed set of result files in SRB or ngdata.ivec.org
  • To view or retrieve your result files in SRB use either inQ, mySRB or Scommands

Common Errors

"and was unexpected at this time."

If you are on the windows platform and using ws-core for the grid commands, you might see the error message "and was unexpected at this time." This is due to the fact that one of the environment variables has the word "and" in it and it confuses the .bat command file interpreter. eg -
  • set X509_CERT_DIR="C:\Documents and Settings\che190\.globus\certificates" - will cause the above message, try setting your variables with short names, and NO quotes around the whole path.
Topic revision: r9 - 15 Oct 2010, UnknownUser
 

Current license: All material on this collaboration platform is licensed under a Creative Commons Attribution 3.0 Australia Licence (CC BY 3.0).