PhenoGrid logo

Running Herwig++ 2.0


Herwig++ 2.0 has been installed in Phenogrid's VO software area on a few grid sites. The following instructions show you how to run a Herwig++ job. We assume that you have registered for Phenogrid already.


Job control will happen through a JDL file. A very simple working one can look like the following example, called herwig-run.jdl:

# herwig-run.jdl
Executable = "";
# Arguments = "-foo -bar";
# Environment = {"FOO=A", "BAR=B"};
StdOutput = "run.out";
StdError = "run.err";
OutputSandbox = {"run.out","run.err","output.tar.gz"};
InputSandbox = {""};
Requirements = Member("VO-pheno-herwig-2-0-0",other.GlueHostApplicationSoftwareRunTimeEnvironment);

The first field names the executable that is to be run, we will send a script along with the job. The Sandbox fields name the files that are to be sent along with the job request, and the job output. The last field checks for a published VO tag VO-pheno-herwig-2-0-0 which identifies all sites where Herwig++-2.0 has been installed successfully.

Other useful requirement lines are restriction to a certain CE

Requirements =  RegExp("", other.GlueCEUniqueId);

or a request for at least 24h wall clock time (LCG sites publish this field in minutes)

Requirements = other.GlueCEPolicyMaxWallClockTime > 1440;

Requirements can be combined using the usual boolean operators:

Requirements = (other.GlueCEPolicyMaxWallClockTime > 1440) 
               && RegExp("", other.GlueCEUniqueId);

The script to be sent along ( can be very simple:

#! /bin/bash

source $VO_PHENO_SW_DIR/etc/profile.d/

cp $VO_PHENO_SW_DIR/share/Herwig++/*.in .

Herwig++ init
Herwig++ read
Herwig++ run -N100

tar czvf $CURRENTDIR/output.tar.gz LHC.log LHC.out

Please note the source line. The file contains all the necessary PATH and library settings to get the installed code to work. In the last line a tarball is created to make the transfer of the output easier to handle.

Instead of fetching the output through the OutputSandbox, the tarball could also be sent to Grid storage, using the lcg-cr command:

export LFC_HOME=/grid/pheno

lfc-mkdir myUsername/hw_output
lcg-cr --vo pheno -d lfn:myUsername/hw_output/output.tar.gz  file:$CURRENTDIR/output.tar.gz

In this case, output.tar.gz can be left out of the OutputSandbox line in the JDL file.

Job submission

First, you need to obtain a proxy certificate that will authenticate you for this session:

voms-proxy-init -voms pheno

To check if the job can run anywhere, try

glite-wms-job-list-match herwig-run.jdl

The output will list some computing elements that match all criteria listed in the JDL file.

To submit, use

glite-wms-job-submit -o jobID herwig-run.jdl

The unique job ID will be added to the file jobID.

To check the status, you can use

glite-wms-job-status -i jobID

Once the job has finished, the output sandbox can be retrieved by

glite-wms-job-output -i jobID

Proxy server

default the proxy certificate is valid for 12 hours. For jobs taking longer than that, you will need to use a proxy server. To create a server certificate, run

myproxy-init -s -d -n
To check on the status, use
myproxy-info -s -d

The JDL file must contain information about the proxy server. Add the line

MyProxyServer = "";

to your JDL file.