cms-sw / cmssw

CMS Offline Software
http://cms-sw.github.io/
Apache License 2.0
1.05k stars 4.23k forks source link

`USER_SCRAM_TARGET` does not work in a development area #44947

Open fwyzard opened 3 weeks ago

fwyzard commented 3 weeks ago

Setting USER_SCRAM_TARGET=x86-64-v3 works if used directly within an IB, but it does not work if used with a development area.

base IB

$ cd /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02836/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_X_2024-05-09-2300
$ export USER_SCRAM_TARGET=x86-64-v3
$ cmsenv
IMPORTANT: Setting CMSSW environment to use 'x86-64-v3' target.
$ echo $LD_LIBRARY_PATH | tr : \\n | grep x86-64-v3
/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02836/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_X_2024-05-09-2300/biglib/el9_amd64_gcc12/scram_x86-64-v3
/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02836/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_X_2024-05-09-2300/lib/el9_amd64_gcc12/scram_x86-64-v3
/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02836/el9_amd64_gcc12/cms/cmssw/CMSSW_14_1_X_2024-05-09-2300/external/el9_amd64_gcc12/lib/scram_x86-64-v3

development area

$ cmsrel CMSSW_14_1_X_2024-05-09-2300
WARNING: Developer's area is created for non-production architecture el9_amd64_gcc12. Production architecture for this release is el8_amd64_gcc12
$ cd CMSSW_14_1_X_2024-05-09-2300/
$ export USER_SCRAM_TARGET=x86-64-v3
$ cmsenv
$ echo $LD_LIBRARY_PATH | tr : \\n | grep x86-64-v3

x86-64-v3 does not show up.

fwyzard commented 3 weeks ago

assign core

cmsbuild commented 3 weeks ago

New categories assigned: core

@Dr15Jones,@makortel,@smuzaffar you have been requested to review this Pull request/Issue and eventually sign? Thanks

fwyzard commented 3 weeks ago

FYI @VinInn

cmsbuild commented 3 weeks ago

cms-bot internal usage

cmsbuild commented 3 weeks ago

A new Issue was created by @fwyzard.

@rappoccio, @antoniovilela, @smuzaffar, @sextonkennedy, @makortel, @Dr15Jones can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

smuzaffar commented 3 weeks ago

@fwyzard , CMSSW_14_1_X IBs are configured to not change the micro-archs in dev area. As mentioned in the core sw meeting, you need to run the following to force change this behaviour

scram b enable-multi-targets
export USER_SCRAM_TARGET=auto cmsenv
OR
export USER_SCRAM_TARGET=x86-64-v3 cmsenv

In CMSSW_14_1_MULTIARCHS_X dev area setting export USER_SCRAM_TARGET=x86-64-v3 should be enough to use x86-64-v3

fwyzard commented 3 weeks ago

I see, thanks.

Why do we need to do both

scram b enable-multi-targets

and

export USER_SCRAM_TARGET=auto cmsenv

?

Can we make the first imply the second ?

smuzaffar commented 2 weeks ago

Can we make the first imply the second ?

just to not have user accidently pick up x86-64-v3 micro-arch when switching between dev areas (MULTIARCHS and Default IBs's dev area). Note that scram b enable-multi-targets makes persistent changes in the dev area.

fwyzard commented 2 weeks ago

just to not have user accidently pick up x86-64-v3 micro-arch when switching between dev areas (MULTIARCHS and Default IBs's dev area).

Sure.

What I meant is, can we make scram b enable-multi-targets also change the default target to auto ?