Skip to content

Conversation

@vkarak
Copy link
Contributor

@vkarak vkarak commented Jul 25, 2019

This PR introduces the modules and variables parameters at the system level of the site configuration. This is useful in cases were a module is always needed to be loaded for launching jobs for example:

        'systems': {
            'foosys': {
                'modules': ['slurm']
                'hostnames': ['localhost'],
                'partitions': {
                    'compute': {
                        'scheduler': 'nativeslurm',
                        'environs': ['builtin-gcc'],
                    },
                }
            },

Notice that this modifies the ReFrame environment, whereas the same parameters defined for a partition do not.

Fixes #806.

@vkarak vkarak added this to the ReFrame sprint 2019w29 milestone Jul 25, 2019
@vkarak vkarak requested a review from victorusu July 25, 2019 21:26
@vkarak vkarak self-assigned this Jul 25, 2019
@vkarak vkarak changed the title [feat] Enable modifications to the ReFrame environment per system basis [feat] Enable modifications to ReFrame's environment per system basis Jul 25, 2019
@vkarak
Copy link
Contributor Author

vkarak commented Jul 26, 2019

@bcfriesen This fixes the issue you had when trying to load a module providing Slurm. You may now specify this module as parameter at the system level (check the description of this PR). Can you tell me if this works for you? Passing -m option should not be necessary any more.

Copy link
Contributor

@victorusu victorusu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, but I have a couple of questions.

except EnvironError as e:
printer.error("failed to load current's system environment; "
"please check your configuration")
raise
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we raising empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this means raise the current exception. But I should remove e, which I don't use.

@bcfriesen
Copy link
Contributor

Hi @vkarak,

@bcfriesen This fixes the issue you had when trying to load a module providing Slurm. You may now specify this module as parameter at the system level (check the description of this PR). Can you tell me if this works for you? Passing -m option should not be necessary any more.

Great! This is one of the last outstanding bugs that we have to work around at NERSC. We're returning from a system-wide maintenance today, so I will test this as soon as the systems come back (today or tomorrow).

@victorusu victorusu merged commit 47e031a into reframe-hpc:master Aug 2, 2019
@bcfriesen
Copy link
Contributor

Hi @vkarak, sorry for the delay. This patch indeed works for me, thanks!

@vkarak vkarak deleted the feat/modify-env-per-system branch August 22, 2019 15:53
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.

ReFrame fails to load modules before job submission

3 participants