ganga.GangaCore.Lib.Remote.Remote module

Remote backend - submit jobs to a Remote pool.

The remote backend works as an SSH tunnel to a remote site where a ganga session is opened and the job submitted there using the specified remote_backend. It is (in theory!) transparent to the user and should allow submission of any jobs to any backends that are already possible in GangaCore.

NOTE: Due to the file transfers required, there can be some slow down during submission and monitoring

E.g. 1 - Hello World example submitted to local backend:

j = Job(application=Executable(exe=’/bin/echo’,args=[‘Hello World’]), backend=”Remote”) j.backend.host = “bluebear.bham.ac.uk” # Host name j.backend.username = “slatermw” # User name j.backend.ganga_cmd = “/bb/projects/Ganga/runGanga” # Ganga Command line on remote site j.backend.ganga_dir = “/bb/phy/slatermw/gangadir/remote_jobs” # Where to store the jobs j.backend.remote_backend = Local() j.submit()

E.g. 2 - Root example submitted to PBS backend:

r = Root() r.version = ‘5.14.00’ r.script = ‘gengaus.C’

j = Job(application=r,backend=”Remote”) j.backend.host = “bluebear.bham.ac.uk” j.backend.username = “slatermw” j.backend.ganga_cmd = “/bb/projects/Ganga/runGanga” j.backend.ganga_dir = “/bb/phy/slatermw/gangadir/remote_jobs” j.outputsandbox = [‘gaus.txt’] j.backend.remote_backend = PBS() j.submit()

E.g. 3 - Athena example submitted to LCG backend NOTE: you don’t need a grid certificate (or UI) available on the local machine, just the remote machine

j = Job() j.name=’Ex3_2_1’ j.application=Athena() j.application.prepare(athena_compile=False) j.application.option_file=’/disk/f8b/home/mws/athena/testarea/13.0.40/PhysicsAnalysis/AnalysisCommon/UserAnalysis/run/AthExHelloWorld_jobOptions.py’

j.backend = Remote() j.backend.host = “bluebear.bham.ac.uk” j.backend.username = “slatermw” j.backend.ganga_cmd = “/bb/projects/Ganga/runGanga” j.backend.ganga_dir = “/bb/phy/slatermw/gangadir/remote_jobs” j.backend.environment = {‘ATLAS_VERSION’ : ‘13.0.40’} # Additional environment variables j.backend.remote_backend = LCG() j.backend.remote_backend.CE = ‘epgce2.ph.bham.ac.uk:2119/jobmanager-lcgpbs-short’

j.submit()

E.g. 4 - Hello World submitted at CERN on LSF using atlas startup

j = Job() j.backend = Remote() j.backend.host = “lxplus.cern.ch” j.backend.username = “mslater” j.backend.ganga_cmd = “ganga” j.backend.ganga_dir = “/afs/cern.ch/user/m/mslater/gangadir/remote_jobs” j.backend.pre_script = [‘source /afs/cern.ch/sw/ganga/install/etc/setup-atlas.csh’] # source the atlas setup script before running ganga j.backend.remote_backend = LSF() j.submit()

ganga.GangaCore.Lib.Remote.Remote.const_lock

This is a context manager which acquires the const write lock on the object’s root object.

This lock acquires exclusive access over an object tree to prevent it from changing. Reading schema attributes on the object is still allowed but changing them is not. Only one thread can hold this lock at once.