diff --git a/.sites_map.json b/.sites_map.json new file mode 100644 index 00000000..c3568e4f --- /dev/null +++ b/.sites_map.json @@ -0,0 +1 @@ +{"T0_CH_CERN_Disk": {"/+store/t0streamer/(.*)": "root://eoscms.cern.ch//eos/cms/store/t0streamer/$1?eos.app=cmst0", "/+store/(.*)": "root://eoscms.cern.ch//eos/cms/tier0/store/$1?eos.app=cmst0"}, "T1_DE_KIT_Disk": "root://cmsxrootd-kit-disk.gridka.de:1094/", "T1_ES_PIC_Disk": "root://xrootd-cmst1-door.pic.es:1094//pnfs/pic.es/data/cms/disk", "T1_FR_CCIN2P3_Disk": "root://ccxrdcms.in2p3.fr:1094/pnfs/in2p3.fr/data/cms/disk/data", "T1_IT_CNAF_Disk": "root://xrootd-cms.infn.it:1194/", "T1_RU_JINR_Disk": "root://xrootd01.jinr-t1.ru:1094//pnfs/jinr-t1.ru/data/cms", "T1_UK_RAL_Disk": "root://rdr.echo.stfc.ac.uk/", "T1_US_FNAL_Disk": {"/+store/temp/user/(.*)": "root://cmseos.fnal.gov//eos/uscms/store/temp/user/$1", "/+store/(.*)": "root://cmsdcadisk.fnal.gov//dcache/uscmsdisk/store/$1"}, "T2_AT_Vienna": "root://eos.grid.vbc.ac.at:1094//eos/vbc/experiments/cms", "T2_BE_IIHE": {"/+(.*)": "root://maite.iihe.ac.be:1095//$1"}, "T2_BR_SPRACE": "root://osg-se.sprace.org.br:1094/", "T2_BR_UERJ": "root://xrootd.hepgrid.uerj.br:1094/", "T2_CH_CERN": "root://eoscms.cern.ch//eos/cms", "T2_CH_CSCS": "root://storage01.lcg.cscs.ch:1096//pnfs/lcg.cscs.ch/cms/trivcat", "T2_CN_Beijing": "root://cceos.ihep.ac.cn:1094//eos/ihep/cms", "T2_DE_DESY": {"/+(.*)": "root://dcache-cms-xrootd.desy.de:1094//$1"}, "T2_DE_RWTH": "root://grid-cms-xrootd.physik.rwth-aachen.de:1094/", "T2_EE_Estonia": "root://xrootd.hep.kbfi.ee:1094/", "T2_ES_CIEMAT": "root://gaexrdoor.ciemat.es:1094/", "T2_ES_IFCA": "root://gridftp.ifca.es/", "T2_FI_HIP": "root://hip-cms-se.csc.fi:1094/", "T2_FR_IPHC": "root://sbgdcache.in2p3.fr/", "T2_HU_Budapest": "root://grid143.kfki.hu:1094/", "T2_IN_TIFR": "root://se01.indiacms.res.in//dpm/indiacms.res.in/home/cms", "T2_IT_Legnaro": "root://t2-xrdcms.lnl.infn.it:7070/", "T2_KR_KISTI": "root://cms-t2-se01.sdfarm.kr:1094/", "T2_PK_NCP": "root://pcncp22.ncp.edu.pk:1094//dpm/ncp.edu.pk/home/cms", "T2_PL_Swierk": "root://se.cis.gov.pl:1094//grid/cms", "T2_PT_NCG_Lisbon": "root://xroot02.ncg.ingrid.pt:1094/", "T2_RU_IHEP": "root://dp0015.m45.ihep.su:1094/", "T2_RU_INR": "root://grse001.inr.troitsk.ru:1094/", "T2_RU_ITEP": "root://se3.itep.ru/", "T2_RU_JINR": "root://lcgsexrd.jinr.ru:1095/", "T2_TR_METU": "root://eymir.grid.metu.edu.tr//dpm/grid.metu.edu.tr/home/cms", "T2_TW_NCHC": "root://se01.grid.nchc.org.tw//cms", "T2_UA_KIPT": "root://cms-se0.kipt.kharkov.ua//dpm/kipt.kharkov.ua/home/cms", "T2_UK_London_Brunel": "root://dc2-grid-64.brunel.ac.uk:11001/", "T2_UK_London_IC": "root://gfe02.grid.hep.ph.ic.ac.uk:1094//pnfs/hep.ph.ic.ac.uk/data/cms", "T2_UK_SGrid_Bristol": "root://xrootd.phy.bris.ac.uk:1094//xrootd/cms", "T2_UK_SGrid_RALPP": "root://mover.pp.rl.ac.uk:1094/pnfs/pp.rl.ac.uk/data/cms", "T2_US_Caltech": "root://xrootd-redir.ultralight.org:1094/", "T2_US_Florida": "root://cmsio2.rc.ufl.edu:1094/", "T2_US_MIT": "root://xrootd.cmsaf.mit.edu:1094/", "T2_US_MIT_Buffer": "root://tapexrd.cmsaf.mit.edu:1094/", "T2_US_Nebraska": "root://xrootd-local.unl.edu:1094/", "T2_US_Purdue": "root://eos.cms.rcac.purdue.edu/", "T2_US_UCSD": "root://redirector.t2.ucsd.edu:1095/", "T2_US_Vanderbilt": "root://xrootd-vanderbilt.sites.opensciencegrid.org:1094/", "T2_US_Wisconsin": "root://cmsxrootd.hep.wisc.edu:1094/", "T3_BG_UNI_SOFIA": "root://se01.grid.uni-sofia.bg:1094//dpm/grid.uni-sofia.bg/home/cms", "T3_BY_NCPHEP": "root://grid05.hep.by//cms", "T3_CH_CERN_OpenData": {"/+store/data/(.*)": "root://eospublic.cern.ch//eos/opendata/cms/$1", "/+store/(.*)": "root://eospublic.cern.ch//eos/opendata/cms/$1"}, "T3_CH_PSI": "root://t3se01.psi.ch:1094/", "T3_FR_IPNL": "root://lyogrid06.in2p3.fr//dpm/in2p3.fr/home/cms/data", "T3_HU_Debrecen": "root://dpm.grid.atomki.hu/", "T3_IN_TIFRCloud": "root://se01.indiacms.res.in//dpm/indiacms.res.in/home/cms", "T3_IN_VBU": "root://storage.vb-ehep.in//dpm/vb-ehep.in/home/cms", "T3_IR_IPM": "root://se1.hep.ipm.ir//data", "T3_IT_Perugia": "root://cream-bdii.pg.infn.it//storage/cms", "T3_IT_Trieste": "root://cmsxrd.ts.infn.it:1094/", "T3_KR_KISTI": "root://cms-xrdr.sdfarm.kr:1094//xrd", "T3_KR_KNU": "root://cluster142.knu.ac.kr:1094/", "T3_KR_UOS": "root://cms.sscc.uos.ac.kr:1094/", "T3_MX_Cinvestav": "root://proton.fis.cinvestav.mx/", "T3_RU_MEPhI": "root://cms.lxfarm.mephi.ru//lustre/cms/phedex", "T3_TW_NCU": "root://ncusmstor1.grid.sinica.edu.tw:1094//eos/cms", "T3_US_Baylor": "root://kodiak-se.baylor.edu:1094/", "T3_US_Brown": "root://pbrux30cit.hep.brown.edu:1094/", "T3_US_Colorado": "root://hepxrd01-colorado.sites.opensciencegrid.org:1094/", "T3_US_FNALLPC": "root://cmseos.fnal.gov//eos/uscms", "T3_US_MIT": "root://submit50.mit.edu:1094/", "T3_US_NotreDame": "root://deepthought.crc.nd.edu/", "T3_US_OSG_SoCal_Cache": "root://xcache.ultralight.org:3040/", "T3_US_PuertoRico": "root://cms-se.hep.uprm.edu/", "T3_US_Rice": "root://bonner04.rice.edu:1094/", "T3_US_Rutgers": "root://ruhex-osgce.rutgers.edu/", "T3_US_UMD": "root://hepcms-se2.umd.edu:1094/", "T3_US_UMiss": "root://umiss005.hep.olemiss.edu:1094//cms/", "T3_US_VC3_NotreDame": "root://deepthought.crc.nd.edu/", "T3_US_CMU": "root://cmsdata.phys.cmu.edu/", "T3_IT_MIB": "root://storm.mib.infn.it:1094/", "T3_CH_CERNBOX": {"/+store/user/(.)(.*)": "root://eosuser.cern.ch//eos/user/$1/$1$2"}, "T3_CY_UCY": "root://heptaur2.ucy.ac.cy:1094/", "T2_PL_Cyfronet": "root://se02.grid.cyfronet.pl:11001//dpm/grid.cyfronet.pl/home/cms", "T3_TW_TIDC": "root://tidc-smstor1.grid.sinica.edu.tw:1094//eos/cms"} \ No newline at end of file diff --git a/DY_test.txt b/DY_test.txt new file mode 100644 index 00000000..dd086215 --- /dev/null +++ b/DY_test.txt @@ -0,0 +1,2 @@ +/DYto2L-2Jets_MLL-10to50_TuneCP5_13p6TeV_amcatnloFXFX-pythia8/phys_btag-Run3Summer22EEMiniAODv4-130X_mcRun3_2022_realistic_postEE_v6-v2_BTV_Run3_2022_Comm_MINIAODv4-4a2854fb74f99b3d858963d8c4993237/USER +/DYto2L-2Jets_MLL-50_TuneCP5_13p6TeV_amcatnloFXFX-pythia8/phys_btag-Run3Summer22EEMiniAODv4-130X_mcRun3_2022_realistic_postEE_v6-v2_BTV_Run3_2022_Comm_MINIAODv4-4a2854fb74f99b3d858963d8c4993237/USER diff --git a/README.md b/README.md index faa1b99c..a9357fc9 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Detailed documentation in [btv-wiki](https://btv-wiki.docs.cern.ch/SoftwareAlgor ### Setup :heavy_exclamation_mark: suggested to install under `bash` environment - +:heavy_exclamation_mark: :heavy_exclamation_mark: not fully supported in EL9 machines yet, recommended to run in EL7 or EL8 ``` # only first time, including submodules git clone --recursive git@github.com:cms-btv-pog/BTVNanoCommissioning.git @@ -23,19 +23,19 @@ git clone --recursive git@github.com:cms-btv-pog/BTVNanoCommissioning.git # activate enviroment once you have coffea framework conda activate btv_coffea ``` -### Coffea installation with Miniconda -For installing Miniconda, see also https://hackmd.io/GkiNxag0TUmHnnCiqdND1Q#Local-or-remote +### Coffea installation with Micromamba +For installing Micromamba, see [[here](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html)] ``` -wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh +wget -L micro.mamba.pm/install.sh # Run and follow instructions on screen -bash Miniconda3-latest-Linux-x86_64.sh +bash install.sh ``` -NOTE: always make sure that conda, python, and pip point to local Miniconda installation (`which conda` etc.). +NOTE: always make sure that conda, python, and pip point to local micromamba installation (`which conda` etc.). -You can simply create the environment through the existing `test_env.yml` under your conda environment, and activate it +You can simply create the environment through the existing `test_env.yml` under your micromamba environment using micromamba, and activate it ``` -conda env create -f test_env.yml -conda activate btv_coffea +micromamba env create -f test_env.yml +micromamba activate btv_coffea ``` Once the environment is set up, compile the python package: diff --git a/runner.py b/runner.py index 6141d600..d72f7404 100644 --- a/runner.py +++ b/runner.py @@ -394,7 +394,30 @@ def get_main_parser(): condor_extra.append(f"export PATH={pathvar}:$PATH") else: condor_extra.append(f"cd {os.getcwd()}") - condor_extra.append(f'conda activate {os.environ["CONDA_PREFIX"]}') + + # Check if Conda is available + conda_check_command = "command -v conda" + conda_available = os.system(conda_check_command) == 0 + + # Check if Mamba is available + mamba_check_command = "command -v micromamba" + mamba_available = os.system(mamba_check_command) == 0 + + # Set up environment based on availability + if conda_available and mamba_available: + use_conda = True # Set to False if you prefer Micromamba + if use_conda: + condor_extra.append(f'conda activate {os.environ["CONDA_PREFIX"]}') + else: + condor_extra.append(f"micromamba activate {os.environ['MAMBA_EXE']}") + elif conda_available: + condor_extra.append(f'conda activate {os.environ["CONDA_PREFIX"]}') + elif mamba_available: + condor_extra.append(f"micromamba activate {os.environ['MAMBA_EXE']}") + else: + # Handle the case when neither Conda nor Micromamba is available + print("Neither Conda nor Micromamba is available in the environment. At least install one of them.") + ######### # Execute if args.executor in ["futures", "iterative"]: diff --git a/setup.cfg b/setup.cfg index 7d99703d..4dffc29b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,7 +35,7 @@ project_urls = packages = find: install_requires = vector - coffea>=0.7.20 + coffea==0.7.22 python_requires = <3.11