Package madgraph :: Package various :: Module cluster :: Class MultiCore
[hide private]
[frames] | no frames]

Class MultiCore

source code

object --+    
         |    
   Cluster --+
             |
            MultiCore

class for dealing with the submission in multiple node

Instance Methods [hide private]
 
__init__(self, *args, **opt)
Init the cluster
source code
 
launch_and_wait(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None, **opts)
launch one job and wait for it
source code
 
submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None, required_output=[], nb_submit=0)
submit a job on multicore machine
source code
 
launch(self, exe, argument, cwd, stdout)
way to launch for multicore.
source code
 
wait(self, me_dir, update_status)
Wait that all thread finish self.nb_used and self.done are update via each jobs (thread and local) self.submitted is the nb of times that submitted has been call (local) remaining is the nb of job that we still have to wait.
source code
 
remove(self, error=None)
Ensure that all thread are killed
source code

Inherited from Cluster: check_termination, control, control_one_job, submit2

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

Class Variables [hide private]
  job_id = '$'

Inherited from Cluster: name

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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

source code 

Init the cluster

Overrides: object.__init__

launch_and_wait(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None, **opts)

source code 

launch one job and wait for it

Overrides: Cluster.launch_and_wait

submit(self, prog, argument=[], cwd=None, stdout=None, stderr=None, log=None, required_output=[], nb_submit=0)

source code 

submit a job on multicore machine

Overrides: Cluster.submit

launch(self, exe, argument, cwd, stdout)

source code 

way to launch for multicore. If exe is a string then treat it as an executable. Otherwise treat it as a function

wait(self, me_dir, update_status)

source code 

Wait that all thread finish self.nb_used and self.done are update via each jobs (thread and local) self.submitted is the nb of times that submitted has been call (local) remaining is the nb of job that we still have to wait. (local) self.pids is the list of the BASH pid of the submitted jobs. (thread)

WARNING: In principle all those value are coherent but since some are modified in various thread, those data can be corrupted. (not the local one). Nb_used in particular shouldn't be trusted too much. This code check in different ways that all jobs have finished.

In principle, the statement related to '#security #X' are not used. In practise they are times to times.

Overrides: Cluster.wait

remove(self, error=None)

source code 

Ensure that all thread are killed

Overrides: Cluster.remove