Added by Jan Strube, last edited by Jan Strube on May 11, 2009  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

Preliminary

CERN and the LHC are putting a lot of resources into the LHC computing grid. In times of dwindling ILC support, it seems prudent to take advantages of these resources.

Installing the SiD software

  • Obtain a grid certificate.
  • Become a member of the DESY ilc VO
  • Apply for the role of lcgadmin with the ilc VO http://grid.desy.de/ilc/
  • obtain a proxy with voms-proxy-init --voms ilc:/ilc/Role=lcgadmin --key ${HOME}/.mycertificates/ilckey.pem --cert ${HOME}/.mycertificates/ilccert.pem

The installation is done by a shell script

installOnGrid.sh
#!/bin/bash                                                                                     
# *************** Downloading the execuatbles **************************************            
lcg-cp srm://srm-ilc.gridpp.rl.ac.uk/castor/ads.rl.ac.uk/prod/ilc/tape/supplemental/slic_v2r5p3_geant4_v9r1p02_i686_linux-gnu_plus_sid02_plus_lcdd_plus_boost.tar.bz2 file:slic_v2r5p3_geant4_v9r1p02_i686_linux-gnu_plus_sid02_plus_lcdd_plus_boost.tar.bz2                                                                                          

lcg-cp srm://srm-ilc.gridpp.rl.ac.uk/castor/ads.rl.ac.uk/prod/ilc/tape/supplemental/jre.tar.gz file:jre.tar.gz
lcg-cp srm://srm-ilc.gridpp.rl.ac.uk/castor/ads.rl.ac.uk/prod/ilc/tape/supplemental/lcsim-1.5-deps.zip file:lcsim-1.5-deps.zip                                                                                                      

    
FILEDIR=$(pwd)

# ************** SLiC *****************************
mkdir ${VO_ILC_SW_DIR}/sidsoft/
mkdir ${VO_ILC_SW_DIR}/sidsoft/LOI
cd  ${VO_ILC_SW_DIR}/sidsoft/LOI

tar -xjf ${FILEDIR}/slic_v2r5p3_geant4_v9r1p02_i686_linux-gnu_plus_sid02_plus_lcdd_plus_boost.tar.bz2

# ************** The reconstruction Drivers *******************

mkdir ${VO_ILC_SW_DIR}/sidsoft/LOI/lcsimDrivers
mv ${FILEDIR}/*.class ${VO_ILC_SW_DIR}/sidsoft/LOI/lcsimDrivers

# ******************** lcsim libraries ********************************
mkdir  ${VO_ILC_SW_DIR}/sidsoft/LOI/lcsim
cd  ${VO_ILC_SW_DIR}/sidsoft/LOI/lcsim
unzip ${FILEDIR}/lcsim-1.5-deps.zip

# ******************** jre *******************************
cd  ${VO_ILC_SW_DIR}/sidsoft/LOI
tar -xzf ${FILEDIR}/jre.tar.gz

# ******************* setting up the init script ******************
cd ${VO_ILC_SW_DIR}
cat > setup_sidsoft.sh << EOF
export SIMDIST=\${VO_ILC_SW_DIR}/sidsoft/LOI/SimDist
export PATH=\${VO_ILC_SW_DIR}/sidsoft/LOI/jre/bin:\${PATH}
export JAVA_HOME=\${VO_ILC_SW_DIR}/sidsoft/LOI/jre

for jar in \${VO_ILC_SW_DIR}/sidsoft/LOI/lcsim/lib/*.jar
do
    CLASSPATH=\${jar}:\${CLASSPATH}
done
CLASSPATH=.:\${VO_ILC_SW_DIR}/sidsoft/LOI/lcsimDrivers:\${CLASSPATH}
export CLASSPATH
EOF
installOnGrid.jdl
Executable = "installSLICOnTheGrid.sh";
StdOutput = "std.out";
StdError = "std.err";
InputSandbox = {"installSLICOnTheGrid.sh", "eventCounter.class", "LeptonIDDriver.class", "PFA_And_LeptonIDDriver.class"};
OutputSandbox = {"std.out", "std.err"};
Requirements = other.GlueCEPolicyMaxCPUTime > 2000 &&
               other.GlueCEPolicyMaxWallClockTime > 2400 &&
               RegExp(".gridpp.rl.ac.uk", other.GlueCEUniqueId);
eventCounter.java
import java.io.File;                                       
import java.io.IOException;                                
import org.lcsim.util.loop.LCSimLoop;
import hep.io.stdhep.StdhepReader;


public class eventCounter {
    public static void printUsage() {
        System.out.println("Usage: eventCounter <filename>");
        System.out.println("<filename> has to end in slcio or stdhep");
    }


    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        if (args.length > 1) {
            printUsage();
            return;
        }
        try {
            if (args[0].endsWith(".stdhep")) {
                StdhepReader reader = new StdhepReader(args[0]);
                System.out.printf("%s: %d\n", args[0], reader.getNumberOfEvents());
            } else if (args[0].endsWith(".slcio")) {
                LCSimLoop loop = new LCSimLoop();
                File input = new File(args[0]);
                loop.setLCIORecordSource(input);
                System.out.printf("%s: %d\n", args[0], loop.loop(-1));
            }
        } catch (Exception e) {
                System.err.println("Error opening file " + args[0]);
        }
    }
}

Running on the LCG

Each VO has an area at each site where they can install software. The reconstruction software for SiD is made available by setting the environment. This can be done with
source ${VO_ILC_SW_DIR}/setup_sidsoft.sh
The sid software consists of

  • a Java 1.6 Jre
  • org.lcsim 1.5
  • the SLiC v2r5p3_geant4_v9r1p02 distribution
  • the sid02 detector