From e3640a4d766ff622f97d258863e39bf84f9dfe42 Mon Sep 17 00:00:00 2001 From: Mats Rynge Date: Tue, 23 Apr 2019 11:05:34 -0500 Subject: [PATCH] Made the module work with the proposed XENONnT Python 3.6 environment --- README.md | 6 +++++ outsource/Outsource.py | 2 +- outsource/workflow/run-pax.sh | 44 ++++++++++++++++++++++------------- 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 21abab8..adf2822 100644 --- a/README.md +++ b/README.md @@ -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 + diff --git a/outsource/Outsource.py b/outsource/Outsource.py index d56e3da..b915082 100644 --- a/outsource/Outsource.py +++ b/outsource/Outsource.py @@ -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 diff --git a/outsource/workflow/run-pax.sh b/outsource/workflow/run-pax.sh index 274632b..dbc6b3c 100755 --- a/outsource/workflow/run-pax.sh +++ b/outsource/workflow/run-pax.sh @@ -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 @@ -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