Difference between revisions of "Using ganga at NIKHEF"

From Atlas Wiki
Jump to navigation Jump to search
Line 12: Line 12:
 
if you wish. Then setup ATHENA at NIKHEF as described in [[Setting_up_1206|athena 12.0.6 Wiki]].
 
if you wish. Then setup ATHENA at NIKHEF as described in [[Setting_up_1206|athena 12.0.6 Wiki]].
  
To setup ganga, add the two following lines to the .cshrc:<br>
+
To setup ganga, add the two following lines to the .cshrc:<br><br>
 
<tt>
 
<tt>
 
setenv GANGA_CONFIG_PATH GangaAtlas/Atlas.ini <br>
 
setenv GANGA_CONFIG_PATH GangaAtlas/Atlas.ini <br>
Line 21: Line 21:
 
setenv LFC_HOST ’lfc03.nikhef.nl’ <br>
 
setenv LFC_HOST ’lfc03.nikhef.nl’ <br>
 
setenv LCG_CATALOG_TYPE lfc <br>
 
setenv LCG_CATALOG_TYPE lfc <br>
</tt>
+
</tt><br>
or if you are working in a sh based shell (such as bash): <br>
+
or if you are working in a sh based shell (such as bash): <br><br>
 
<tt>
 
<tt>
 
export GANGA\_CONFIG\_PATH=GangaAtlas/Atlas.ini  
 
export GANGA\_CONFIG\_PATH=GangaAtlas/Atlas.ini  
Line 31: Line 31:
 
source LFC_HOST=’lfc03.nikhef.nl’  
 
source LFC_HOST=’lfc03.nikhef.nl’  
 
source LCG_CATALOG_TYPE=lfc
 
source LCG_CATALOG_TYPE=lfc
</tt>
+
</tt><br>
 
The first time ganga runs, it will ask to create a configuration file $HOME/.gangarc.  
 
The first time ganga runs, it will ask to create a configuration file $HOME/.gangarc.  
 
Answer yes, and edit the config file as follows:  
 
Answer yes, and edit the config file as follows:  
 
<ol>
 
<ol>
 
<li>
 
<li>
In the section labelled [LCG] uncomment the line:<br>
+
In the section labelled [LCG] uncomment the line:<br><br>
<tt>VirtualOrganisation = atlas </tt><br>
+
<tt>VirtualOrganisation = atlas </tt><br><br>
and add the line<br>
+
and add the line<br><br>
 
<tt>DefaultSE = tbn18\.nikhef\.nl </tt>
 
<tt>DefaultSE = tbn18\.nikhef\.nl </tt>
 
</li>
 
</li>
 
<li>
 
<li>
In the section labeled [Athena] uncomment the line: <br>
+
In the section labeled [Athena] uncomment the line: <br><br>
 
<tt>
 
<tt>
&#35; local path to base paths of dist-kits (lxplus example) <br>
+
&#35; local path to base paths of dist-kits (lxplus example) <br><br>
ATLAS_SOFTWARE = /data/atlas/offline/ <br>
+
ATLAS_SOFTWARE = /data/atlas/offline/
 
</tt>
 
</tt>
 
</li>
 
</li>
 
<li>
 
<li>
In the section labeld [ROOT] uncomment and edit the lines: <br>
+
In the section labeld [ROOT] uncomment and edit the lines: <br><br>
 
<tt>
 
<tt>
 
location = /data/atlas/offline/12.0.6/sw/lcg/external/root/ <br>
 
location = /data/atlas/offline/12.0.6/sw/lcg/external/root/ <br>
Line 73: Line 73:
 
</li>
 
</li>
 
</ul>
 
</ul>
One thing you can do with a job is view it’s status: <br>
+
One thing you can do with a job is view it’s status: <br><br>
 
<tt>
 
<tt>
 
jobs[1].status()  
 
jobs[1].status()  
</tt>
+
</tt><br><br>
 
This can be ’new’, ’submitted’, ’running’ or ’completed’. Once the job is  
 
This can be ’new’, ’submitted’, ’running’ or ’completed’. Once the job is  
 
completed, you can view it’s output (which is stored by default in  
 
completed, you can view it’s output (which is stored by default in  
$HOME/gangadir/workspace/Local/ jobid /output) by typing:<br>
+
$HOME/gangadir/workspace/Local/ jobid /output) by typing:<br><br>
 
<tt>  
 
<tt>  
 
In [25]: jobs[0].peek()  
 
In [25]: jobs[0].peek()  
</tt>
+
</tt><br><br>
Or look at a specific output file by typing: <br>
+
Or look at a specific output file by typing: <br><br>
 
<tt>
 
<tt>
 
In [25]: jobs[0].peek(’stderr’,’less’)  
 
In [25]: jobs[0].peek(’stderr’,’less’)  
</tt>
+
</tt><br><br>
 
where <tt>stderr</tt> is the name of the file you want to view, and less the program  
 
where <tt>stderr</tt> is the name of the file you want to view, and less the program  
 
to view it with. You can kill a job using the <tt>kill()</tt> method, and remove it  
 
to view it with. You can kill a job using the <tt>kill()</tt> method, and remove it  

Revision as of 12:36, 1 June 2007

This page is under construction

You need an afs ticket to run ganga. Also, you need a grid certificate, and you need to setup the grid, as described in the DQ2 at Nikhef wiki. At the same time, assuming you set up the GRID tools according to Martijn’s Wiki, COMMENT OUT THE LINE: source /project/atlas/nikhef/dq2/dq2_setup.csh.NIKHEF If you setup the GRID tools in some other way, make sure the grid tools environment is not loaded. GANGA AND GRID TOOLS ENVIRONMENT CLASH! Apparently, it is a mismatch between the grod tools environment and the Athena environment. You can add the line to an alias or whatever, if you wish. Then setup ATHENA at NIKHEF as described in athena 12.0.6 Wiki.

To setup ganga, add the two following lines to the .cshrc:

setenv GANGA_CONFIG_PATH GangaAtlas/Atlas.ini
#for the local installation
#set path = (/public/public_linux/Ganga/install/4.3.0/bin/ $path)
#for the newest version installed on afs
set path = (/afs/cern.ch/sw/ganga/install/4.3.1/bin/ $path)
setenv LFC_HOST ’lfc03.nikhef.nl’
setenv LCG_CATALOG_TYPE lfc

or if you are working in a sh based shell (such as bash):

export GANGA\_CONFIG\_PATH=GangaAtlas/Atlas.ini #for the local installation #PATH=/public/public_linux/Ganga/install/4.3.0/bin/:${PATH} #for the newest version installed on afs PATH=/afs/cern.ch/sw/ganga/install/4.3.1/bin/:${PATH} source LFC_HOST=’lfc03.nikhef.nl’ source LCG_CATALOG_TYPE=lfc
The first time ganga runs, it will ask to create a configuration file $HOME/.gangarc. Answer yes, and edit the config file as follows:

  1. In the section labelled [LCG] uncomment the line:

    VirtualOrganisation = atlas

    and add the line

    DefaultSE = tbn18\.nikhef\.nl
  2. In the section labeled [Athena] uncomment the line:

    # local path to base paths of dist-kits (lxplus example)

    ATLAS_SOFTWARE = /data/atlas/offline/
  3. In the section labeld [ROOT] uncomment and edit the lines:

    location = /data/atlas/offline/12.0.6/sw/lcg/external/root/
    version = 5.10.00e
    arch = slc3_ia3_gcc323


Running ganga

You can start the ganga CLI by typing ganga on the commandline. This starts a python interface, where you can start defining your jobs. There are a few commands you can use to get around in ganga:

  • jobs: Lists all the jobs that are defined in ganga. You can get to an indivudual job by typing:
  • jobs[id]: where the id is listed in the second column of the jobs output.

One thing you can do with a job is view it’s status:

jobs[1].status()

This can be ’new’, ’submitted’, ’running’ or ’completed’. Once the job is completed, you can view it’s output (which is stored by default in $HOME/gangadir/workspace/Local/ jobid /output) by typing:

In [25]: jobs[0].peek()

Or look at a specific output file by typing:

In [25]: jobs[0].peek(’stderr’,’less’)

where stderr is the name of the file you want to view, and less the program to view it with. You can kill a job using the kill() method, and remove it from the jobs list with the remove() method. The most important command by far is help(). This starts the interactive help program of ganga. After typing it, you get a help> prompt. Typing index gives you a list of all possible help subjects. The explanations are rather brief, but it does help you to find methods of build-in classes of Ganga and it’s plugin. For instance, the atlas plugin defines classes like DQ2Dataset. For more info on DQ2Dataset you type DQ2Dataset at the help> prompt.