conda-forge / geant4-feedstock

A conda-smithy repository for geant4.
BSD 3-Clause "New" or "Revised" License
8 stars 9 forks source link

Inconsistent dataset versions in geant4 11.2.2 package #65

Open tkittel opened 1 month ago

tkittel commented 1 month ago

Solution to issue cannot be found in the documentation.

Issue

The hardwired dataset dependencies in the meta.yaml have not been updated properly in the Geant4 11.2.2 package, and do not reflect the versions from https://github.com/Geant4/geant4/blob/v11.2.2/cmake/Modules/G4DatasetDefinitions.cmake . For instance, the ABLA package should be version 3.3, but we find:

geant4                    11.2.2          py312h4fe601b_0    conda-forge
geant4-data-abla          3.1                           0    conda-forge
geant4-data-emlow         8.2                  hd8ed1ab_0    conda-forge
geant4-data-ensdfstate    2.3                  hd8ed1ab_0    conda-forge
geant4-data-incl          1.0                           0    conda-forge
geant4-data-ndl           4.7                  hd8ed1ab_0    conda-forge
geant4-data-particlexs    4.0                  hd8ed1ab_0    conda-forge
geant4-data-photonevaporation 5.7                  hd8ed1ab_0    conda-forge
geant4-data-pii           1.3                           1    conda-forge
geant4-data-radioactivedecay 5.6                  hd8ed1ab_0    conda-forge
geant4-data-realsurface   2.2                  hd8ed1ab_0    conda-forge
geant4-data-saiddata      2.0                           0    conda-forge

It seems that the geant4-config command is actually able to spot this, so perhaps one would be able to setup a unit test based on this, or something else? I.e. add a test in the geant4-feedstock meta.yaml, to catch these inconsistencies? But in the short term it would be nice to simply try to update the versions.

$> geant4-config --check-datasets
G4NDL NOTFOUND /home/tkittel/scr/miniforge3/envs/sb/share/Geant4/data/G4NDL4.7.1
G4EMLOW NOTFOUND /home/tkittel/scr/miniforge3/envs/sb/share/Geant4/data/G4EMLOW8.5
PhotonEvaporation INSTALLED /home/tkittel/scr/miniforge3/envs/sb/share/Geant4/data/PhotonEvaporation5.7
RadioactiveDecay INSTALLED /home/tkittel/scr/miniforge3/envs/sb/share/Geant4/data/RadioactiveDecay5.6
G4PARTICLEXS NOTFOUND /home/tkittel/scr/miniforge3/envs/sb/share/Geant4/data/G4PARTICLEXS4.0
G4PII NOTFOUND /home/tkittel/scr/miniforge3/envs/sb/share/Geant4/data/G4PII1.3
RealSurface INSTALLED /home/tkittel/scr/miniforge3/envs/sb/share/Geant4/data/RealSurface2.2
G4SAIDDATA NOTFOUND /home/tkittel/scr/miniforge3/envs/sb/share/Geant4/data/G4SAIDDATA2.0
G4ABLA NOTFOUND /home/tkittel/scr/miniforge3/envs/sb/share/Geant4/data/G4ABLA3.3
G4INCL NOTFOUND /home/tkittel/scr/miniforge3/envs/sb/share/Geant4/data/G4INCL1.2
G4ENSDFSTATE NOTFOUND /home/tkittel/scr/miniforge3/envs/sb/share/Geant4/data/G4ENSDFSTATE2.3

Installed packages

not relevant

Environment info

not relevant
tkittel commented 1 month ago

I opened a PR with (hopefully) a suggested fix.

tkittel commented 1 month ago

One issue is that the G4NDL dataset needed a new package version as well, so if someone could please go and merge this PR: https://github.com/conda-forge/geant4-data-ndl-feedstock/pull/3

Then afterwards hopefully the tests in https://github.com/conda-forge/geant4-feedstock/pull/66 will be able to complete succesfully.

tkittel commented 1 month ago

@chrisburr / @tschoonj could one of you have a look please?

tkittel commented 1 month ago

@chrisburr @tschoonj could you have a look on the first PR please? conda-forge/geant4-data-ndl-feedstock#3

tkittel commented 1 month ago

Thanks for merging the ndl PR @tschoonj ! With that, the geant4-feedstock PR #66 now also passes all tests, so it would be great if you could merge that as well :-)

tkittel commented 1 month ago

So one side effect of the updated geant4-data-ndl package is that since the version number now included a patch digit (4.7.1 versus the previous 4.7), the old geant4-11.1.3 package now installs ndl-4.7.1 and not ndl-4.7 as it should. This is apparently because 4.7 actually means 4.7.* rather than 4.7.0 in conda logic. In glorious hindsight, it would have been useful for Geant4 data sets to always use three digits for their versions (perhaps something to consider upstream @drbenmorgan since it seems like something that might creep up again also for other distribution channels?). But right now it means that the situation unfortunate situation is this:

$> conda install -c conda-forge geant4  #-> gives Geant4 11.2.2 but with several wrong dataset versions
$> conda install -c conda-forge geant4==11.1.3  #-> gives Geant4 11.1.3 but with the NDL data set version wrong

Going forward, I guess the geant4-feedstock's meta.yaml should always add a trailing .0 to the versions of the dataset dependencies which has only 2 digits.

For now, @chrisburr and @tschoonj could we PLEASE merge #66 A.S.A.P. so "conda install -c conda-forge geant4" once again gives something self-consistent and working?

Also, I would love to be added as a maintainer as well, so I could more easily fix these little details (of course, I am happy to have a conversation or video chat about it first if you wish).

tkittel commented 1 month ago

I am now getting other errors as well in downstream project, because even pinning to 11.1.3 is not always a solution - these older packages drag in sysroot_linux-64 2.12 (as opposed to 2.17) and there are linking errors as a consequence.