IlcVo

From Linear_Collider_LAPP

Jump to: navigation, search

Utilisation de la VO ILC sur la grille EGEE


Contents

Demande de certificat CNRS GRID2

http://igc.services.cnrs.fr/GRID2-FR/?lang=fr&cmd=certificates&type=usercert

Demande d'ajout de son certificat dans la VO ILC

https://grid-voms.desy.de:8443/voms/ilc

Enregistrement du certificat sur lappsl5.

http://lappwiki01.in2p3.fr/LHCB-LAPP/index.php/Grid_certificat#How_to_store_your_certificate_on_lappsl.2C_lxplus_and_all_linux_machines


Définition du File Cataclog a DESY

setenv LFC_HOST grid-lfc.desy.de

Sid, slic software

Exemple de script python pour ganga

Ceci execute le shell script qui suit pour les particules de la liste ( particles ) Il commence par créer un fichier de configuration qui contient les variables d'environnements nécessaires.

#!/bin/env python

import os
import os.path

#####################################################
def writeConfig(path,dico):
   fichier = open(path,"w")
   for key, value in dico.items():
       ligne = "export " + key + "=" + value + "\n" 

       fichier.writelines(ligne)
   fichier.close()
##################################################### 


#####################################################
# Create config file for environement
def createConfigFile(path,variables):
    if os.path.exists(path):
        os.remove(path)
    writeConfig(path, variables)
 
 
###################################################
#Start main program
variables = {}
va riables['GEOMETRY']="protoWAbs_24mmPitchAlCover"
variables['ENERGY']  =".02"
variables['NBEVENTS']="1"
variables['RUN_NUM'] ="Run499"
variables['PHYSLIST']="QGSP_BERT"
configFile = "./config.txt" 
#lcddFile = "/data3/calcul/jacquem/working_dir/Grid/ILC/RunSlic/" + variables['GEOMETRY'] + ".lcdd"
lcddFile  = "/lapp_data/LC/Detecteurs/Sid/detectors/" + variables['GEOMETRY'] + "/geom/" + variables['GEOMETRY'] + ".lcdd"


# Launch a job by particle in following list
for particle in ( "pi-" , "pi+"):
    variables['PARTICLE']=particle
    createConfigFile(configFile,variables)
    ######################################################
    #Create Grid Job for ganga
    j=Job()
           
    StdOutput     = "std.out"
    StdError      = "std.err"
    OutputSandbox = ["std.out","std.err","log.tar.gz"]
    InputSandbox  = [lcddFile, configFile]
   
    Requirements = ['RegExp("desy*:*", other.CEId)']
    #Requirements = ['RegExp("lapp*:*", other.CEId)']
    LCGreq=LCGRequirements(other=Requirements)
   
    sExecutableFileName="run_slic_prod_egee.sh"
    j.application = Executable(exe=File(sExecutableFileName), args=[])
   
    j.inputsandbox = InputSandbox
    j.outputsandbox = OutputSandbox
   
    j.name="run_slic_prod_egee.sh"
   
    j.backend=LCG(
        requirements=LCGreq
        )
   
    print j
   
    j.submit()


Exemple de script bash qui execute une simulation slic

Ce script est exécuté sur le noeud de calcul de la grille


#!/usr/bin/env bash


source ${VO_ILC_SW_DIR}/setup_sidsoft.sh
export EXE=${VO_ILC_SW_DIR}/sidsoft/LOI/SimDist/scripts/slic.sh 
#LAPP# export EXE=/grid_sw/soft-dev-lc/SimDist/scripts/slic.sh

echo "more ./config.txt"
more ./config.txt

echo "source ./config.txt"
source ./config.txt

export EVENTS=${GEOMETRY}_${PARTICLE}_${ENERGY}GeV_${NBEVENTS}evt_${PHYSLIST}_${RUN_NUM}
export LOG=./${EVENTS}.log

# for batch mode:
echo "${EXE} >>${LOG} -n ..."
${EXE} >>${LOG} -n <<EOF

# select physics list
/physics/select ${PHYSLIST}
#/physics/select LCPhys

#/run/particle/setCut 0.1 mm
#/run/particle/applyCuts
#/run/particle/dumpCutValues

/run/setCut 1 mm
#/run/setCutForRegion GasRegion 0.1 mm
/lcdd/url ${GEOMETRY}.lcdd

/lcio/path .
#/lcio/path
/lcio/filename ${EVENTS}
/lcio/fileExists overwrite

/run/initialize
/generator/select gps
/gps/particle ${PARTICLE}
/gps/energy ${ENERGY} GeV
/gps/position 5 5 -180 mm
/gps/pos/sigma_x 0 cm
/gps/pos/sigma_y 0 cm
/gps/direction 0 0 1 

#/process/eLoss/fluct false
#/process/inactivate Hadronic

/vis/scene/create
/vis/heprep/useSolids 1
/vis/scene/add/volume
/vis/scene/add/hits
/vis/scene/add/trajectories
/vis/sceneHandler/attach
/vis/drawTree

#/vis/open OGLIX
/vis/viewer/panTo ! .7
/vis/viewer/zoom 2
/vis/viewer/set/viewpointThetaPhi 90 0 
#/tracking/verbose 1 
/run/verbose 2 
/random/seed
/run/beamOn ${NBEVENTS} 
exit
EOF


echo "pwd"
pwd
echo " "

echo "ls -lrt"
ls -lrt
echo " "
 
 
 

 # Create Geometry directory
 echo "lfc-mkdir -p /grid/ilc/users/jacquem/slic_prod/${GEOMETRY}"
 lfc-mkdir -p /grid/ilc/users/jacquem/slic_prod/${GEOMETRY}
 
 #Copy result file slcio to geometry directoruy
 echo "lcg-cr --vo ilc -l lfn:/grid/ilc/users/jacquem/slic_prod/${GEOMETRY}/${EVENTS}.slcio -d srm://dcache-se- desy.desy.de/pnfs/desy.de/ilc/users/jacquem/slic_prod/${
GEOMETRY}/${EVENTS}.slcio $PWD/${EVENTS}.slcio"
 lcg-cr --vo ilc -l lfn:/grid/ilc/users/jacquem/slic_prod/${GEOMETRY}/${EVENTS}.slcio -d srm://dcache-se-   desy.desy.de/pnfs/desy.de/ilc/users/jacquem/slic_prod/${GEOMETRY}/${EVENTS}.slcio $PWD/${EVENTS}.slcio
 echo " "

 #Copy slic log to geometry directory
 echo "lcg-cr --vo ilc -l lfn:/grid/ilc/users/jacquem/slic_prod/${GEOMETRY}/${LOG} -d srm://dcache-se-desy.desy.de/pnfs/desy.de/ilc/users/jacquem/slic_prod/${GEOMETRY}
/${LOG} $PWD/${LOG}"
 lcg-cr --vo ilc -l lfn:/grid/ilc/users/jacquem/slic_prod/${GEOMETRY}/${LOG} -d srm://dcache-se-desy.desy.de/pnfs/desy.de/ilc/users/jacquem/slic_prod/${GEOMETRY}/${LOG} $PWD/${LOG}
 echo " "
 
 # compress log to get it into outup sandbox 
 echo "tar zxvf log.tar.gz $LOG"
 tar zcvf log.tar.gz $LOG
 echo " "

Commande pour récupérer vos fichiers a la fin du job

lcg-cp lfn:/grid/ilc/users/jacquem/jacquem_protoWAbs_24mmPitchAlCoverpi-200GeV1evtQGSP_BERTRun499.slcio ./mydestinationFile.slcio


GBS

GBS Doxygen documentation

http://lappweb.in2p3.fr/LC/Misc/GBS/doxygen/index.html



Liste des résultats de simulations sur la Grille au CC

( commande lfc-ls /grid/ilc/users/blaha/slic_prod )

  • CubMeter2_PbAbs
  • CubMeter2_WAbs
  • protoWAbs_24mmPitchAlCover
  • protoWAbs_24mmPitchFeCover
  • protoWAbs_30mmPitchAlCover
  • protoWAbs_30mmPitchFeCover
  • protoWMixAbs_30mmPitchFeCover
  • sid2Modules_FeAbs_1cmFeP
  • sid2Modules_FeAbs_2cmFeP
  • sid2Modules_FeAbs_2cmFeP_WE
  • sid2Modules_FeAbs_NoFeP
  • sidModule_BrassAbs
  • sidModule_FeAbs
  • sidModule_FeAbs_PAT
  • sidModule_FeAbs_TBP


Fichiers brutes sur la grille

/grid/calice/SDHCAL/TB/CERN/SPS_May2012/RAW

prompt%> lfc-ls /grid/calice/SDHCAL/TB/CERN/SPS_May2012/RAW
 or
promtp%> lcg-ls  lfn:/grid/calice/SDHCAL/TB/CERN/


Copier un fichier

prompt%> lcg-cp lfn:/grid/calice/SDHCAL/TB/CERN/SPS_May2012/RAW/DHCAL_714698_I3_0.slcio ./DHCAL_714698_I3_0.slcio
Personal tools