Running ALICE production with AliEn

To generate Monte-Carlo events and reconstruct these events to produce data in the ESD format you need to prepare a few files:

  • Config. C: this is a root macro where you select the transport model and the associated parameters, the event generator and the associated parameters and the active detectors and their geometries. Several examples can be found in $ALICE_ROOT/macros.
  • sim.C and rec.C : these two root macros wrap the AliSimulation and AliReconstruction classes. They are the steering macros which are called from the aliroot prompt and launch either the simulation or the reconstruction process.
    • sim.C
void sim() {
AliSimulation simu;

TStopwatch timer;
timer.Start();
simu.Run();
timer.Stop();
timer.Print();
}

 

    • rec.C
void rec() {
AliReconstruction reco;
TStopwatch timer;
timer.Start();
reco.Run();
timer.Stop();
timer.Print();
}

 

  • simRun.C: this is the root macro that launches all the tasks to be performed by every job. An example is given next:
// #define VERBOSEARGS
// simrun.C
{ // extract the run and event variables given with --run <x> --event <y>
int nrun = 0;
int nevent = 0;
int seed = 0;
char sseed[1024];
char srun[1024];
char sevent[1024];
sprintf(srun,"");
sprintf(sevent,"");
for (int i=0; i< gApplication->Argc();i++){
#ifdef VERBOSEARGS
printf("Arg %d:  %s\n",i,gApplication->Argv(i));
#endif
if (!(strcmp(gApplication->Argv(i),"--run")))
nrun = atoi(gApplication->Argv(i+1));
sprintf(srun,"%d",nrun);
if (!(strcmp(gApplication->Argv(i),"--event")))
nevent = atoi(gApplication->Argv(i+1));
sprintf(sevent,"%d",nevent);
}
seed = nrun * 100000 + nevent;
sprintf(sseed,"%d",seed);
if (seed==0) {
fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
fprintf(stderr,"!!!!  WARNING! Seeding variable for MC is 0          !!!!\n");
fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
} else {
fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
fprintf(stdout,"!!!  MC Seed is %d \n",seed);
fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
}
// set the seed environment variable
gSystem->Setenv("CONFIG_SEED",sseed);
gSystem->Setenv("DC_RUN",srun);
gSystem->Setenv("DC_EVENT",sevent);
gSystem->Exec("cp $ROOTSYS/etc/system.rootrc .rootrc");
gSystem->Exec("aliroot -b -q sim.C > sim.log 2>&1");
gSystem->Exec("aliroot -b -q rec.C > rec.log 2>&1");
}

 

  • xxx.jdl: this is the job description language (jdl) file where directives are given for the job execution, such as the software versions, where in the AliEn catalog to find the input files (those listed previously), where to put the results, the requirements for the resource broker, the number of events to process,� An example is given below:

 

Executable = "aliroot";
Jobtag={"comment:PDC05 flow events&#65533;, "round::2005&#65533;, "tag:v4-03-04", "type:Flow"};
Packages={"AliRoot::v4-03-04&#65533;, "GEANT3::v1-3"};
TTL = "86400";
Validationcommand ="/alice/cern.ch/user/a/aliprod/production_2005/flow/configs/validation.sh";
Requirements = ( other.CE == "Alice::LCG::Catania" );
InputFile= {"LF:/alice/cern.ch/user/a/aliprod/pdc05_flow/production/configs/Config.C",
"LF:/alice/cern.ch/user/a/aliprod/pdc05_flow/production/configs/simrun.C",          
&#65533;LF:/alice/cern.ch/user/a/aliprod/pdc05_flow/production/configs/sim.C",
"LF:/alice/cern.ch/user/a/aliprod/pdc05_flow/production/configs/rec.C",        
"LF:/alice/cern.ch/user/a/aliprod/pdc05_flow/production/configs/CheckESD.C"};
OutputArchive={"root_archive:*.root@Alice::CERN::Castor2", "log_archive:*.log,stdout,stderr@Alice::CERN::se01"};
OutputDir="/alice/cern.ch/user/a/aliprod/production_2005/flow/output_allfiles/$1/#alien_counter_03i#";
splitarguments="simrun.C --run $1 --event #alien_counter#";
split="production:1-50";
Workdirectorysize={"1500MB"};

Once your files are ready and tested on one event, you have to add all the previously listed files in the AliEn catalogue in a directory of your choice.

 

> alien
Nov 22 11:29:18  info   Warning: cannot create envelope sealing engine = setting backdoor
[aliendb5.cern.ch:3307] /alice/cern.ch/user/s/schutz/ > cd analysis/test/
[aliendb5.cern.ch:3307] /alice/cern.ch/user/s/schutz/analysis/test/ > add test.jdl file test.jdl Alice::Cern::Castor 
Nov 22 11:31:38  info   access: warning - we are using the backdoor ....
Nov 22 11:31:38  info   Registering the file 
file://ccali.in2p3.fr/afs/in2p3.fr/group/alice/schutz/alien/test.jdl in Alice::CCIN2P3::cclcgalice
Nov 22 11:31:38  info   Initializing Service
Nov 22 11:31:38 ApMon[INFO]: Added destination 193.48.99.73:8884: with default options.
Nov 22 11:31:38  info   Contacting SE SE_Alice::CCIN2P3::cclcgalice, and tell it to 
pick up file://ccali.in2p3.fr/afs/in2p3.fr/group/alice/schutz/alien/test.jdl
Nov 22 11:31:38  info   Copying a file into an SE
Nov 22 11:31:42  info   Getting the file 
file://cclcgalice.in2p3.fr/sps/alice/01/13077/2bd8a68a-5b43-11da-9dd6-00096b58e933.1132655501 of size 1161
Nov 22 11:31:42  info   File /alice/cern.ch/user/s/schutz/analysis/test/test.jdl inserted in the catalog
[aliendb5.cern.ch:3307] /alice/cern.ch/user/s/schutz/analysis/test/ > ls
test.jdl

You are now all set to submit the production.

 

ccali28:~> alien login
Nov 17 14:43:01  info   Error contacting the local SE
Nov 17 14:43:01  info   Warning: cannot create envelope sealing engine = setting backdoor
Nov 17 14:43:01  notice Starting remotequeue...
Nov 17 14:43:01  info
[
Requirements = ( other.Type == "Job" );
CloseSE =
{
"Alice::CCIN2P3::cclcgalice"
};
CE = "Alice::CCIN2P3::BQS";
Host = "cclcgalice.in2p3.fr";
LocalDiskSpace = 9000000;
WNHost = "ccali28.in2p3.fr";
Memory = 2054924;
TTL = 112800;
Type = "machine";
Uname = "2.4.21-32.0.1.ELsmp";
FreeMemory = 68024;
Swap = 4192912;
GridPartitions =
{
"SC05"
};
FreeSwap = 3769436
]
[aliendb5.cern.ch:3307] /alice/cern.ch/user/s/schutz/ > submit /alice/cern.ch/user/s/schutz/analysis/test/test.jdl 99
Nov 22 11:41:36  info   Submitting job '/alice/bin/aliroot '...
Nov 22 11:41:37  info   Checking if the packages GEANT3::v1-3 AliRoot::v4-03-04 are defined in the system
Nov 22 11:42:03  info   The PackMan has the following packages:
admin@AliRoot::v4-03-05
admin@GEANT::v1-1
aliprod@ROOT::4.03.02
VO@AliRoot::4.02.07
VO@AliRoot::v4-02-Rev-01
VO@AliRoot::v4-03-03
VO@AliRoot::v4-03-04
VO@GEANT3::2.1
VO@GEANT3::v1-1
VO@GEANT3::v1-3
VO@ROOT::4.03.02
VO@ROOT::v4-04-02
VO@ROOT::v5-02-00
Nov 22 11:42:03  info   Job is going to be splitted for production, running from 1 to 5
Nov 22 11:42:03  info   Input Box: {CheckESD.C Config.C rec.C sim.C simrun.C}
Nov 22 11:42:04  info   Command submitted (job 57943)!!
[aliendb5.cern.ch:3307] /alice/cern.ch/user/s/schutz/analysis/test/ >

Remember the job id. It is mandatory to follow the execution of your production. This is also the id you have to provide to the expert in the unlikely case where something is going wrong.

 

[aliendb5.cern.ch:3307] /alice/cern.ch/user/s/schutz/ > ps &#65533;rs &#65533;id 57943
schutz     57943   RS            /alice/bin/aliroot
schutz     -57944  ST            /alice/bin/aliroot
schutz     -57945  ST  00        /alice/bin/aliroot
schutz     -57946  ST  00        /alice/bin/aliroot
schutz     -57947  ST  00        /alice/bin/aliroot
schutz     -57948  ST  00        /alice/bin/aliroot
aliendb5.cern.ch:3307] /alice/cern.ch/user/s/schutz/ > ps &#65533;WAs &#65533;id  57943
57943   -production:1-5-subjobs--                                                               /alice/bin/aliroot RS  0 :0 :0 .0
-57944  Alice::Prague::PBS            goliasx85.farm.particle.cz     goliasx31.farm.particle.cz /alice/bin/aliroot ST  0 :0 :4 .30
-57945  Alice::Prague::PBS            goliasx85.farm.particle.cz     goliasx31.farm.particle.cz /alice/bin/aliroot ST  0 :0 :4 .33
-57946  Alice::LCG::Torino            egee-wn122.torinoegee          alibox.to.infn.it          /alice/bin/aliroot ST  0 :0 :0 .43
-57947  Alice::LCG::Torino            egee-wn110.torinoegee          alibox.to.infn.it          /alice/bin/aliroot ST  0 :0 :0 .44
-57948  Alice::LCG::Torino            egee-wn122.torinoegee          alibox.to.infn.it          /alice/bin/aliroot ST  0 :0 :0 .33

If for any reasons an entire job or one or more subjobs failed you can resubmit it and only the failed jobs will be reprocessed:

 

[aliendb5.cern.ch:3307] /alice/cern.ch/user/s/schutz/ > masterJob 57943 resubmit

The command masterJob has several more functionalities: provide information on all subjobs, kill jobs, merge,� (see man masterJob)

 

 



bottom

You are here