Fix meta-modules preferred compiler bug - #2084
Conversation
|
Thanks for this cleanup. I'll need to give this a thorough test on a few systems. |
|
@eap I am finally testing this PR - stay tuned |
|
I think this PR is good the way it's now. I tested it on 2/3 platforms, just finishing the third. |
climbfuji
left a comment
There was a problem hiding this comment.
Works on the three sites I tested (HPCs / devbox, lmod / tcl, intel / gcc / llvm)
|
@AlexanderHrabski-NOAA @AlexanderRichert-NOAA I'd like to merge this soon, if possible. Any desire to review and/or test? Thanks! |
rickgrubin-noaa
left a comment
There was a problem hiding this comment.
Successfully tested on two EPIC hosts.
Thanks, Rick for testing! Appreciate it. |
|
@climbfuji I'm not too familiar with the meta-module piece of spack-stack (though I am learning), and I'll need to shift my attention elsewhere for a couple days. I can try to find time on Friday to review this if it's still open! |
We can wait until Friday, no problem. We have plenty of other PRs in the pipeline :-) |
Co-authored-by: Dom Heinzeller <dom.heinzeller@icloud.com>
The motivation for this PR comes from the the function
custom_sort_keywhich was broken, leading to some bugs when generating meta-modules with compilers that were dependent on the preferred compiler.When sorting,
Spec.__contains__, checks the dependency tree of a spec, since llvm was built with gcc it got the same sort order as gcc in the list.Other fixes
The
for compiler in compilersloop had a whole bunch of meta-module logic that only applied to the preferred compiler, this was gated with a "continue" clause. I just dropped that clause and moved everything into the function context. That saved some variable scope bookkeeping and (along with the sort fixes) guarantees that it runs every time.