Remove unused options from "spack stack" extension and add logic to set compiler for "spack stack create env"#1192
Conversation
… gcc-openblas environments (py-numpy, gcc-runtime)
…d duplicate packages
…pport for setting compiler for 'spack stack create env'
|
@AlexanderRichert-NOAA I am keeping this in draft for the moment, but I would really like to ask you for your feedback as I've been rather aggressive with removing unused options in our The new feature to set the compiler in |
|
Of course, I am going to fix the unit tests and update the documentation. But I won't do that until we've agreed on the actual changes. |
|
Okay, thanks for the headsup. So far so good I think. I don't really use any of those, and it seems like they're things that can be dealt with manually by copying files around. If you can think of an exception to that let me know. |
6dddc02 to
04bfac5
Compare
04bfac5 to
e499197
Compare
|
Thanks @AlexanderRichert-NOAA. This is all looking pretty good. I'll finish the GitHub actions, test container builds and also building locally on an NRL system, push the documentation updates and open it up for reviews. Would be great to get this merged before I go on leave end of this week (for three weeks). |
…ubuntu-ci-x86_64-*.yaml
dab56e7 to
44ad542
Compare
|
@AlexanderRichert-NOAA This is now ready for review (and additional testing if you feel inclined to do so) |
53e0e37 to
7353d7c
Compare
srherbener
left a comment
There was a problem hiding this comment.
I've tested on Discover and my Mac. Discover successfully made it through the spack-stack build. My Mac made it through concretize and failed with the musl issue during install. I think the Mac issue is limited to apple-clang%15 and not related to this PR, so I'm happy to approve. Thanks!
|
Thanks so much for testing @srherbener - @AlexanderRichert-NOAA any chance you can take a look at this PR in the next week or two? |
|
Sorry @climbfuji this got stuck in the hopper. I'm going to test it out momentarily... |
…t/lib/jcsda-emc/spack-stack/stack/stack_env.py
….github/workflows/ubuntu-ci-x86_64-gnu.yaml .github/workflows/ubuntu-ci-x86_64-intel.yaml from previous merge
|
Looks like py-torch specifically wants [email protected]_2020-12-22, but oneapi support wasn't added until 3.6. Maybe remove the ai piece for now? |
|
@AlexanderRichert-NOAA CI tests now pass (I turned off the env chaining for the new oneapi workflow). Can you please review again? |
Summary
This PR removes unused options for the "spack stack" extension in an order to clean up the amount of code and facilitate adding the new capability described below.
The new capability requires the user to define a compiler
--compilerwhen runningspack stack create env. It further updates the logic for creating common and site environment spack config files for modules and packages. For both common and site configs (inconfigs/common/andconfigs/sites/tier?/*/), the following is true:packages: If bothpackages.yamlandpackages_${COMPILER}.yamlexist in the same directory, merge the two (packages_${COMPILER}.yamloverridespackages.yamlif necessary) and write to the environment's common or site config aspackages.yaml. See for example the updatedblackpearlsite config in this PR. If only one of them exists, copy that file to the destination.modules: If bothmodules.yamlandpackages_${LUA_OR_LMOD}.yamlexist in the same directory, merge the two (packages_${LUA_OR_LMOD}.yamloverridesmodules.yamlif necessary) and write to the environment's common or site config asmodules.yaml. This is currently not the case, but maybe we can consolidate some of the contents into one defaultmodules.yamlfile?In the environment
spack.yaml, update the compiler definition line for the matrix (if applicable) and setpackages:all:require:['%COMPILER']. This requires that packages that must be built with other compilers (e.g.gcc-runtime) have their ownrequire: '%COMPILER'setting to overwrite this. This is already the case forgcc-runtimeinconfigs/common/packages.yaml. The same may be needed for otherruntimepackages for each of the compilers in the future, and for packages likebisonthat don't build withoneapifor example. I am basically following what E4S does.Testing
gccandoneapionblackpearl, concretized and verified that the blas/lapack/fftw-api providers are correct, the correct compilers are being used, and that no conflicts are reported (except the known/greenlighted ones).neptune-envon Nautilus with[email protected]using the existing site config (i.e. no changes necessary). Then builtNEPTUNEwith the same compiler and ran basic tests.Applications affected
None
Systems affected
None
Dependencies
Issue(s) addressed
Resolves #1167
Resolves #1126
Checklist