-
Notifications
You must be signed in to change notification settings - Fork 104
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
Strange behaviour when using conditional dependency #3236
Comments
Just noticed something, if I run tests on all defined node types ( |
I tried to reproduce your above setup with some mock tests. The |
I can confirm that changing |
@paulmelis yeah I don't know if there's a way to get a way with that since to it to reach the hook it should not be filtered out completely. |
This is generally a limitation with raw dependencies compared to using fixtures. Fixtures "inherit" the
|
I have a test with an optional dependency, see below. I use the
Blender_CompileShaders
test to force a one-time action (when the NVIDIA driver has changed) of compiling NVIDIA shaders before rendering, which can take quite some time, and I don't want that time to pollute the actual render results ofBlender_RIOW
. But I do want to keep track of the precompile time, hence having it as a separate test that gets logged.The funky thing here is that the
Blender_RIOW
test is run on all of our nodes, including non-GPU ones, while theBlender_CompileShaders
dependency only makes sense on GPU nodes. Hence thevalid_systems = ['snellius:gpu_a100', 'snellius:gpu_h100']
in that class.However, this seems to trip up Reframe somewhat. When I run the test on a GPU node all is well and I can see the
dep_gpu_only()
call being made and returningTrue
:But when I run it on a non-GPU node I get warnings related to dependency resolution,
dep_gpu_only()
never gets called, and two tests are (incorrectly) skipped:Now I can understand that
Blender_CompileShaders
gets filtered out due to itsvalid_systems
not including the system I'm running the test on. But why would this cause theself.depends_on()
inBlender_RIOW
to not calldep_gpu_only()
at all? Shouldn't it evaluate that function first, and only when the dependency is needed check if it can be found?Also interesting to see it list the 2nd test case
Blender_HoleInTheRoof
in the output, which is indeed defined, but I don't ask for it with-n
on the command-line.This is with Reframe 4.6.1
Edit: some wording
The text was updated successfully, but these errors were encountered: