-
Notifications
You must be signed in to change notification settings - Fork 28
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
Get model executables from path #379
Comments
I like this idea as it makes easier for users to switch model versions, as there is no need to determine the (rather convoluted) paths to Just out of interest, what is the reason to encode the configuration version in the e.g. exe: access-om3-MOM6-CICE6
modules:
use:
- /g/data/ik11/spack/0.20.1/modules/access-om3/linux-rocky8-cascadelake
load:
- access-om3/0.3.0 |
This is because of how our Spack instance is currently set up. We are installing each version of OM3 in a different Spack environment (there's a couple of reasons for this, but this might stop doing it in the future). Then, because some versions have the same dependencies and because I didn't want to have the Spack hash in the module name, each environment needs a unique module path to install its modules. The simplest way to achieve that was to add the OM3 version to the module path. That explains why the version appears in the |
I discussed this with @harshula yesterday and he raised a few valid concerns about picking stuff from
This would work for the COSIMA spack instance, because each module defines an environment variable Currently the above proposal does not work because payu loads the modules after handling the executable, so the variable is not defined when needed. Might not be too hard to change this. |
Is it possible to require a module version? e.g. |
Just be aware that if you check that there's a version, that the version naming scheme might be a lot more complicated than 'x.y.z'. You also cannot assume that the module will always have the form
|
@micaeljtoliveira you make good point about what constitutes a valid version. Not sure that is solvable in a general sense in a useful way. |
Wouldn't |
Using that information should make it easier to correctly match the version (or lack of it). This actually made me realise there's another possible issue: it's possible that there are two modules with the same name/version in two different paths. This is not trivial to solve, as we cannot restrict payu to only use the paths set in the config.yaml file. With some many possible ways for users to make mistakes, I really think that enforcing reproducibility using the manifest information should be made the default, regardless of any failsafes that are added to payu. |
Well.. we could by purging all module information and then I haven't had long enough to decide what the downsides of that might be, but TBH it is quite appealing.
There is nothing to stop anyone from adding reproduce:
exe: True to the |
That would mean forcing users to explicitly set "use /apps/Modules/modulefiles' to have access to the MPI modules, no? Still doesn't prevent the users from explicitly "using" two different module paths that include the same version of a module.
True and I'm very tempted to start doing it systematically. Still worth considering doing it by default, as not all users will be aware of these issues. |
Maybe not (thinking of the Ok, axe that as an idea! :)
I created this issue to discuss this in more detail: Your input is welcome! |
|
Would be nice to have this feature - in the meantime we'll manually keep the exe and module in sync, which is error-prone COSIMA/access-om3#93 |
Looks like I've come around to your way of thinking @aekiss |
This has become a blocker for ACCESS-NRI/build-cd#62 So I think we want to prioritise this @jo-basevi |
I don't think the suggested solution from @micaeljtoliveira would work currently for ACCESS-OM2 models as each component is installed as it's own package, in a separate hierarchy. As it stands the @micaeljtoliveira has suggested another change that allows for more generic path generation ACCESS-NRI/model-config-tests#10 but I don't know how it works with multi-package models, and we've decided to use the spack build hash to connect executables used in experiments to the build provenance for that executable. I do like the idea of changing information (model version) in a single place with the We're also planning to add config QA checks to make sure the paths defined in the |
I think one could get all the paths and spack hashes by inspecting the symlinks spack creates in the view's |
Nice. It may be worth doing this anyway, as a belt and braces approach, to allow for different ways to do the same thing. @jo-basevi had a neat idea of inspecting the modules that are loaded to see what they add to the
|
Recently we added the option to install ACCESS-OM3 with Spack. Usually the location where Spack installs the packages includes a hash in the naming scheme, which makes it a bit tedious to keep the full executable path up to date in the payu
config.yaml
file. On the other hand, we are using Spack to automatically create environment modules for OM3 that add the corresponding path to the OM3 binaries to the PATH environment variable. Therefore it would be nice if payu could get the executable from the path.Basically, instead of doing:
we would like to simply write:
The text was updated successfully, but these errors were encountered: