<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>As far as enhancements to FindMPI go, It might be worthwhile to check if FC, CC,CXX match any obvious MPI wrappers, and then set MPI_<lang>_compiler and select the MPI version from there: If the user set the compiler explicitly to an MPI wrapper, that's likely the MPI they intend to use.... If I find some time maybe I'll work up a pull request for this.</div></div></blockquote><div><br></div><div>It's actualy already there since this is the default and preferred behavior in Cray systems.  As a fallback if MPI can't be found, then it tests the regular compilers.  If successful,  it will not interrogate them and MPI_FOUND wll be true but the MPI_<lang>_{LIBRARIES,INCLUDE_DIRS} variables will be empty.  Instead it will explicitly set MPI_<lang>_COMPILER_NO_INTERROGATE=/path/to/mpi{cc,c++,f90}.  Look around line 600 (try_reguilar_compiler and interrogate_mpi_compiler) <br><br>I think the logic is a bit backwards on this and if you were to make a change, I'd suggest it be there and re-order a few things such that if MPI things haven't been already explicitly set then the *first* thing to do (rather than last) is test the regular compilers, then if those don't work, search for and interrogate the MPI wrappers.</div><div></div><div> </div>- Chuck<br></div><br></div></div>