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

Propagate module path option to script creation #3032

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

felilxtomski
Copy link

The module-path option is not considered when creating the shell script. This causes issues with schedulers such as SLURM.

@felilxtomski felilxtomski changed the base branch from develop to master October 31, 2023 08:12
@jenkins-cscs
Copy link
Collaborator

Can I test this patch?

@vkarak
Copy link
Contributor

vkarak commented Oct 31, 2023

Hi @felilxtomski could you give more details on the actual problem?

@felilxtomski
Copy link
Author

I want to use the --module-path option to modify (in my case extend) the modulepath which works fine for local execution. However, when a test is executed with a non-local scheduler, the modified MODULEPATH environment variable is not propagated to the remote execution (at least in my environment). So if one of the used modules in the generated shell script for the test is not available in the default modulepath, the module cannot be loaded as the modulepath is not extended in the remote shell.

I know that I could also achieve a similar behavior by using prepare_cmds of the config, but I want to modify the modulepath dynamically when executing reframe.

@vkarak
Copy link
Contributor

vkarak commented Oct 31, 2023

I think passing the --module-path back to remote script violates the concept of this option. This, as well as other similar ones, like the --module, control reframe's environment and not the test's environment.

You can still enable a dynamic behaviour with the prepare_cmds by using custom environment variables. For example, you can define them as such in your config:

'prepare_cmds': [f'export MODULEPATH={os.getenv("MY_MODULE_PATH")}'] if os.getenv("MY_MODULE_PATH") else []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants