Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions gbl.spec
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
### RPM external gbl V03-01-01
### RPM external gbl V04-00-00
## INCLUDE cpp-standard
## INCLUDE microarch_flags
%define tag 59c2d99ea96bc739321fd251096504c91467be24
Source: git+https://gitlab.desy.de/claus.kleinwort/general-broken-lines.git?obj=main/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz
%define tag 6e60cdf1f1a296ce0a4e08833ebbfa58e9ad2787
Source: git+https://gitlab.desy.de/millepede/general-broken-lines.git?obj=main/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz
Source99: scram-tools.file/tools/eigen/env

BuildRequires: cmake
Requires: eigen
Requires: mille

%prep
%setup -q -n %{n}-%{realversion}
grep -q 'CMAKE_CXX_STANDARD *11' cpp/CMakeLists.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@goblirsc , please do not delete this line. It is there to make sure that the cpp standard substitution we are doing in the next line works. I see that new gbl has default standard 17 ( https://gitlab.desy.de/millepede/general-broken-lines/-/blob/V04-00-00/cpp/CMakeLists.txt?ref_type=tags#L47) , so please add this line back and update the expected standard i.e.

grep -q 'CMAKE_CXX_STANDARD  *17' cpp/CMakeLists.txt

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added lines back and in both cased specified 17 as the standard to replace

sed -i -e 's|CMAKE_CXX_STANDARD *11|CMAKE_CXX_STANDARD %{cms_cxx_standard}|' cpp/CMakeLists.txt
grep -q 'CMAKE_CXX_STANDARD *17' cpp/CMakeLists.txt
sed -i -e 's|CMAKE_CXX_STANDARD *17|CMAKE_CXX_STANDARD %{cms_cxx_standard}|' cpp/CMakeLists.txt

%build
rm -rf build
Expand All @@ -25,6 +26,7 @@ cmake ../cpp \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DEIGEN3_INCLUDE_DIR=${EIGEN_ROOT}/include/eigen3 \
-DSUPPORT_ROOT=False \
-DCMAKE_PREFIX_PATH="%{cmake_prefix_path}" \
-DCMAKE_CXX_FLAGS="$CMS_EIGEN_CXX_FLAGS %{selected_microarch}"

make %{makeprocesses}
Expand Down
30 changes: 30 additions & 0 deletions mille.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
### RPM external mille V01-00-00
## INCLUDE cpp-standard
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@goblirsc , if we do not want to override the c++ standard for mille then there is no need to have this line. The above line only sets the default c++std for cms software stack and packages which are sensitive to c++std can make use of it. So if you need to build mille for default cms c++std then keep this line but then also add -DCMAKE_CXX_STANDARD=%{cms_cxx_standard} to cmake

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, now passing the cms_cxx_standard to CMake

## INITENV +PATH PYTHON3PATH %{i}/python

Source: https://gitlab.desy.de/millepede/Mille/-/archive/%{realversion}/%{n}-%{realversion}.tar.gz
BuildRequires: cmake
Requires: zlib
Requires: root

%prep
%setup -n %{n}-%{realversion}

%build
rm -rf ../build
mkdir ../build
cd ../build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=%{i} \
-DCMAKE_PREFIX_PATH="%{cmake_prefix_path}" \
-DCMAKE_CXX_STANDARD=%{cms_cxx_standard} \
../%{n}-%{realversion}
make %{makeprocesses} VERBOSE=1
%install
cd ../build
make install PREFIX=%{i}

%post
%{relocateConfig}milleStandaloneSetup.sh
%{relocateConfig}cmake/MilleConfig.cmake
25 changes: 20 additions & 5 deletions millepede.spec
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
### RPM external millepede V04-16-00
### RPM external millepede V05-00-00
## INCLUDE cpp-standard
Source: https://gitlab.desy.de/millepede/millepede-ii/-/archive/%{realversion}/%{n}-ii-%{realversion}.tar.gz
Requires: zlib
BuildRequires: cmake
Requires: root
Requires: mille

%prep
%setup -n %{n}-ii-%{realversion}

%build
make \
ZLIB_INCLUDES_DIR="${ZLIB_ROOT}/include" \
ZLIB_LIBS_DIR="${ZLIB_ROOT}/lib"
rm -rf ../build
mkdir ../build
cd ../build
cmake \
-DCMAKE_INSTALL_PREFIX=%{i} \
-DCMAKE_PREFIX_PATH="%{cmake_prefix_path}" \
-DCMAKE_CXX_STANDARD=%{cms_cxx_standard} \
-DLAPACK_OPENBLAS=off \
../%{n}-ii-%{realversion}
make %{makeprocesses} VERBOSE=1

%install
cd ../build
make install PREFIX=%{i}

%post
%{relocateConfig}mp2setup.sh
%{relocateConfig}millepedeIIConfig.cmake
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@goblirsc , can you please remove this line. Looks like this file does not exist and the one in millepede/cmake directory does not contain hard-coded path, so no relocation needed for this file

[a] https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b8b998/51007/external_checks/unknown/millepede.txt

Can't open /cvmfs/cms-ci.cern.ch/week0/PR_6e7d7ce1/el8_amd64_gcc13/external/millepede/V05-00-00-d040191d6d043844785839c288d6eb0d/millepedeIIConfig.cmake: No such file or directory.

2 changes: 1 addition & 1 deletion python_tools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Source: none

Requires: root curl python3 xrootd llvm hdf5 yoda opencv triton-inference-client
Requires: professor2 rivet frontier_client onnxruntime openldap pacparser

Requires: mille
Requires: py3-multidict
Requires: py3-anyio
Requires: py3-sniffio
Expand Down
1 change: 1 addition & 0 deletions scram-tools.file/tools/gbl/gbl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
<environment name="INCLUDE" default="$@TOOL_BASE@/include"/>
</client>
<use name="eigen"/>
<use name="mille"/>
</tool>
15 changes: 15 additions & 0 deletions scram-tools.file/tools/mille/mille.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<tool name="@TOOL@" version="@TOOL_VERSION@" revision="1">
<info url="https://millepede.pages.desy.de/Mille/"/>
<client>
<environment name="@TOOL_BASE@" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$@TOOL_BASE@/lib"/>
<environment name="INCLUDE" default="$@TOOL_BASE@/include"/>
</client>
<runtime name="PATH" value="$@TOOL_BASE@/bin" type="path"/>
<lib name="Mille2"/>
<lib name="MilleC"/>
<use name="sockets"/>
<use name="pcre"/>
<use name="root"/>
<use name="zlib"/>
</tool>
5 changes: 3 additions & 2 deletions scram-tools.file/tools/millepede/millepede.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<tool name="@TOOL@" version="@TOOL_VERSION@" revision="2">
<info url="http://www.wiki.terascale.de/index.php/Millepede_II"/>
<info url="https://millepede.pages.desy.de/millepede-ii/"/>
<client>
<environment name="@TOOL_BASE@" default="@TOOL_ROOT@"/>
</client>
<runtime name="PATH" value="$@TOOL_BASE@/bin" type="path"/>
<use name="sockets"/>
<use name="pcre"/>
<use name="zlib"/>
<use name="root"/>
<use name="mille"/>
</tool>