Submit job on lxplus

bsub_lxplus.sh 8nh ${logfile} "./bin/runAsymptoticsCLs ${ichan} ${im} ${v}"

The bash script 'bsub_lxplus.sh' is,

#!/bin/env sh
queue=$1
output=$2
directory=`pwd`
mkdir -p ~/.athena_submits
id="$$.${HOSTNAME}.${USER}"
commandfile=$HOME/.athena_submits/$id.command
rm -f $commandfile
cat >> $commandfile <<EOF
#!/bin/env sh
EOF
export | grep -v KRB5CCNAME >> $commandfile
shift
shift
echo "cd $directory" >> $commandfile
echo "$SHELL -fc '$@'"  >> $commandfile
chmod a+x $commandfile
bsub  -C 0 -q $queue -o $output -R 'pool>4000' $commandfile

dq2-ls on lxplus batch

  • Create a limited lifetime proxy :

setupATLAS
localSetupEmi
voms-proxy-init -voms atas -valid 12:0    # restricted this to a 12 hour validity (or X hours) so that if it is compromised, it is short lived
mkdir $HOME/myVoms

# for lxplus, make sure your acls are correct (i.e. they should be something like this so that it is safe)

 fs listacl myVoms
Access list for myVoms is
Normal rights:
  system:administrators rlidwka
  system:anyuser l
  desilva rlidwka

cp /tmp/x509up_u`id -u`  $HOME/myVoms/

(log out)

Then, in the job submitted to lxplus, do this instead of what you have below:

export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh
localSetupROOT --skipConfirm
localSetupDQ2Client --skipConfirm
export X509_USER_PROXY= $HOME/myVoms/x509up_u`id -u`

dq2-ls etc (no need to setup a proxy !)

This will work as long as the lifetime if the proxy you created earlier is valid.

  • Notice that we do not source GLite or Emi with DQ2 as you had originally done (even from /afs).
  • Once you setup things from ATLASLocalRootBase, don't mix it by setting up glite and dq2 from /afs/cern. Use everything from ATLASLocalRootBase so that you have a consistent environment as I've demonstrated in #1.
  • Never setup grid middleware explicitly unless you need it explicitly - like I was doing a short -lived proxy as above. It will be setup for you if needed otherwise (in DQ2, Ganga, Panda, etc).

-- HaifengLi - 05 Aug 2014

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2014-08-05 - HaifengLi
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback