Dirac

Dirac (Distributed Infrastructure with Remote Agent Control) is a framework for distributed computing. For our needs it is a grid middleware software, but it can be configured to access a variety of resources, from desktop machines to clouds, simultaneously. It has a workload managment system with pilot jobs and a job monitoring system with a web interface.

1. Preliminaries

Setting up the Dirac cient on the grid UI is a bit of a hassle. Thus, even though everything is explained in here, we are going through all the steps needed.

First you need to install your certificate (.p12 file) to a browser. In setting of your browser, you have a page with certificates and a button to import a certificate. For help, use google. Once you have your certificate imported, go to the Imperial Dirac web portal https://dirac.grid.hep.ph.ic.ac.uk:8443/. In the footer at the bottom of the page, you should see your name and a drop down menu with "visitor" in it. If you cannot change that to "pheno_user", you are not registered with the Imperial Dirac server. In this case mail to Janusz.

2. Client installation

Run the following commands to create a directory called "dirac", download the installation script, run the installation script and set up the environmental variables.

mkdir dirac

cd dirac

wget -np -O dirac-install http://lhcbproject.web.cern.ch/lhcbproject/dist/Dirac_project/dirac-install

chmod +x dirac-install

./dirac-install -V gridpp -r v6r11p24

source bashrc

The version number, v6r11p24, should match with the one on the bottom left corner of the Imperial Dirac web portal. You need to have this "bashrc" file sourced when you are using Dirac.

3. Configuration

For configuration, create a generic proxy without VO

dirac-proxy-init -x

and configure defaults

dirac-configure -F defaults-gridpp.cfg

4. First job

Now, create a real proxy. (Your VO is pheno and Dirac group pheno_user)

dirac-proxy-init -g pheno_user -M

Dirac uses JDL as a job description language. Here is a simple "Hello World!" example

[
JobName = "Simple_Job";
Executable = "/bin/echo";
Arguments = "Hello World!";
StdOutput = "StdOut";
StdError = "StdErr";
OutputSandbox = {"StdOut","StdErr"};
]

To submit execute

dirac-wms-job-submit Simple.jdl

You will get a job id, fx. 1234, which you need to monitor the job, kill it or download the output after it finished.

dirac-wms-job-status 1234

dirac-wms-job-delete 1234

dirac-wms-job-get-output 1234

Alternatively, you can use the web portal for monitoring. There is a drop down menu called "Jobs" on the menu bar. Choose "Job monitor" to see all your Dirac jobs.

5. Dirac with Ganga

Ganga has also a dirac backend. To use this backend is not as strightforward as using the ARC backend. Thus you should make a copy of your "~/.gangarc" script to restore the setting if you want to run with ARC later on. First we need to save all the environmental variables to a file for ganga (dirac bashrc must be sourced!)

env > ~/dirac/envfile

Change the location if you created the "dirac" directory somewhere else. Next configure ganga to be able to work with dirac by executing

/cvmfs/ganga.cern.ch/Ganga/install/6.1.1-hotfix1/bin/ganga -g -o[Configuration]RUNTIME_PATH=GangaDirac

This will add some new stuff into your "~/.gangarc" file. In this file set the following options

[Configuration] RUNTIME_PATH = GangaDirac
[Dirac] DiracEnvFile = /mt/home/username/dirac/envfile
[defaults_GridCommand]info = dirac-proxy-info
[defaults_GridCommand]init = dirac-proxy-init -g pheno_user

Now you are ready to run using Dirac. Remember to change the backend to "Dirac" in your submission script. Otherwise no other changes are needed to your submission scripts.