geant4: new version 10.6 plus simplifications#15447
geant4: new version 10.6 plus simplifications#15447drbenmorgan merged 9 commits intospack:developfrom
Conversation
ChristianTackeGSI
left a comment
There was a problem hiding this comment.
Going to look at the geant4/geant4-data part tomorrow.
| def setup_dependent_run_environment(self, env, dependent_spec): | ||
| install_path = join_path(prefix.share, 'data', 'G4ABLA{0}' |
There was a problem hiding this comment.
Does this actually work?
Where is just prefix set?
Could you try this?
| def setup_dependent_run_environment(self, env, dependent_spec): | |
| install_path = join_path(prefix.share, 'data', 'G4ABLA{0}' | |
| def setup_dependent_run_environment(self, env, dependent_spec): | |
| install_path = join_path(self.prefix.share.data, 'G4ABLA{0}' |
| def url_for_version(self, version): | ||
| """Handle version string.""" | ||
| return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4INCL.%s.tar.gz" % version) No newline at end of file |
There was a problem hiding this comment.
Is this really needed? Will the normal version interpolation into url really fail?
There was a problem hiding this comment.
Unfortunately yes, due to the use of . between the package name and version, combined with the name including a number. Spack interprets the version as 4INCL.X.Y.
Add new 10.6.0 release, migrating download of source to use Geant4's public release repo on CERN GitLab. Change versioning scheme to use clearer and standard semantic scheme. Update geant4-data and g4XXX data packages with new versions. Migrate geant4-data as a BundlePackage of the g4XXX packages, installing links to each under a single directory under share for geant4-data. Ensure each g4XXX package exports the environment variable pointing to its location expected by Geant4. Remove "data" variant from Geant4 package and always use geant4-data. Simplify cxxstd variant transport to dependencies.
Geant4 major.minor versions have specific dependencies on vecgeom versions. Add missing vecgeom version for geant4 10.5, and match version requirements for vecgeom in geant4 depends_on.
7149b92 to
3d8807b
Compare
|
Now rebased on |
|
O.k., I've done basic install tests and defaults seem to work fine. I think this is ready for final review checks and tests. |
ChristianTackeGSI
left a comment
There was a problem hiding this comment.
Looks good.
I didn't test it yet.
| url = url + 'ReleaseNotes4.{0}.{1}.html'.format(version[0], version[1]) | ||
| return url | ||
| for s in spec.dependencies(): | ||
| for d in glob.glob('{0}/share/data/*'.format(s.prefix)): |
There was a problem hiding this comment.
Maybe use s.prefix.share to be more consistent with the rest of the patch?
|
|
||
| # install the data with geant4 | ||
| datadir = spec['geant4-data'].prefix.share | ||
| dataver = 'geant4-data-{0}'.format(spec['geant4-data'].version) |
There was a problem hiding this comment.
Maybe to be consistent with the setup in geant4-data?
| dataver = 'geant4-data-{0}'.format(spec['geant4-data'].version) | |
| dataver = '{0}-{1}'.format(spec['geant4-data']..name, spec['geant4-data'].version.dotted) |
Also I wonder, if geant4-data could have a property/value that could be used here?
|
Looking at python's @property
def geant4_datadir(self):
verdir = '{0}-{1}'.format(self.name, self.version.dotted)
return join_path(self.prefix.share, 'data', verdir)UNTESTED! |
|
Thanks @ChristianTackeGSI and @sethrj for the review! I think I've addressed these in the latest commits, so barring flake8 errors and any further comments, I think this is good for merge. |
|
Whilst the coverage checks are failing, the changes in this PR aren't (at least obviously) touching Spack's core, which the coverage handles (thanks to @alalazo for the info). I'm going to merge in this case (and I'm maintainer of these packages, so I'll get pinged if there are issues!). |
* origin/develop: packages.yaml: allow virtuals to specify buildable: false (#14934) GMT: add 6.0.0 (#15785) autoconf-archive: add new package (#15782) JasPer: add 2.0.16 (#15781) Update link for codecov's browser extensions (#15779) geant4: new version 10.6 plus simplifications (#15447) ppOpen-APPL/FVM: new package. (#15772)
This is a fairly major refactor and simplification of Geant4 and its associated data packages, and will changes hashes of previous installs. I think this is worthwhile for long term maintenance of the package, so this PR is "Draft" for now to get early eyes on it and discuss with interested parties.
The primary change is the removal of the
datavariant so the physics model data packages are always installed by theg4XXXpackages, then used by Geant4 itself through thegeant4-datapackage.geant4-datais now aBundlePackagewhose version maps to that ofgeant4and depends on theg4XXXpackages at the exact versions thegeant4version supports. It creates a "view" (more on that later) of the data so Geant4's install mechanisms sees a single directory. Eachg4XXXpackage also now sets the appropriate runtime environment.I believe removal of the
datavariant is worthwhile as the external data is platform/arch independent, so really benefits reuse and reducing install sizes.The second breaking change is to move the versioning to "standard" semantic versioning, so
10.6.0rather than10.06.p00. This is just to make the packaging cleaner and simple, plus the use of the Geant4 GitLab repo.The remainder of the updates are pure simplification and cleanup.
One potential issue to look at is the "view" creation in
geant4-data. All this does is create a directory<prefix>/share/geant4-data-<version>/and create symlinks in that to theg4xxxdata directories. That works, and Geant4's seems fine with it. However, if a spack environment/view is created andgeant4-datainstalled in this, the symlinks under<viewprefix>/share/geant4-data-<version>/are created as normal but empty directories.I'm not sure this is critical as the environment variables needed by Geant4 are set correctly, but feels like I've missed something.