Skip to content
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

Hydjet integration as external #5412

Merged
merged 14 commits into from Jul 22, 2020
1 change: 1 addition & 0 deletions cmssw-tool-conf.spec
Expand Up @@ -45,6 +45,7 @@ Requires: hepmc-toolfile
Requires: heppdt-toolfile
Requires: herwig-toolfile
Requires: herwigpp-toolfile
Requires: hydjet-toolfile
Requires: ittnotify-toolfile
Requires: jemalloc-toolfile
Requires: jemalloc-debug-toolfile
Expand Down
23 changes: 23 additions & 0 deletions hydjet-toolfile.spec
@@ -0,0 +1,23 @@
### RPM external hydjet-toolfile 1.0
Requires: hydjet
%prep

%build

%install

mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/hydjet.xml
<tool name="hydjet" version="@TOOL_VERSION@">
<lib name="hydjet"/>
<client>
<environment name="HYDJET_BASE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$HYDJET_BASE/lib"/>
</client>
<use name="pyquen"/>
<use name="pythia6"/>
<use name="lhapdf"/>
</tool>
EOF_TOOLFILE

## IMPORT scram-tools-post
20 changes: 20 additions & 0 deletions hydjet.spec
@@ -0,0 +1,20 @@
### RPM external hydjet 1.9.1

Source: http://cern.ch/lokhtin/hydro/%{n}-%{realversion}.tar.gz

BuildRequires: cmake
Copy link
Contributor

Choose a reason for hiding this comment

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

please also add build dependency on gmake otherwise it will pick system gmake.

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 for advice. But, does it matter?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes it does, some times we end up in env (e.g. docker containers with minimal package installation) where gmake is not available via system

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I mean does it matter gmake, make, or ninja tool is used?

Copy link
Contributor

Choose a reason for hiding this comment

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

it depends, if you have run cmake to use ninja then you need to add dependency on ninja otheriwse default is make (which is available via our gmake.spec) and for that you need to add dependency on gmake.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank You for Your explanation!


Requires: pyquen pythia6 lhapdf


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

%build

cmake . -DCMAKE_INSTALL_PREFIX=%i -DCMAKE_BUILD_TYPE=Release -DPYQUEN_DIR=${PYQUEN_ROOT} -DPYTHIA6_DIR=${PYTHIA6_ROOT} -DLHAPDF_ROOT_DIR=${LHAPDF_ROOT}
cmake --build . --clean-first -- %{makeprocesses}

%install

cmake --build . --target install -- %{makeprocesses}
4 changes: 2 additions & 2 deletions pyquen.spec
@@ -1,4 +1,4 @@
### RPM external pyquen 1.5.3
### RPM external pyquen 1.5.4

Source: http://lokhtin.web.cern.ch/lokhtin/%{n}/%{n}-%{realversion}.tar.gz

Expand All @@ -17,4 +17,4 @@ cmake --build . --clean-first -- %{makeprocesses}

%install

cmake --build . --target install --clean-first -- %{makeprocesses}
cmake --build . --target install -- %{makeprocesses}