Quick Guide to Dirac

From GridPP Wiki
Jump to: navigation, search

These instruction are for the dirac server at https://dirac.gridpp.ac.uk/DIRAC.

Introduction

This document describes how to quickly set up a simple Dirac UI client, create a job script and then submit it to a Dirac server for execution. You need to have a valid grid certificate and be a member of a supported VO. You do not need root access to the machine you are installing the Dirac UI on.

Note: new users may wish to start with the GridP UserGuide, which includes complete instructions for getting setup with GridPP DIRAC.

Getting support

  • Please consider signing up to the gridpp dirac users mailing list: Sign up ! (It's fairly low traffic.)
  • If something isn't working, please try the mailing list first. It may help to include the output from your commands using the debug flag, which can be done with the -ddd flag, e.g.: dirac-proxy-init -ddd -g gridpp_user -M
  • For operational issues ("Dirac server has died") please consider filing a GGUS ticket. If you set "Notify site" to UKI-LT2-IC-HEP, we'll see it quicker. If you don't know if your issue is operational, just use the mailing list :-)
  • If your jobs don't run at a specific site that you think they should be running at (but run on other sites), please email lcg-site-admin at imperial.ac.uk. Please include your DN and VO. We will then check if it is a configuration issue on the dirac side and either fix it, or advise you whom to contact instead.

Server URL

The Dirac server is installed at Imperial College. The Web interface is at:

 https://dirac.gridpp.ac.uk

You need a certificate installed in your browser.
To check that you are correctly registered with this dirac instance and that you are a member of a dirac supported VO, visit [the server] and check the bottom righthand corner. If this shows you as "visitor" and you cannot change this, you are not registered. In this case, please contact lcg-site-admin@imperial.ac.uk

Dirac client installation

You need an SL6 machine, with your user cert and key located in the $HOME/.globus directory. You also need to be a member of a dirac supported VO.

Note: the installation does not work on SL5 or SL7. Please use an SL6 machine. If your cluster does not support SL6, you may wish to consider using a GridPP CernVM.

You can try and run this python script (chmod u+x install_dirac_ui.py, ./install_dirac_ui.py): dirac ui install script.

Or you can run the command sequence by hand in a bash shell:

mkdir dirac_ui
cd dirac_ui
wget -np -O dirac-install http://lhcbproject.web.cern.ch/lhcbproject/dist/Dirac_project/dirac-install
chmod u+x dirac-install
./dirac-install -r v6r14p5 -i 27 -g 2015-09-03
.  bashrc 
dirac-proxy-init -x (needs user cert password)
dirac-configure -F -S GridPP -C dips://dirac01.grid.hep.ph.ic.ac.uk:9135/Configuration/Server -I
dirac-proxy-init -g [your_vo_goes_here]_user -M (e.g. dirac-proxy-init -g comet.j-parc.jp_user -M)

Note: the -r option of the dirac-install command refers to the current DIRAC version. You can check this is up to date by visiting the DIRAC web portal and checking the version number in the bottom-left corner of the browser.

If you see an error like below then you probably are not registered with the dirac instance.

Could not sync dir Cannot get URL for Framework/BundleDelivery in setup MyDIRAC-Production: Option /DIRAC/Setups/MyDIRAC-Production/Framework is not defined

A note on CA certificates

When you install the dirac UI, the script will automatically download a current copy of these certs for you and store them in [dirac_ui_dir]/etc/grid-security/certificates. This will be sufficient for a couple of weeks of testing. If you are planning on using your dirac UI for longer, you need to update these certificates regularly. Most grid sites maintain a current copy of these files somewhere on their systems and you should link to those (try /etc/grid-security/certificates or at Imperial /vols/grid/certificates -- if in doubt ask your friendly sys admin :-) instead.

If there is no regularly maintained set of CAs available, run the following command periodically:

source bashrc; dirac-admin-get-CAs 

It is convenient to this this once per day using a cron job.

Submitting a 'Hello World' job via dirac

Create a proxy

If you don't already have a valid proxy you should create one:

.  bashrc 
dirac-proxy-init -g [your_vo_goes_here]_user -M (e.g. dirac-proxy-init -g comet.j-parc.jp_user -M)


Create a JDL

Now we are ready to create a simple Dirac jdl. Put the lines below into a file Simple.jdl:

[
JobName = "Simple_Job";
Executable = "/bin/ls";
Arguments = "-ltr";
StdOutput = "StdOut";
StdError = "StdErr";
OutputSandbox = {"StdOut","StdErr"};
]

Submit a job

$ dirac-wms-job-submit -f logfile Simple.jdl 
JobID = 236

Check job status:

$ dirac-wms-job-status -f logfile

JobID=236 Status=Waiting; MinorStatus=Pilot Agent Submission; Site=ANY 

and eventually:

$ dirac-wms-job-status -f logfile 
JobID=236 Status=Done; MinorStatus=Execution Complete; Site=LCG.Glasgow.uk;

The jobs can also be monitored using the Web interface. Go to Jobs ->Job monitor You can also submit a job using the Web interface (Tools->Job Launchpad).

Once the job is done, retrieve the output:

$ dirac-wms-job-get-output -f logfile

Back to GridPP Dirac overview page.