Skip to content

Latest commit

 

History

History
152 lines (135 loc) · 4.92 KB

use.md

File metadata and controls

152 lines (135 loc) · 4.92 KB

Final Report | Installation | How it Works | How to use | Code

Gangaextension - How to use ?

Using GangaExtension you can directly submit and monitor Ganga Jobs from Jupyter Notebook/SWAN.

The notebook and Job Script used for this tutorial can be found here.

How to create a Job ?

To submit a Job open/create a Python2 Notebook. In this notebook, create a new cell and in the first line of this cell write %%ganga to indicate this cell is an IPython Ganga Magic. From the next line simply define the Job in the same way it is defined in Ganga shell.

Note: Only a single Job can be defined per cell magic. If none or more than one Job is defined in single magic cell, an exception will be raised.

For Example: A Job definition with multiple subjobs can look like screenshot_2018-07-29 help_robinson

How to track the Job ?

After execution of this cell magic a new Job will be created.

Note: This Job is not being monitored in Notebook's kernel, it is being monitored in a seperate Ganga session attached to Jupyter Session, so killing this notebook will not affect monitoring of submitted Ganga Job.

A widget will appear below the cell showing Job information and it will periodically update the status of Job.

Note: Since Job is being monitored in seperate session, there may be some lag between the actual status of Job and the status visible in following widget.

screenshot_2018-07-29 help_robinson 2

Also, a new entry corresponding to submitted Job will appear in Ganga Jobs tab. Since the Job is being monitored in Jupyter's server session, this entry will display live status of submitted Job. screenshot_2018-07-29 ganga jobs

Note: The submitted Job can be killed and removed from this Ganga Jobs Tab.

How to find Job output ?

The Job directory location can be identified by outputdir property of job object: screenshot_2018-07-29 help_robinson 3 The output files of Job can be identified by outputfiles property of job object: screenshot_2018-07-29 help_robinson 4

In this example, the content of outputfile islands.txt of Job is: screenshot_2018-07-29 help_robinson 5

How to access Job defined in different session ?

On restarting Notebook or in another notebook, The Job object can be obtained by Ganga Repository object jobs. screenshot_2018-07-29 help_robinson 6

Precaution

Since, the Ganga Namespace is directly imported in Notebook's Python namespace, user is advised to not define variables/methods with following names to prevent overwriting of Ganga Namespace variables/methods.

  • ARC
  • AfsToken
  • ArgSplitter
  • Batch
  • CREAM
  • Condor
  • CondorRequirements
  • ConfigError
  • CoreTask
  • CoreTransform
  • CoreUnit
  • CustomChecker
  • CustomMerger
  • Dataset
  • EmptyDataset
  • Executable
  • File
  • FileChecker
  • GangaAttributeError
  • GangaDataset
  • GangaDatasetSplitter
  • GangaList
  • GenericSplitter
  • GoogleFile
  • GridFileIndex
  • GridSandboxCache
  • GridftpFileIndex
  • GridftpSandboxCache
  • ITask
  • Interactive
  • Job
  • JobError
  • JobInfo
  • JobTime
  • LCG
  • LCGFileIndex
  • LCGRequirements
  • LCGSEFile
  • LCGSandboxCache
  • LSF
  • Local
  • LocalFile
  • Localhost
  • MassStorageFile
  • MetadataDict
  • MultiPostProcessor
  • Notebook
  • Notifier
  • PBS
  • ProtectedAttributeError
  • ReadOnlyObjectError
  • Remote
  • Root
  • RootFileChecker
  • RootMerger
  • SGE
  • SandboxFile
  • ShareDir
  • ShareRef
  • SharedFile
  • Slurm
  • SmartMerger
  • TaskChainInput
  • TaskLocalCopy
  • TextMerger
  • TreeError
  • VomsProxy
  • box
  • categoryname
  • config
  • convert_merger_to_postprocessor
  • credential_store
  • disableMonitoring
  • disableServices
  • enableMonitoring
  • export
  • full_print
  • ganga
  • jobSlice
  • jobs
  • jobtree
  • license
  • load
  • os
  • plugins
  • prep
  • pth
  • queues
  • reactivate
  • report
  • reloadJob
  • runMonitoring
  • shareref
  • sys
  • tasks
  • templates
  • typename

Other Useful Links