Fix CUDA sanity check for EB >=5.4.0 - #288
Conversation
… the sanity check phase. This breaks our CUDA sanity check, which relies on cuobjdump
|
It loads the module, but I guess a subshell with an isolated environment may be started? I'm not sure. It still doesn't find |
|
I knew this would bite us eventually easybuilders/easybuild-framework#4692 (comment) |
|
Since it just needs to be in the |
|
Ok, according to deepwiki indeed the sanity check does a module purge. Some hint on how to resolve this may be gotten from https://deepwiki.com/search/in-the-sanity-check-step-a-fak_317cc243-13e3-4627-a8ed-fbec38bfa715?mode=fast |
|
Explicitely adding the location of the Maybe the most robust way is to do the module load I do now, then do a |
…make sure that step doesn't undo it
|
Ok, testing this now, but not sure I can report the result - someone else may have to pick this up... |
| cuobjdump_dir = os.path.dirname(cuobjdump_path) | ||
| self.cuobjdump_dir = cuobjdump_dir | ||
| self.modules_tool.unload([dep['full_mod_name']]) | ||
| os.environ['PATH'] = os.environ.get('PATH', '') + os.pathsep + cuobjdump_dir |
There was a problem hiding this comment.
Probably want to store the original value in the attribute and restore it when removing that attribute
There was a problem hiding this comment.
Yeah, that was a 'TODO' (see the post-hook). But... it doesn't work. I don't have time to look into it any further right now... If you're up for it, you can give it a go. Otherwise, I expect Bob will look into it somewhere next week - he hit it when trying to compile ESPResSo with CUDA support.
| cuobjdump_path = shutil.which('cuobjdump') | ||
| cuobjdump_dir = os.path.dirname(cuobjdump_path) | ||
| self.cuobjdump_dir = cuobjdump_dir | ||
| self.modules_tool.unload([dep['full_mod_name']]) |
There was a problem hiding this comment.
In the case of LAMMPS we also need a CUDA during th running of the tests. So this hook would not fix the failing sanity check fo LAMMPS.
There was a problem hiding this comment.
Should there than be another hook for LAMMPS which loads CUDA in pre_sanity_check_hook and unloads in post_sanity_check_hook?
Since EB 5.4.0, the build dependencies are no longer available during the sanity check phase. This breaks our CUDA sanity check, which relies on cuobjdump being available.
This PR tries to promote CUDA to a regular dep temporarily, hoping that this will make the CUDA sanity check pass. A test on CUDA-Samples 12.9 shows that this is NOT the case. My AI friend thinks it's because the fake module that is generated is being generated based on data structures that are already available, so modifying the existing self.cfg instance has no effect.
Anyway, this is at least a description of the issue,and a starting point for the solution...