Package Ganga :: Package Lib :: Package Remote :: Module Remote' :: Class Remote :: Class _proxyClass
[hide private]
[frames] | no frames]

Class _proxyClass

source code

    object --+    
             |    
GPIProxyObject --+
                 |
                Lib.Remote.Remote'.Remote._proxyClass

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 Ganga.

   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()

   

Properties:

     username       The username at the remote host. (simple property,
                    default='',comparable)

     ganga_cmd      Command line to start ganga on the remote host. (simple
                    property, default='',comparable)

     ssh_key        Set to true to the location of the the ssh key to use for
                    authentication, e.g. /home/mws/.ssh/id_rsa. Note, you should
                    make sure 'key_type' is also set correctly.. (simple
                    property, default='',comparable)

     key_type       Set to the type of ssh key to use (if required). Possible
                    values are 'RSA' and 'DSS'.. (simple property,
                    default='RSA',comparable)

     host           The remote host and port number ('host:port') to use.
                    Default port is 22.. (simple property,
                    default='',comparable)

     actualCE       Computing Element where the job actually runs.. (simple
                    property, default=0,protected,comparable)

     remote_job_id  Remote job id.. (simple property,
                    default=0,protected,comparable)

     ganga_dir      The directory to use for the remote workspace, repository,
                    etc.. (simple property, default='',comparable)

     pre_script     Sequence of commands to execute before running Ganga on the
                    remote site. (simple property, default=[''],comparable)

     remote_backend specification of the resources to be used (e.g. batch
                    system). ('backends' object, default=None,comparable)

     environment    Overides any environment variables set in the job. (simple
                    property, default={},comparable)

     exitcode       Application exit code. (simple property,
                    default=0,protected,comparable)

Nested Classes [hide private]
  _impl
This is a Ganga.GPI.Remote implementation class.
Instance Methods [hide private]
 
__eq__(self, x)
Equality operator (==), compare the Remote properties which are declared as [comparable].
source code
 
__init__(self, *args, **kwds)
GPI Remote object constructor: Remote() : create remote with default settings; Remote(r) : make a copy of r; Remote(r,x=a,...): make a copy of r and set property 'x' to a, etc..
source code
 
__ne__(self, x)
Non-equality operator (!=).
source code
 
__repr__(self)
Return an short representation of Remote object.
source code
 
__setattr__(self, x, v)
Set a property of Remote with consistency and safety checks.
source code
 
__str__(self)
Return a printable string representing Remote object as a tree of properties.
source code
 
copy(self)
Make an identical copy of self.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __sizeof__, __subclasshook__

Class Variables [hide private]
  actualCE = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object...
  environment = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor obj...
  exitcode = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object...
  ganga_cmd = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor objec...
  ganga_dir = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor objec...
  host = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at ...
  key_type = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object...
  pre_script = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor obje...
  remote_backend = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor ...
  remote_job_id = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor o...
  ssh_key = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object ...
  username = <Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwds)
(Constructor)

source code 

GPI Remote object constructor: Remote() : create remote with default settings; Remote(r) : make a copy of r; Remote(r,x=a,...): make a copy of r and set property 'x' to a, etc..

Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

Return an short representation of Remote object.

Overrides: object.__repr__

__setattr__(self, x, v)

source code 

Set a property of Remote with consistency and safety checks. Setting a [protected] or a unexisting property raises AttributeError.

Overrides: object.__setattr__

__str__(self)
(Informal representation operator)

source code 

Return a printable string representing Remote object as a tree of properties.

Overrides: object.__str__

Class Variable Details [hide private]

actualCE

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x377c9d0>

environment

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x377cc50>

exitcode

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x377cc90>

ganga_cmd

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x377c7d0>

ganga_dir

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x377cad0>

host

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x377c950>

key_type

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x377c8d0>

pre_script

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x377cb50>

remote_backend

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x377cbd0>

remote_job_id

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x377ca50>

ssh_key

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x377c850>

username

Value:
<Ganga.GPIDev.Base.Proxy.ProxyDataDescriptor object at 0x377c6d0>