Skip to content
Open
Show file tree
Hide file tree
Changes from 6 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
8 changes: 4 additions & 4 deletions gbl.spec
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
### 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

%build
Expand Down
25 changes: 25 additions & 0 deletions mille.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### 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

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_INSTALL_PREFIX=%{i} \
../
make

%install
cd build
make install PREFIX=%{i}
Copy link
Contributor

Choose a reason for hiding this comment

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

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

to avoid building in the source tree and also build in parallel & verbose modemake %{makeprocesses} VERBOSE=1

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, done


%post
%{relocateConfig}cmake/MilleConfig.cmake
22 changes: 17 additions & 5 deletions millepede.spec
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
### 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} \
-DLAPACK_OPENBLAS=off \
../
make
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, build outside the source tree i.e. try using ../build and also update cmake configuration to explicitly set CMAKE_PREFIX_PATH and CMAKE_BUILD_TYPE . Update make to run in parallel

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 - should be fixed in the latest commit


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

%post
%{relocateConfig}cmake/millepedeIIConfig.cmake
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>