Skip to content

Commit

Permalink
Made the module work with the proposed XENONnT Python 3.6 environment
Browse files Browse the repository at this point in the history
  • Loading branch information
rynge committed Apr 23, 2019
1 parent 4df640d commit e3640a4
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 17 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,10 @@ Just like utilix, this tool expects a configuration file named `$HOME/.xenonnt.c
# sites to exclude (GLIDEIN_Site), comma seprated list
exclude_sites =

## Environment

Please use the Python3.6 XENONnT environment. On the OSG submit hosts, this can be set up by sourcing:

. /cvmfs/xenon.opensciencegrid.org/testing/releases/latest/setup.sh


2 changes: 1 addition & 1 deletion outsource/Outsource.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def submit_workflow(self):

# does workflow already exist?
if os.path.exists(self._workflow_dir()):
logger.error("Workflow already exists at {path}. Exiting.".format(path=self._workflow_dir()))
logger.error("Workflow already exists at {path} . Exiting.".format(path=self._workflow_dir()))
return

# work dirs
Expand Down
44 changes: 28 additions & 16 deletions outsource/workflow/run-pax.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,38 @@ export send_updates=$7

start_dir=$PWD

osg_software=/cvmfs/oasis.opensciencegrid.org/mis/osg-wn-client/3.4/3.4.22/el7-x86_64
anaconda_env=/cvmfs/xenon.opensciencegrid.org/releases/anaconda/2.4/bin
rucio_base=/cvmfs/xenon.opensciencegrid.org/software/rucio-py27/1.8.3

# OSG env for gfal
source $osg_software/setup.sh
export GFAL_CONFIG_DIR=$OSG_LOCATION/etc/gfal2.d
export GFAL_PLUGIN_DIR=$OSG_LOCATION/usr/lib64/gfal2-plugins/

# Rucio env
export RUCIO_HOME=$rucio_base/rucio/
export RUCIO_ACCOUNT=xenon-analysis
export PYTHONPATH=$rucio_base/lib/python2.7/site-packages:$PYTHONPATH
export PATH=$rucio_base/bin:$PATH

# set GLIDEIN_Country variable if not already
if [[ -z "$GLIDEIN_Country" ]]; then
export GLIDEIN_Country="US"
fi

if [ -e /image-build-info.txt ]; then
echo
echo "Running in image with build info:"
cat /image-build-info.txt
echo
fi

. /opt/XENONnT/setup.sh

### We should not need these anymore as it is part of the container we running in
###
### osg_software=/cvmfs/oasis.opensciencegrid.org/mis/osg-wn-client/3.4/3.4.22/el7-x86_64
anaconda_env=/cvmfs/xenon.opensciencegrid.org/releases/anaconda/2.4/bin
### rucio_base=/cvmfs/xenon.opensciencegrid.org/software/rucio-py27/1.8.3
###
### # OSG env for gfal
### source $osg_software/setup.sh
### export GFAL_CONFIG_DIR=$OSG_LOCATION/etc/gfal2.d
### export GFAL_PLUGIN_DIR=$OSG_LOCATION/usr/lib64/gfal2-plugins/
###
### # Rucio env
### export RUCIO_HOME=$rucio_base/rucio/
#export PYTHONPATH=$rucio_base/lib/python2.7/site-packages:$PYTHONPATH
#export PATH=$rucio_base/bin:$PATH

export RUCIO_ACCOUNT=xenon-analysis

data_downloaded=0

# If data is in Rucio, find the rse to use
Expand Down Expand Up @@ -95,7 +107,7 @@ if [[ $data_downloaded == 0 ]]; then
fi

# post-transfer, we can set up the env for pax - but first save/clear some old stuff
old_path=$PATH
iold_path=$PATH
export PATH=/usr/bin:/bin
old_ld_library_path=$LD_LIBRARY_PATH
unset LD_LIBRARY_PATH
Expand Down

0 comments on commit e3640a4

Please sign in to comment.