Skip to content

Run batch jobs on local machine

thnam edited this page Nov 24, 2014 · 6 revisions

Chen provided a tool to run batch jobs. The source code of the script is in ./bin/.

Settings for the batch should be define in a text file, like in: https://github.com/alcap-org/g4sim/blob/master/alcap/scripts/run_config/Al100_1.09

MAGFIELDCARDROOT = mag/MagField_none
GENFILEROOT = gen/gen_mu_1.09       -> settings for primary particles
OUTCARDROOT = output/output_Al100   -> output branches, units, ...
GEOCARDROOT = geometry_Al100        -> geometry, sensitive detectors
#macro
#macro_configure_PreSet
#Al100.mac
#run
run_configure
5                                   -> number of parallel jobs in each run
500000                              -> number of events in each job

The path for outputs is defined in the environment variable: $MYDATA

export MYDATA=alcap/output

To submit the batch, use:

bg4sim_sub -t sim -b 0 -e 1 -Y SiR2_1.30 test

Options are explained in: https://github.com/alcap-org/g4sim/blob/master/bin/bg4sim_sub#L56-L73

The outputs will be placed in $MYDATA/test. There are several log files and the ROOT files are *.raw. The settings of the batch are also copied over.

@nam-mac:run_config nam $ ls $MYDATA/test
0_job0.raw             configure              sim_test_0.txt.boss    sim_test_0.txt.bosslog sim_test_1.txt.bosserr
1_job0.raw             macros                 sim_test_0.txt.bosserr sim_test_1.txt.boss    sim_test_1.txt.bosslog
Clone this wiki locally