next up previous contents
Next: SE Usage to Store Up: Job Examples Previous: Using make   Contents

VO Specific Jobs

In general VO specific jobs are very complex and strictly related to the kind of experiment application the jobs should run. The applications will usually need the setup of shell variables. Here is reported a basic job for ALICE that checks environment.


alienv.jdl
Type = "Job";
JobType = "Normal";
Executable = "/bin/sh";
MyProxyServer="lxshare0207.cern.ch";
StdOutput = "alienv.out";
StdError = "alienv.err";
InputSandbox = {"alienv.sh"};
OutputSandbox = {"alienv.err","alienv.out"};
RetryCount = 7;
Arguments = "alienv.sh";



alienv.sh
#!/bin/bash
# find EDG location for ALICE_ROOT_DIR and export variable using eval
eval `\$EDG_LOCATION/bin/edg-vo-env --shell=sh alice`
$EDG_LOCATION/bin/edg-vo-env --shell=sh alice
ALIENV=`\$EDG_LOCATION/bin/edg-vo-env --shell=sh alice`
#
echo " "
echo "Job-beg-at: `date`"
echo "Job-enviro: $ALIENV"
echo "Job-WKnode: `hostname -f`"
echo " "
#
echo " 0 - check if environment is OK ......."
echo "alice_root_dir is: $ALICE_ROOT_DIR and stores:"
ls -l $ALICE_ROOT_DIR
echo " "
echo "aliroot version is: "
ls -l $ALICE_ROOT_DIR/aliroot/3.09.06/bin/tgt_Linux/aliroot
echo "root version is: "
ls -l $ALICE_ROOT_DIR/root/3.05.02/bin/root
echo "geant3 version is: "
ls -l $ALICE_ROOT_DIR/geant3/3.05.02/lib/tgt_Linux/libgeant321.so
echo "Job-end-at: `date`"


The script creates the ALICE_ROOT_DIR environment variable using the middleware tool edg-vo-env that set and exports environment variables for the required VO and shell syntax. Then job information is printed and VO specific directories are inspected.


alienv.out
ALICE_ROOT_DIR=/opt/alice; export ALICE_ROOT_DIR;
Job-beg-at: Wed Nov 26 15:17:57 GMT 2003
Job-enviro: ALICE_ROOT_DIR=/opt/alice; export ALICE_ROOT_DIR;
Job-WKnode: farm016.hep.phy.cam.ac.uk
0 - check if environment is OK .......
alice_root_dir is: /opt/alice and stores:
total 12
drwxr-xr-x 3 root root 4096 Nov 18 14:48 aliroot
drwxr-xr-x 3 root root 4096 Nov 18 14:30 geant3
drwxr-xr-x 4 root root 4096 Nov 18 14:48 root
aliroot version is:
-rwxr-xr-x 1 root root 7812 Feb 25 2003
/opt/alice/aliroot/3.09.06/bin/tgt_Linux/aliroot
root version is:
-rwxr-xr-x 1 root root 116120 Feb 25 2003
/opt/alice/root/3.05.02/bin/root
geant3 version is:
-r-xr-xr-x 1 root root 9665510 Feb 24 2003
/opt/alice/geant3/3.05.02/lib/tgt_Linux/libgeant321.so
Job-end-at: Wed Nov 26 15:17:57 GMT 2003



next up previous contents
Next: SE Usage to Store Up: Job Examples Previous: Using make   Contents
luvisetto 2003-12-17