----------------------- README for macro/prod ----------------------- A set of macros to run various kinds of simulation either locally or submit them for larger amounts of events to Kronos cluster at GSI. See also https://wiki.gsi.de/foswiki/bin/view/Linux/SlurmUsage http://wiki.gsi.de/cgi-bin/view/Linux/GridEngine (outdated) for general description of usage of GSI Gridengine and Slurm and https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootSimulationKronos http://panda-wiki.gsi.de/cgi-bin/viewauth/Computing/PandaRootSimulationPrometheus (outdated) for a nicer look-and-feel of the information given below. ############ CONTENTS ############ - Files in directory - Generator setup - Run locally in shell - Full Simulation - Fast Simulation - Examples - Submit to cluster - Prerequisits - Most important slurm commands - Full Simulation - Fast Simulation - Examples - Resubmission of jobs - Examples - Analysing data - Run locally - Examples - Submission of analysis jobs - Examples ###################### FILES IN DIRECTORY ###################### Simulation - prod_sim.C - prod_aod.C - prod_fsim.C Analysis macros - prod_ana.C - quickana.C Analysis example task (-> https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootRhoTutorial#A_3._Analysis_in_a_Task) - prod_myana.C - PndProdAnaTask.cxx - PndProdAnaTask.h - macroprodLinkDef.h - CMakeLists.txt Example decay file for EvtGen - D0toKpi.dec Scripts to run all automatically - runall_prod.sh Scripts to (re-)submit jobs to Kronos - jobsim_kronos.sh - jobfsim_kronos.sh - resub.pl Script to submit analysis job for many input files - jobana_kronos.sh - anasub.pl Helper macro to merge output - merge.C ################### GENERATOR SETUP ################### When running any kind of simulation, there always is a certain event generator used. The info below explains how the configuration of parameter looks like for all of them. 1. EvtGen: Either = "yourdecayfile.dec" or "yourdecayfile.dec:initialResonance" Example: = "D0toKpi.dec:pbarpSystem" 2. DPM : Keyword DPMx; "DPM" : Inelastic only, "DPM1" : Elastic + inelastic only, "DPM2" : Elastic only 3. FTF : Keyword FTFx; "FTF" : Elastic + inelastic, "FTF1" : Inelastic only (*** The other way around than DPM!! ***) 4. BOX : Configuration string of form "BOX:type[pdg,mult]:p[min,max]:tht[min,max]:phi[min,max]" ######################## RUN LOCALLY IN SHELL ######################## ----------------- Full Simulation ----------------- The full simulation runs in two steps utilizing the macros prod_sim.C and prod_aod.C. The shell script runall_prod.sh runs both. > ./runall_prod.sh with parameters - Prefix for output files - Number of events to simulate - Generator setting (see above) -> Produces output files _sim.root, _par.root, _pid.root in current directory. ----------------- Fast Simulation ----------------- For performing fast simulation, only the macro prod_fsim.C needs to be run. > root -l -b -q prod_fsim.C("", , "", ) with parameters - Prefix for output files - Number of events to simulate - Generator setting (see above) - Beam momentum in GeV/c -> Produces output file _fsim.root current directory. ---------- Examples ---------- Full Sim: > ./runall_prod.sh PiPlus 1000 BOX:type[211,1]:p[0.05,8] > ./runall_prod.sh D0Sim 1000 D0toKpi.dec:pbarpSystem 12. > ./runall_prod.sh DpmBkg 1000 DPM 12. > ./runall_prod.sh FtfInel 1000 FTF1 12. Fast Sim: > root -l -b -q prod_fsim.C("PiPlus", 1000, "BOX:type[211,1]:p[0.05,8]", 15.) > root -l -b -q prod_fsim.C("D0Sim", 1000, "D0toKpi.dec:pbarpSystem", 12.) > root -l -b -q prod_fsim.C("DpmBkg", 1000, "DPM", 12.) > root -l -b -q prod_fsim.C("FtfInel", 1000, "FTF1", 12.) ##################### SUBMIT TO CLUSTER ##################### General information about submitting jobs on the Prometheus/ cluster can be found here: https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootSimulationPrometheus http://wiki.gsi.de/cgi-bin/view/Linux/GridEngine ** For Kronos cluster take a look here: ** https://panda-wiki.gsi.de/foswiki/bin/view/Computing/PandaRootSimulationKronos https://wiki.gsi.de/foswiki/bin/view/Linux/KronosCluster https://wiki.gsi.de/foswiki/bin/view/Linux/SlurmUsage ************************************************************************************************************************** *** In the following the actions to be taken for KRONOS are given only, since Prometheus will be decommissioned soon. *** *** Refer to an older revision of this README file for information about Prometheus usage. *** ************************************************************************************************************************** -------------- Prerequisits -------------- BEFORE being able to submit jobs to Kronos, you have to 1. Login to an lxbk machine by ssh yourname@kronos.hpc.gsi.de locally from a lxpool.gsi.de machine. 2. Create a work directory on the data storage element NYX, e.g. /lustre/nyx/panda/yourname/pandaroot 3. Install PandaRoot in that place, since your GSI linux home directory is not mounted on Kronos nodes. There are several versions of the external packages and FairRoot pre-installed under /cvmfs. Take a look with > ls /cvmfs/fairroot.gsi.de/fairsoft/ > ls /cvmfs/fairroot.gsi.de/fairroot/ and set the environment variables SIMPATH to an appropriate fairsoft and FAIRROOTPATH to a corresponding fairroot version before compiling PandaRoot. ------------------------------- Most important slurm commands ------------------------------- Some nice condensed information about slurm can be found under https://rc.fas.harvard.edu/resources/documentation/convenient-slurm-commands/ - Job array submission with time setting, partition (sth like queue) setting > sbatch --time=01:00:00 --partition=debug --array=1-10 my_slurm_job_script.sh