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

external lib for HYDJET++ #7483

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions cmssw-tool-conf.spec
Expand Up @@ -41,6 +41,7 @@ Requires: heppdt
Requires: herwig
Requires: herwig7
Requires: hydjet
Requires: hydjet2
Requires: ittnotify
Requires: jemalloc
Requires: jemalloc-debug
Expand Down
20 changes: 20 additions & 0 deletions hydjet2.spec
@@ -0,0 +1,20 @@
### RPM external hydjet2 2.x.y
Copy link
Contributor

Choose a reason for hiding this comment

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

please provide the exact version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we put here the link to the actual version instead of hardcoded number?

Copy link
Contributor

Choose a reason for hiding this comment

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

what do you mean ? can you please give an example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Something like

RPM external hydjet2 version

where the variable version would be determined from the link to the json file on the author's site, or just from the some text file, placed on the author's website.
Mayby ### RPM external hydjet2 http://..../version
Would it work?

Copy link
Contributor

Choose a reason for hiding this comment

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

no, it will not work. One needs to explicitly provide the version to be used here and then you can use the version to auto generate the source url e.g.

### RPM externals hydjet2 2.4.3
Source: http://cern.ch/lokhtin/hydjet++/%{n}-%{realversion}.tar.gz

So in future when you update the version to e.g. 2.4.4 then package system will try to download http://cern.ch/lokhtin/hydjet++/hydjet2-2.4.4.tar.gz

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But only after PR, right? I'm looking a way to avoid of necessity to make PR for every minor update of HYDJET++

Copy link
Contributor

@smuzaffar smuzaffar Dec 2, 2021

Choose a reason for hiding this comment

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

We do not want our build system to automatically pick up new updates which can break the whole release. imagine that we have tested one version in IBs and when we want to build a release then author updates the version which can break the whole system.

When there is a new version then it should be explicitly requested, tested via PR before we integrate it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I see, thanks!


Source: http://cern.ch/lokhtin/hydjet++/%{n}.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

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

the URL http://cern.ch/lokhtin/hydjet++/hydjet2.tar.gz is very generic and our packaging system is not going to redownload it when you need to update the version. Can you please provide separate tar files for each version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At the author's site is just one version for the new HYDJET++ - the actual one. This naming policy implies to move all outdated version to other links/tarballs. The author is the member of CMS HI, since very beginning and he was updating PYQUEN and HYDJETs focusing primarily on the interests of the CMS. As far as I understand, during compiling of each CMSSW version, the external archive downloaded from the source website, so if author will update the version, it will be available for the next CMSSW version. It's ok for CMS HI group, we always need the more actual version on top.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or You mean difficulties related to the backport for the new version?

Copy link
Contributor

Choose a reason for hiding this comment

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

For each version of a package there should be a unique url. If author just keeps on updating http://cern.ch/lokhtin/hydjet++/hydjet2.tar.gz (pointing to latest version) then there is no guarantee that two cmssw builds will have the same contents. I have no issues with http://cern.ch/lokhtin/hydjet++/hydjet2.tar.gz pointing to latest version but there should link for specific versions too e.g. http://cern.ch/lokhtin/hydjet++/hydjet2-%{version}.tar.gz and this should be used in our spec files.

Copy link
Contributor

Choose a reason for hiding this comment

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

Note that cmsBuild ( our packaging system) also caches the contents of each source URL. So cmsBuild will always use the previously cached contents if url itself is not changed.

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 see, thanks. I will ask for this changes.


BuildRequires: cmake gmake

Requires: pyquen pythia6 lhapdf root


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

%build

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

%install

cmake --build . --target install -- %{makeprocesses}
10 changes: 10 additions & 0 deletions hydjet2/doc.txt
@@ -0,0 +1,10 @@
- Requested, AddedBy:
@wouf

- PR:
https://github.com/cms-sw/cmsdist/pull/7483

- Description:
{hydjet2} is event generator for simulation of relativistic heavy ion AA collisions as a superposition of the soft, hydro-type state and the hard, multi-parton state.
- Documentation
http://cern.ch/lokhtin/hydjet++/documentation/
11 changes: 11 additions & 0 deletions scram-tools.file/tools/hydjet2/hydjet2.xml
@@ -0,0 +1,11 @@
<tool name="hydjet2" version="@TOOL_VERSION@">
<lib name="hydjet2"/>
<client>
<environment name="HYDJET2_BASE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$HYDJET2_BASE/lib"/>
</client>
<use name="pyquen"/>
<use name="pythia6"/>
<use name="lhapdf"/>
<use name="root"/>
</tool>