Skip to content

Conversation

@chapman39
Copy link
Collaborator

@chapman39 chapman39 commented Dec 17, 2025

This sets an option recently added in Spack. By default Spack allows mixing compilers. However, it can lead to some unexpected builds if for example you build some packages with GCC and others with Clang. So, this PR disables compiler mixing by default in Uberenv. However, you can use command line option --spack-compiler-mixing, if you want the default Spack functionality.

Depending on what options are set, the following output and spack.yaml section will be added:

[enable/ disabling mixing compilers in Spack]

spack.yaml

  concretizer:
    compiler_mixing: true/ false

I have tested this in Smith, and it works as expected.

Also, I created a simple version2tuple function. That way, we can compare version strings. This helps in these sorts of situations where we need to check if a Spack version is above/ below a certain threshold.

More info:

@chapman39 chapman39 self-assigned this Dec 17, 2025
@chapman39 chapman39 changed the title Prevent mixing toolchains in Spack versions over 1.1.0 Prevent mixing compilers in Spack versions over 1.1.0 Dec 17, 2025
@chapman39 chapman39 marked this pull request as ready for review December 17, 2025 23:38
@chapman39
Copy link
Collaborator Author

@scheibelp for awareness

@chapman39 chapman39 marked this pull request as draft December 18, 2025 22:24
@chapman39
Copy link
Collaborator Author

putting on draft until i can get smith to concretize with this setting

==> Error: failed to concretize `smith@develop+devtools+profiling %[when='%fortran'] fortran=gcc %[when='%c'] c=clang %[when='%cxx'] cxx=clang %[when='%mpi'] [email protected]_19` for the following reasons:
     1. Compiler mixing is disabled

@adrienbernede
Copy link
Member

I have the same error on my end with quandary.

@white238
Copy link
Member

Fix in spack/spack#51796

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants