Repository navigation
Conversation
There was a problem hiding this comment.
I like the idea of dynamically querying the EESSI versions available, and just testing those. I have two thoughts:
- Can/should we make the
set_common_required_configa bit more... configurable? I.e. add an argumentset_eessi_environs = True(to add the EESSI environment to each partition), maybe a separateset_eessi_environments = True(to define the environments at thesite_configurationlevel)? This more easily allows a site to say: don't touch them, I'll define them myself. Use case would be e.g. if a site ONLY wants to test a single EESSI environment, since it doesn't care enough to test the old ones. - Would the detection work on any system? I.e. on some systems, some action may need to be done before those EESSI modules are even visible. Shouldn't it run the
eessi_prepare_cmdsfor example? This would allow e.g.
source /cvmfs/software.eessi.io/versions/2026.06/init/lmod/bash
module purge
On systems that don't have a module env, just so that they can get one from EESSI first. Yes, they'd need to hardcode SOME version of EESSI to initialize the Lmod environment from, but... there's no way around that.
Anyway, maybe we discuss this in this afternoons meeting, before we take a decision on how to proceed.
yes, this is something i wanted to add, but wasn't sure about the best approach.
currently, we always have to make sure the EESSI modules are available before launching EDIT: if we do this, we'll also have to find a way to also make them available before reframe checks the available modules. the |
Hmm, you're right, I didn't think of that. Ok, we can try without first, see how that works for us. Then it's just up to the human who executes the reframe command to basically execute the prepare_cmds beforehand. |
|
@casparvl i've implemented your first suggestion using i'll leave your second suggestion for another PR if we decide to do it. |
| if line.startswith('EESSI/') | ||
| } | ||
| if not versions: | ||
| getlogger().warning( |
There was a problem hiding this comment.
It's a bit inconsistent: if we can't detect EESSI versions because there is no LMOD_CMD, it's a hard error. If we can't detect EESSI versions because there is a module command, but your cmd has simply not returned any EESS modules (e.g. because the MODULEPATH wasn't set correctly) it's a warning. We should make this consistent, but... with what?
You could say: it's an error, because the user specified add_eessi_versions=True in their config (well, implicitely, since it is the default). If you can't detect EESSI environments, we cannot add them, and since that was requested, it is an error.
One could also argue that this is a breaking change, and that raising an error would be 'too breaking'. I.e. without changing any of the defaults, if my MODULEPATH doesn't contain EESSI (or if I don't have a modulecommand), I now suddenly get a hard error.
I'm not sure which way to go...
There was a problem hiding this comment.
there's probably no clear answer, but the way i see it:
- if there is not module system available (assuming we'll generalize LMOD_CMD to other module systems), then we can't test any modules at all, so should clearly error.
- if there are no EESSI versions detected, we can still test local modules if there is a local environ defined, so it's not as bad.
a solution could be to add a ReFram variable, say no_eessi_modules_found_policy, similar to required_mem_per_node_undefined_policy and readonly_files_undefined_policy. then each user can decide if they want an error or a warning.
what do you think?
There was a problem hiding this comment.
Hmmm, maybe I'm just bikeshedding. I was really thinking about it from a single function perspective: if you ahve a function that is supposed to 'get' the EESSI versions, and it didn't find any, I thought that was a (hard) failure as well. I.e. function didn't return what it was supposed to return. But I guess that's not the case: it did return what it was supposed to return, namely 'there are no EESSI modules on this system' (but we can still test the local ones).
Fine, let's just keep it like this - maybe generalize the LMOD_CMD to other module systems. I do still think that a hard error on a system that has Environment Modules instead of Lmod is... too harsh.
There was a problem hiding this comment.
Anyway, this conversation is resolve,d we'll pick up the LMOD_CMD thing at that line :)
There was a problem hiding this comment.
changed it to use warning for the missing Lmod, since other module systems may stil be available and so local modules can still be tested. so both are now a warning. also using the ReFrame machinery for the modules sytem now.
| The EESSI modules must already be available (in $MODULEPATH) before running ReFrame. | ||
| :return: sorted list of available EESSI versions, e.g. ['2023.06', '2025.06'] | ||
| """ | ||
| lmod_cmd = os.getenv('LMOD_CMD') |
There was a problem hiding this comment.
What if you're running on a system with Tcl / EnvironmentModules? I'm not sure how EESSI it would be to generalize this for other module systems?
There was a problem hiding this comment.
Should we / can we leverage ReFrame's module system? I think that already supports different module implementations?
There was a problem hiding this comment.
should indeed generalize it, i'll see what we can do.
There was a problem hiding this comment.
hm no, all modules in EESSI are in Lua format, so EESSI requires Lmod.
casparvl
left a comment
There was a problem hiding this comment.
Haven't tested yet. Changes look good in general. Some small/medium sized concerns.
|
Unrelated thought: we don't really have unit tests for the test suite. This makes me wonder if we should. I.e. something that calls the common_config with various |
i agree we should have a test suite for the test suite :) |
|
I mean, we can think about what it should cover. But I'm mainly thinking about the machinery around the actual tests. I don't think we can (should) test the test classes themselves (other than maybe a That being said, https://github.com/EESSI/test-suite/actions/runs/42527362655/job/128873824331?pr=362 essenitally does a dry-run, but with VERY old EESSI version. I guess we should update that... |
…lmod; update info msg
instead, query the available EESSI versions on the system with Lmod, and use those to populate the EESSI environments.
UPDATE:
also added optional param
add_eessi_versionsto functionset_common_required_config. possible values:True(default): add all available versions['2025.06']: add only those versionsFalse: add no versions: the site defines its own EESSI environments and partition environsper partition, the
environssetting can change this:['EESSI-2025.06']: exactly those are used, nothing is addedNO_EESSImarker listed, e.g.['localenv', NO_EESSI]: no EESSI environments are added, the marker is removedadditionally:
environ_mappingfilter infind_modules, which had no effectenvironslist, so changing one no longer affects the otherssettings_example.py