-
Notifications
You must be signed in to change notification settings - Fork 217
Update Sherpa to v3 #10572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: IB/CMSSW_20_1_X/master
Are you sure you want to change the base?
Update Sherpa to v3 #10572
Changes from 2 commits
7143712
a940c2d
9fac979
4e006c4
81f96b8
0fd3854
d042bb9
fb7491e
d7c5d6f
10ec62c
0edb2e4
0fa1981
a866189
70ed13e
ee8ada2
2efedb4
8234219
cecea65
03f1371
3f8909a
08db9e8
36d06d7
73d7f82
da090d5
9be746a
55238f6
86ba07a
2a5236d
81de568
922b560
70b1cd9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| ### RPM external libzip 1.11.4 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @shimashimarin , @akritkbehera already have added |
||
| Source: git+https://github.com/nih-at/libzip.git?obj=main/v%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz | ||
| Requires: zlib zstd | ||
| BuildRequires: cmake | ||
|
|
||
| %prep | ||
| %setup -n %{n}-%{realversion} | ||
|
|
||
| %build | ||
| rm -rf build && mkdir build | ||
| cmake -S . -B build \ | ||
| -DCMAKE_INSTALL_PREFIX=%{i} | ||
| cmake --build build %{makeprocesses} | ||
|
|
||
| %install | ||
| cmake --install build | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <tool revision="1"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @shimashimarin , is |
||
| <client> | ||
| <environment name="LIBDIR" default="$TOOL_BASE/lib"/> | ||
| <environment name="INCLUDE" default="$TOOL_BASE/include"/> | ||
| </client> | ||
| <runtime name="PATH" value="$TOOL_BASE/bin" type="path"/> | ||
| <runtime name="ROOT_INCLUDE_PATH" value="$INCLUDE" type="path"/> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| <use name="zlib"/> | ||
| <use name="zstd"/> | ||
| </tool> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| <tool revision="3"> | ||
| <client> | ||
| <environment name="LIBDIR" default="$TOOL_BASE/lib"/> | ||
| <environment name="INCLUDE" default="$TOOL_BASE/include"/> | ||
| <runtime name="CMS_OPENLOOPS_PREFIX" value="$TOOL_BASE" type="path"/> | ||
| </client> | ||
| </tool> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,60 +1,43 @@ | ||
| ### RPM external sherpa 2.2.16 | ||
| Source: git+https://gitlab.com/sherpa-team/sherpa.git?obj=master/v%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz | ||
| Requires: hepmc lhapdf blackhat sqlite python3 fastjet openmpi hepmc3 | ||
| BuildRequires: mcfm swig autotools | ||
| Patch0: sherpa-2.2.16-hepmcshort | ||
| #Avoid calling setenv: https://gitlab.com/sherpa-team/sherpa/-/commit/6ead62d7a2758612f8965fb5b61df8c012cf9cae.diff | ||
| Patch1: sherpa-setenv | ||
| #Disable build Manual and Examples | ||
| Patch2: sherpa-disable-manual | ||
| ### RPM external sherpa 3.0.4 | ||
| Source: git+https://gitlab.com/sherpa-team/sherpa.git?obj=master/v%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz | ||
| Requires: hepmc3 lhapdf blackhat fastjet openmpi rivet pythia8 libzip | ||
| BuildRequires: cmake swig | ||
|
|
||
| %{!?without_openloops:Requires: openloops} | ||
|
|
||
| %prep | ||
| %setup -q -n sherpa-%{realversion} | ||
| %patch0 -p1 | ||
| %patch1 -p1 | ||
| %patch2 -p1 | ||
|
|
||
| autoreconf -i --force | ||
|
|
||
| # Force architecture based on %%cmsplatf | ||
| %ifarch x86_64 | ||
| ARCH_CMSPLATF="-m64" | ||
| %endif | ||
| %setup -q -n %{n}-%{realversion} | ||
|
|
||
| %build | ||
| export PYTHON=$(which python3) | ||
| ./configure --prefix=%i --enable-analysis --disable-silent-rules \ | ||
| --enable-fastjet=$FASTJET_ROOT \ | ||
| --enable-hepmc2=$HEPMC_ROOT \ | ||
| --enable-hepmc3=$HEPMC3_ROOT \ | ||
| --enable-lhapdf=$LHAPDF_ROOT \ | ||
| --enable-blackhat=$BLACKHAT_ROOT \ | ||
| --enable-pyext \ | ||
| --enable-ufo \ | ||
| ${OPENLOOPS_ROOT+--enable-openloops=$OPENLOOPS_ROOT} \ | ||
| --enable-mpi \ | ||
| --with-sqlite3=$SQLITE_ROOT \ | ||
| --enable-analysis \ | ||
| CC="mpicc" \ | ||
| CXX="mpicxx" \ | ||
| MPICXX="mpicxx" \ | ||
| FC="mpifort" \ | ||
| CXXFLAGS="-fuse-cxa-atexit $ARCH_CMSPLATF -O2 -std=c++0x -I$LHAPDF_ROOT/include -I$BLACKHAT_ROOT/include -I$RIVET_ROOT/include" \ | ||
| LDFLAGS="-ldl -L$BLACKHAT_ROOT/lib/blackhat -L$QD_ROOT/lib" | ||
|
|
||
| make %{makeprocesses} | ||
| rm -rf build && mkdir build | ||
|
|
||
| cmake -S . -B build \ | ||
| -DCMAKE_INSTALL_PREFIX=%i \ | ||
| -DSHERPA_ENABLE_MPI=ON -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_Fortran_COMPILER=mpifort \ | ||
| -DSHERPA_ENABLE_ANALYSIS=ON \ | ||
| -DSHERPA_ENABLE_EXAMPLES=ON \ | ||
| -DSHERPA_ENABLE_LIBZIP=ON -DLibZip_DIR=$LIBZIP_ROOT \ | ||
| -DSHERPA_ENABLE_GZIP=ON \ | ||
| -DSHERPA_ENABLE_HEPMC3=ON -DHEPMC3_DIR=$HEPMC3_ROOT -DSHERPA_ENABLE_HEPMC3_ROOT=OFF \ | ||
| -DSHERPA_ENABLE_LHAPDF=ON -DLHAPDF_DIR=$LHAPDF_ROOT -DSHERPA_ENABLE_INTERNAL_PDFS=OFF \ | ||
| -DSHERPA_ENABLE_BLACKHAT=ON -DBLACKHAT_DIR=$BLACKHAT_ROOT \ | ||
| ${OPENLOOPS_ROOT+-DSHERPA_ENABLE_OPENLOOPS=ON -DOPENLOOPS_DIR=$OPENLOOPS_ROOT} \ | ||
| -DSHERPA_ENABLE_ROOT=OFF \ | ||
| -DSHERPA_ENABLE_PYTHIA8=ON -DPYHIA8_DIR=$PYTHIA8_ROOT \ | ||
| -DSHERPA_ENABLE_RECOLA=OFF \ | ||
| -DSHERPA_ENABLE_RIVET=ON -DRIVET_DIR=$RIVET_ROOT \ | ||
| -DSHERPA_ENABLE_EWSUD=ON \ | ||
| -DSHERPA_ENABLE_PYTHON=ON \ | ||
| -DSHERPA_ENABLE_UFO=ON \ | ||
| -DSHERPA_ENABLE_THREADING=ON \ | ||
| -DSHERPA_ENABLE_DIHIGGS=OFF \ | ||
| -DSHERPA_ENABLE_MADLOOP=OFF \ | ||
| -DSHERPA_ENABLE_MCFM=OFF \ | ||
| -DSHERPA_ENABLE_TESTING=OFF \ | ||
| -DSHERPA_ENABLE_INTEGRATION_TESTS=OFF \ | ||
| -DSHERPA_ENABLE_BINRELOC=OFF | ||
| cmake --build build %{makeprocesses} | ||
|
|
||
| %install | ||
| make install | ||
| find %{i}/lib -name '*.la' -delete | ||
| cmake --install build | ||
| sed -i -e 's|^#!/.*|#!/usr/bin/env python3|' %{i}/bin/Sherpa-generate-model | ||
|
|
||
| %post | ||
| %{relocateConfig}lib/python%{cms_python3_major_minor_version}/site-packages/ufo_interface/sconstruct_template | ||
| %{relocateConfig}bin/make2scons | ||
| %{relocateConfig}share/SHERPA-MC/makelibs | ||
| %{relocateConfig}bin/Sherpa-config | ||
| %{relocateConfig}bin/Sherpa-generate-model | ||
| %{relocateConfig}include/SHERPA-MC/ATOOLS/Org/CXXFLAGS*.H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shimashimarin , I think this is not needed if you use the libzip spec from https://github.com/cms-sw/cmsdist/blob/IB/CMSSW_17_0_X/devel/libzip.spec . @akritkbehera mentioned that if few flags are not explicitly turned OFF for libzip then it picks up system bz2lib and that is why rpm dependnecy fails. Please use the libzip from devel branch and remove this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smuzaffar thanks for you comments. I've update libzip.spec and modified related things accordingly