This is a framework developed for MC generation in CMSSW 10.2 releases.
Install the latest 10.2 CMSSW release:
export SCRAM_ARCH=slc7_amd64_gcc700
cmsrel CMSSW_10_6_30_patch1
cd CMSSW_10_6_30_patch1/src
cmsenv
git cms-init
Clone the repository from gitlab:
git clone ssh://git@gitlab.cern.ch:7999/mhuwiler/eventgeneration.git
If the above command gives an error 'Permission denied (publickey)', most likely you need to add the ssh key of the machine to your gitlab account. Alternatively, if you don't forsee to push modifications to the repository, you can clone using the https protocol (but will be prompted for authentication should you wish to push modifications):
git clone https://gitlab.cern.ch/mhuwiler/eventgeneration.git
Compile:
scram b -j4
As next step we can go to the EventGeneration framework and extract the configuration (we need a valid grid proxy for that):
cd eventgeneration
voms-proxy-init --voms cms --valid 190:00:00
. makeCFG.sh
Finally, we need to edit the submission configuration 'configFull.py' and make sure it contains your username and inforamtion:
vim configFull.py
In principle, only the 'outLFNDirBase' parameter needs to be modified. You can organise the path to your convenience, but the files will be stored at T2_CSCS, and therefore the path must begin with '/store/user/[username]' i.e. your area. Additional folders are created at stageout time automatically and do not need to exist beforehand.
And finally submit to the Grid:
crab submit -c configFull.py
This will submit, and print instructions on how to monitor the jobs.
Upon submission, the framework prints information on how to monitor the jobs. In particular, it suggests a command of the form:
crab status -d crab_projects/[production name]
Which in turn will show more information about the status of the production. The most useful item is the link to the web monitoring tool under 'Dashboard monitoring URL:', starting with:
Dashboard monitoring URL: https://monit-grafana.cern.ch/d/cmsTMDetail/cms-task-monitoring-task-view?[some stuff]
This will display the status of the jobs and inform about any misbehavours. The two above mentionned command form together the most useful way to monitor the jobs.