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

Payu's check for module uniqueness fails incorrectly #481

Closed
anton-seaice opened this issue Aug 12, 2024 · 2 comments · Fixed by #482
Closed

Payu's check for module uniqueness fails incorrectly #481

anton-seaice opened this issue Aug 12, 2024 · 2 comments · Fixed by #482
Assignees
Labels

Comments

@anton-seaice
Copy link
Contributor

anton-seaice commented Aug 12, 2024

If in config.yaml, I specify:

modules:
        - openmpi/4.1.5

and then do a payu run, using payu 1.1.4, the following error is generated:

Traceback (most recent call last):
  File "/g/data/vk83/apps/payu/1.1.4/bin/payu-run", line 10, in <module>
    sys.exit(runscript())
  File "/g/data/vk83/apps/payu/1.1.4/lib/python3.10/site-packages/payu/subcommands/run_cmd.py", line 133, in runscript
    expt.setup()
  File "/g/data/vk83/apps/payu/1.1.4/lib/python3.10/site-packages/payu/experiment.py", line 431, in setup
    self.setup_modules()
  File "/g/data/vk83/apps/payu/1.1.4/lib/python3.10/site-packages/payu/experiment.py", line 237, in setup_modules
    loaded_mods, paths = envmod.setup_user_modules(user_modules,
  File "/g/data/vk83/apps/payu/1.1.4/lib/python3.10/site-packages/payu/envmod.py", line 173, in setup_user_modules
    raise ValueError(
ValueError: There are multiple modules available for openmpi/4.1.5:
/apps/Modules/modulefiles:
openmpi/4.1.5
openmpi/4.1.5-debug

This behavior is incorrect, as openmpi/4.1.5 is the whole name of the module and prevents the user specifying the openmpi version.

The check at line 163 in envmod might need modifying with an additional check if the module name specified is an exact match to the available module, or converting to a warning.

@aidanheerdegen
Copy link
Collaborator

How big a blocker is this? Just thinking about prioritisation.

I'm guessing there is no work-around available?

@anton-seaice
Copy link
Contributor Author

I didn't find this in any managed configuration. It might be minor, because the typical usecase is to specify a module load which is unique (e.g.
access-om3/63ed4a4777aeac0c62720ddbe7f85e4ed16f82eb_main ) and loads all the other modules as dependencies (including openmpi). For the specific case of module loading openmpi, if you don't include a module use for openmpi, payu will use the default which is not drastically different (openmpi 4.1.4).

jo-basevi added a commit to ACCESS-NRI/payu that referenced this issue Aug 13, 2024
This is to fix bug payu-org#481 where module avail for `openmpi/4.1.5` includes `openmpi/4.1.5` and `openmpi/4.1.5-debug`
Added tests for parsing module avail output
jo-basevi added a commit to ACCESS-NRI/payu that referenced this issue Aug 13, 2024
This is to fix bug payu-org#481 where module avail for `openmpi/4.1.5` includes `openmpi/4.1.5` and `openmpi/4.1.5-debug`
Added tests for parsing module avail output
@jo-basevi jo-basevi self-assigned this Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants