Adds BLT_ALLOW_MISSING_MPI_WRAPPER option to allow Fortran configs with MPI to not have an MPI_Fortran_COMPILER#755
Conversation
|
Fun wrinkle from the Good test! I was wondering if I'd need extra logic about checking for a valid C and/or C++ MPI compiler/wrapper. |
…d MPI_<lang>_COMPILER e.g. we should not setup MPI for C if it is not an enabled language.
e524797 to
d5cbb56
Compare
…mpty blt_list_append does not allow ELEMENTS to be empty.
|
I chatted with @kennyweiss directly but putting summary here: I am concerned this is changing a long standing behavior that all enabled languages needed an MPI compiler wrapper due to not listing components on the My recommendation is to add a sanity check for all wrappers being provided in the normal case (improvement over what is there today), then the niche case requiring the user to set a new variable, something like Thoughts? |
…COMPILER is missing And adds a FATAL_ERROR if MPI_<lang>_COMPILER is missing for an enabled language when ENABLE_MPI. This has been the assumption in the code, but we did not have an explicit check for it, so the error would typically happen at a later point.
|
I think implicitly needing all wrappers was a mistake. That was what led to issues with fortran flags being fused with c flags and undermining clang builds. Also you don't need compiler wrappers -- you need the knowledge of how to compile and link (often comes from the wrappers, but not always). FindMPI will work if you provide flags as well. This check for fortran wrapper my undermine that. It would be better if BLT had and option for which languages to use with MPI. That is what CMake's MPI has evolved to. |
|
@cyrush that makes sense. We can always pivot later. shall we merge then? Adding some documentation to the MPI section that we will use information only from the given compiler wrappers would be good though. |
|
I think current fix is needed, and we can improve more in the future. |
BLT_ALLOW_MISSING_MPI_WRAPPER option to allow Fortran configs with MPI to not have an MPI_Fortran_COMPILER
|
I updated the branch based on @white238's suggestion. Specifically, by default, you need to provide a However, you can override that by setting Based on @cyrush's comment, we might not want to require users to provide a Edit: In the meantime, I have patched blt in my local build, so this fix is not blocking me. We should get the behavior correct before merging. |
This PR adds the
BLT_ALLOW_MISSING_MPI_WRAPPERoption to enable users to configure MPI without providing some MPI__COMPILER variables for some enabled languages.This came up in an msan config where we need Fortran to be enabled (
ENABLE_FORTRAN=TRUE) as well as MPI (ENABLE_MPI=TRUE), but we don't need an MPI wrapper for Fortran -- and more importantly, we don't have an MPI wrapper for Fortran that is compatible with our C and C++ MPI wrappers.