Skip to content

Commit

Permalink
Use spack in wrappers (#536)
Browse files Browse the repository at this point in the history
* use spack in wrapper to find ifdhc
* cleaning up extraneous diffs
* needed curlies
* rename environments to ifdh_env... instead of jobsub_env...

---------

Co-authored-by: Shreyas Bhat <sbhat@fnal.gov>
  • Loading branch information
marcmengel and shreyb authored Feb 22, 2024
1 parent e8a0245 commit fcdb272
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions templates/simple/simple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,20 +167,9 @@ cat << '_HEREDOC_' > ${JSB_TMP}/ifdh.sh
which ifdh > /dev/null 2>&1
has_ifdh=$?
if [ "$has_ifdh" -ne "0" ] ; then
unset PRODUCTS
for setup_file in /cvmfs/fermilab.opensciencegrid.org/products/common/etc/setups /grid/fermiapp/products/common/etc/setups.sh /fnal/ups/etc/setups.sh ; do
if [ -e "$setup_file" ] && [ "$has_ifdh" -ne "0" ]; then
source $setup_file
ups exist ifdhc $IFDH_VERSION
has_ifdh=$?
if [ "$has_ifdh" = "0" ] ; then
setup ifdhc $IFDH_VERSION
break
else
unset PRODUCTS
fi
fi
done
. /cvmfs/fermilab.opensciencegrid.org/packages/common/setup-env.sh
sos=$(spack arch --operating-system)
spack env activate ifdh_env_${sos}_${IFDH_VERSION:-current}
fi
which ifdh > /dev/null 2>&1
if [ "$?" -ne "0" ] ; then
Expand Down

0 comments on commit fcdb272

Please sign in to comment.