-
Notifications
You must be signed in to change notification settings - Fork 5
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
Incorrect compiler env variables if different compiler versions are installed #9
Comments
This patch actually does not work (the script aborts), I assume the script is set to abort on error, and the grep statement fails with an error state. Verify that it works if two consistent settings are provided (which I believe it does), e.g. I have seen:
|
Probably extracting the compiler info isn't sufficiently specific at https://github.com/MetOffice/ngmo-environments/blob/main/utils/install-compiler.sh#L40 If NGMOENVS_COMPILER is just "gcc" then you might get multiple matches, which then pass through to the other stages. Easy fix may be just to pull the first (or last, whichever spack will actually use when compiling with |
While I have fixed the script (main...handle_multiple_installed_compilers) to handle incomplete compilers, the second issue still exist (no surprise) - which makes the resulting environment not working: |
That would certainly work in my case, but on my bom laptop, I have two identical compilers, so I think we need more logic there anyway :( I'll add a check that a compiler is specified with version to the sanity check ticket :) |
My wsl system had gcc-9 (only, no gfortran), and a full gcc-11* installed. The environmet created the following env variables:
Reason is the following output of
spack compiler info
:I have a branch that fixes it, once I have confirmed (by rebuilding I'd guess :( ) that it works, I'll do a PR.
The text was updated successfully, but these errors were encountered: