| 38 | * __Définir les paramètres du Job__ [[BR]][[BR]] Notre job prend deux arguments en entrée. Nous l'indiquons à notre instance de job de la façon suivante : |
| 39 | {{{ |
| 40 | In [2]:j.application = Executable(exe = File('~/TestGrid/edg3/job.sh'), args=['girafe','flipflap']) |
| 41 | }}} |
| 42 | |
| 43 | *__Soumission de job__[[BR]][[BR]] Pour soumettre le job, il faut utiliser la fonctionnalité ''submit'' de l'instance. |
| 44 | {{{ |
| 45 | In [3]:j.submit() |
| 46 | Ganga.GPIDev.Lib.Job : INFO submitting job 18 |
| 47 | Ganga.GPIDev.Adapters : WARNING file /atlas/lambert/TestGrid/edg3/job.sh is not executable, overriding executable permissions in the input sandbox |
| 48 | Ganga.GPIDev.Adapters : INFO submitting job 18 to Local backend |
| 49 | Ganga.GPIDev.Lib.Job : INFO job 18 status changed to "submitted" |
| 50 | Out[3]: 1 |
| 51 | }}} |
| 52 | |
| 53 | *__Obtenir l'ID du job__[[BR]][[BR]] Avec GANGA les jobs ont leur propre ID. Pour l'obtenir exécutez les commande suivante |
| 54 | {{{ |
| 55 | In [4]:print j.id |
| 56 | 18 |
| 57 | Ganga.GPIDev.Lib.Job : INFO job 18 status changed to "running" |
| 58 | Ganga.GPIDev.Lib.Job : INFO job 18 status changed to "completed" |
| 59 | }}} |
| 60 | PS: En cas de changements de statut du job, les changements apparaissent quand vous appuyer sur la touche ''return''. |
| 61 | |
| 62 | *__Obtenir une description complete du job__[[BR]][[BR]] Rien de plus simple, tapez j (la variable qui représente l'instance du Job) : |
| 63 | {{{ |
| 64 | In [5]:j |
| 65 | Out[5]: Job ( |
| 66 | status = 'completed' , |
| 67 | name = '' , |
| 68 | inputdir = '/atlas/lambert/gangadir/workspace/lambert/LocalAMGA/18/input/' , |
| 69 | outputdir = '/atlas/lambert/gangadir/workspace/lambert/LocalAMGA/18/output/' , |
| 70 | outputsandbox = [] , |
| 71 | id = 18 , |
| 72 | info = JobInfo ( |
| 73 | submit_counter = 1 |
| 74 | ) , |
| 75 | inputdata = None , |
| 76 | merger = None , |
| 77 | inputsandbox = [] , |
| 78 | application = Executable ( |
| 79 | exe = File(name='/atlas/lambert/TestGrid/edg3/job.sh',subdir='.') , |
| 80 | env = {} , |
| 81 | args = ['girafe', 'flipflap'] |
| 82 | ) , |
| 83 | outputdata = None , |
| 84 | splitter = None , |
| 85 | subjobs = 'Job slice: jobs(18).subjobs (0 jobs) |
| 86 | ' , |
| 87 | backend = Local ( |
| 88 | actualCE = 'lpsc-ui.in2p3.fr' , |
| 89 | workdir = '/tmp/tmptrit10' , |
| 90 | id = 2126 , |
| 91 | exitcode = 0 |
| 92 | ) |
| 93 | ) |
| 94 | |
| 95 | }}} |