Last active
December 22, 2022 06:19
-
-
Save ram1123/df1776d2007331897045ab9fa73cf8dc to your computer and use it in GitHub Desktop.
condor script for slc6 for generating gridpack and CMSSW simulation. Reference: Ankita Mehta and Alexander Grohsjean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| request_cpus = 1 | |
| request_memory = 4GB | |
| request_disk = 4GB | |
| executable = /afs/cern.ch/user/r/rasharma/work/slc6_condor/generate_events.sh | |
| output = /afs/cern.ch/user/r/rasharma/work/slc6_condor/$(ClusterId).out | |
| error = /afs/cern.ch/user/r/rasharma/work/slc6_condor/$(ClusterId).out | |
| getenv = FALSE | |
| should_transfer_files = NO | |
| +RequestRuntime = 3600 | |
| +JobFlavour = "workday" | |
| queue 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| request_cpus = 1 | |
| request_memory = 4GB | |
| request_disk = 4GB | |
| executable = /afs/cern.ch/user/r/rasharma/work/slc6_condor/generate_gridpack.sh | |
| output = /afs/cern.ch/user/r/rasharma/work/slc6_condor/$(ClusterId).out | |
| error = /afs/cern.ch/user/r/rasharma/work/slc6_condor/$(ClusterId).out | |
| getenv = FALSE | |
| should_transfer_files = NO | |
| +RequestRuntime = 3600 | |
| +JobFlavour = "workday" | |
| queue 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| cd ${_CONDOR_SCRATCH_DIR} | |
| cat <<'EndOfFile' > execute.sh | |
| #!/bin/bash | |
| source /cvmfs/cms.cern.ch/cmsset_default.sh | |
| export SCRAM_ARCH=slc6_amd64_gcc481 | |
| if [ -r CMSSW_7_1_25_patch1/src ] ; then | |
| echo release CMSSW_7_1_25_patch1 already exists | |
| else | |
| scram p CMSSW CMSSW_7_1_25_patch1 | |
| fi | |
| cd CMSSW_7_1_25_patch1/src | |
| eval `scram runtime -sh` | |
| # Download fragment from McM | |
| curl -s -k https://cms-pdmv.cern.ch/mcm/public/restapi/requests/get_fragment/B2G-RunIISummer15wmLHEGS-00261 --retry 3 --create-dirs -o Configuration/GenProduction/python/B2G-RunIISummer15wmLHEGS-00261-fragment.py | |
| scram b | |
| cd ../.. | |
| EVENTS=10 | |
| # Random seed between 1 and 100 for externalLHEProducer | |
| SEED=23123 | |
| # cmsDriver command | |
| cmsDriver.py Configuration/GenProduction/python/B2G-RunIISummer15wmLHEGS-00261-fragment.py --python_filename B2G-RunIISummer15wmLHEGS-00261_1_cfg.py --eventcontent RAWSIM,LHE --customise SLHCUpgradeSimulations/Configuration/postLS1Customs.customisePostLS1,Configuration/DataProcessing/Utils.addMonitoring --datatier GEN-SIM,LHE --fileout file:B2G-RunIISummer15wmLHEGS-00261.root --conditions MCRUN2_71_V1::All --beamspot Realistic50ns13TeVCollision --customise_commands process.RandomNumberGeneratorService.externalLHEProducer.initialSeed="int(${SEED})" --step LHE,GEN,SIM --magField 38T_PostLS1 --mc -n $EVENTS | |
| cp B2G-RunIISummer15wmLHEGS-00261.root /afs/cern.ch/user/r/rasharma/work/slc6_condor/. | |
| EndOfFile | |
| # Make file executable | |
| chmod +x execute.sh | |
| export SINGULARITY_CACHEDIR="/tmp/$(whoami)/singularity" | |
| singularity run -B /afs -B /cvmfs -B /usr/libexec/condor -B /pool --no-home docker://cmssw/slc6:latest $(echo $(pwd)/execute.sh) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| cat <<'EndOfFile' > execute.sh | |
| #!/bin/bash | |
| source /cvmfs/cms.cern.ch/cmsset_default.sh | |
| cd /afs/cern.ch/user/r/rasharma/work/slc6_condor/mg265/bin/MadGraph5_aMCatNLO | |
| # clean up gridpack | |
| rm -rf wplustest_5f_LO* | |
| #generate gridpack | |
| ./gridpack_generation.sh wplustest_5f_LO cards/examples/wplustest_5f_LO | |
| # copy to final destination | |
| mv wplustest_5f_LO*tarball.tar.xz /afs/cern.ch/user/r/rasharma/work/slc6_condor/. | |
| EndOfFile | |
| # Make file executable | |
| chmod +x execute.sh | |
| export SINGULARITY_CACHEDIR="/tmp/$(whoami)/singularity" | |
| singularity run -B /afs -B /cvmfs -B /usr/libexec/condor -B /pool --no-home docker://cmssw/slc6:latest $(echo $(pwd)/execute.sh) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment