Updates for Rivet - Yoda, Fastjet, Cgal env var#5245
Updates for Rivet - Yoda, Fastjet, Cgal env var#5245cholmcc wants to merge 2 commits intoalisw:masterfrom
Conversation
- FastJet and YODA export `FASTJET_ROOT` and `YODA_ROOT`, respectively - Rivet build-requires `cgal` so that `CGAL_ROOT` _values_ in `rivet-config` and `rivet-build` gets properly substituted at build-time with references to environment variable `CGAL_ROOT` at run-time See also comment at alisw#5221
|
The failed test on build/O2/alidist-ubuntu2204 seems not related to your modifications. |
Nor is the failure of |
|
Hi all, Any news on this? Thanks. Yours, |
|
@ktf could you please approve this? All checks have passed succesfully |
|
Why do you need the extra _ROOT variables as part of the environment? In general if that is the case it means something else is wrong. Could you elaborate? |
|
Hi Guilio,
OK, I'll try. When the Rivet module is build two shell-scripts are generated
Both of these scripts need to know where to find 3rd party software, such as fastjet, HepMC3, and CGAL, so that they may report the appropriate flags. The Rivet build system (Autotools) automatically adds the appropriate values set at build-time to the scripts. F.ex., if HepMC3 is found in (not exactly, but you get the point). However, we would like to make the scripts "relocatable" in the sense that they should depend on the environment used at run-time (as opposed to build-time). To do that. the Rivet recipe does a that is, the scripts will contain In that way, when the user calls these script, his or her current environment is taken into account. I believe a similar approach is taken in other recipes. It was certainly in the Rivet recipe before. Yours, |
|
You should not use the _ROOT variables, those are not guaranteed to be there, e.g. in the case you want aliBuild pick up cgal / fastjet / hepmc from the system or in case you want to provide a script which does not need to be built using aliBuild. The safest way to do that at runtime would be to modify rivet-config to do use:
this is the only way one can guarantee that the correct externals are picked up, regardless of how they are built. Unless there is some major problem with this approach, I would prefer we do not pollute the runtime environment with _ROOT variables (yes, I know there is a few already, but those are mostly for our own software which you cannot install otherwise). |
|
Hi Guilio, Changing Perhaps the best way to do this is to dump a shell-script fragment with the above code into Yours, |
|
I appreciate it's more complicated. All I am saying is that there is no guarantee that the _ROOT variables will be there, neither at runtime nor a build time, because packages might be built outside of aliBuild or picked up from the system and we do support that. |
|
Hi all, The pull request succeeded, and I believe it will fix the original run-time issue. Please let me know when it is deployed on LXPLUS so I can test it. Thanks. Yours, |
) * Update rivet.sh - set 3rd party paths via script, not `_ROOT` env See #5245 * Update rivet.sh - fixed wrong name Whoops, `grep`'ed for `cgal` where I wanted to grep for `GMP`. * Update rivet.sh - deduce variables at build-time as well as at run-time Following discussion on this MR, I made some changes so that at build-time, we deduce variables in same way as done at run-time (uses the same script snippet). The script snippet has been made more robust, and will exit out (build, rivet-config, rivet-build) in case of problems. If variables are set before hand (e.g., `HEPMC3_ROOT` is already set), then that value is used as-is. * Update rivet.sh - try to fix error in rivet_3rdparty.sh See 'env_err' test variables with 'ret=true', likely needed to make the 'source rivet_3rdparty.sh' command fly.
|
Ciao @cholmcc I believe there's still something not right with CGAL, i tried to run Rivet on the GRID and the CGAL library was still nowhere to be found. I kinda got a bit lost of all the modifications. I saw that this pull request has been succesfully merged, is this one required to make things work properly. I fear something else is missing other than the require building (I'm simply loading AliGenerators on the GRID). |
|
Ciao @ktf the problem unfortunately is still valid. Marco |
|
I'm working on the issue and trying to fix stuff locally (at first). Adding |
|
I tried multiple solution @cholmcc but I wasn't able to get out of the rabbit hole using your script. Do you have any suggestion on how to get the proper PATH? @ktf maybe you can help on this as well, the easiest solution would be to get the LD_LIBRARY_PATH containing the cgal library and feeding it to the ./configure of the rivet build. |
|
Hi Marco, Just recapping, since it's been a while. The problem is, that the wrong path for CGAL and GMP are set on the scripts Now, in the after the full build. Here,
which are
but not for The million-$ question is then: Why? From the above, it looks like on the builder host. So I can do to get the proper thing. That is, if I do what
which doesn't seem right (i.e., So how to fix it. Well, I think I need a bit more to go on before I can figure it out. What I would do is to add a bit of output from the My suspicion is that
If this is correct, then the proper solution is to fix My question for you: If I make some changes to Yours, |
…rivet-config`, `rivet-build`, and - I suspect - `fastjet-config`. See also alisw#5245 for a discussion. Note, the `rivet.sh` script is set up to explicitly fail - thus hopefully allowing me to see the log output. This is work-in-progress.
|
@cholmcc I approved the review in the PR #5245 , you covered all the missing points in your last message. I had seen the same behaviour related to the /local/workspace path set for GMP and CGAL, I believe this might caused by the fact that both programs do not have a configuring script by default, such as yoda-config to be clear. My two cents... |
…isw#5264) * Update rivet.sh - set 3rd party paths via script, not `_ROOT` env See alisw#5245 * Update rivet.sh - fixed wrong name Whoops, `grep`'ed for `cgal` where I wanted to grep for `GMP`. * Update rivet.sh - deduce variables at build-time as well as at run-time Following discussion on this MR, I made some changes so that at build-time, we deduce variables in same way as done at run-time (uses the same script snippet). The script snippet has been made more robust, and will exit out (build, rivet-config, rivet-build) in case of problems. If variables are set before hand (e.g., `HEPMC3_ROOT` is already set), then that value is used as-is. * Update rivet.sh - try to fix error in rivet_3rdparty.sh See 'env_err' test variables with 'ret=true', likely needed to make the 'source rivet_3rdparty.sh' command fly.
FASTJET_ROOTandYODA_ROOT, respectivelycgalso thatCGAL_ROOTvalues inrivet-configandrivet-buildgets properly substituted at build-time with references to environment variableCGAL_ROOTat run-timeSee also comment at
#5221