Make Intel compiler + IntelMPI use mpiifort etc.#2005
Make Intel compiler + IntelMPI use mpiifort etc.#2005boegel merged 4 commits intoeasybuilders:developfrom
Conversation
The combination of Intel compilers and IntelMPI should always use mpiifort, mpiicc, mpiicpc and not mpif90, mpicc, mpicxx. The main reason is that for Fortran90 code that uses USE mpi mpif90 finds the gfortran mpi.mod and not the ifort one, this regardless of having I_MPI_F77/F90/FC set to ifort or not. Without this patch building of any fortran mpi code that uses mpi.mod or any of the other Fortran modules fails. It is also a recommendation by Intel to use mpiicc, mpiicpc, and mpiifort for this combination and not to use mpif90 with I_MPI_F90 or similar.
|
tagging @besserox for further comment, in case there is one. |
|
Although I can't come up with a reason not to make this change, this is a backward-incompatible change... However, I see this as a bug fix, so making a backward-incompatible change like this may be acceptable. Thoughts on this change @ocaisa, @damianam, @geimer, @besserox (taking into account the discussion in #2000)? @akesandgren Can you look into the failing test that Travis is reporting? There's only one, which has hardcoded checks on the MPI compiler command being used, so fixing should be trivial: You can run this test in isolation in your working copy using |
| self.MPI_COMPILER_MPIF90 = 'mpif90' | ||
| self.MPI_COMPILER_MPIFC = 'mpif90' | ||
| if self.MPI_COMPILER_MPIF77 is None and self.MPI_COMPILER_MPIF90 is None and self.MPI_COMPILER_MPIFC is None: | ||
| # hardwire MPI wrapper commands (otherwise Mpich parent class sets them based on MPICH version) |
There was a problem hiding this comment.
Shouldn't we add MPI{CC, CXX} to be consistent...or explain in the comment why you don't have to
There was a problem hiding this comment.
@ocaisa only MPI{F77,F90,FC} are being touched here, but I guess it doesn't hurt to clarify
|
Future proofing the tests should probably modify all checks of mpicc, et.al., to have a intelcompiler+intelmpi combo switch, but i'll test only in ictce to start with. |
|
@akesandgren seeing the tests fail when a backwards-incompatible change is being made is actually a good thing :) |
|
Added changes to the test_ictce_toolchain to match the rest of the changes. |
|
@boegel Going with I haven't had the chance to test the code in this PR yet, though the changes look reasonable. |
|
For reference, I'm using it it production and so far all good :-) |
|
@akesandgren which toolchains have you tested this with, which software? Any chance for a list of installed modules (just (filtered) output from |
|
I'm only using intel/2017.01 at the moment (well a bit of foss/2016b too but that's irrelevant for this thread). Haven't had time to build more (yet) after the rebuild-everything-from-scratch a few days ago. |
| self.MPI_COMPILER_MPIF90 = 'mpif90' | ||
| self.MPI_COMPILER_MPIFC = 'mpif90' | ||
| if self.MPI_COMPILER_MPIF77 is None and self.MPI_COMPILER_MPIF90 is None and self.MPI_COMPILER_MPIFC is None: | ||
| # hardwire MPI wrapper commands (otherwise Mpich parent class sets them based on MPICH version) |
There was a problem hiding this comment.
definitely clarify. The docstring says: Set the MPICH_{CC, CXX, F77, F90, FC} variables
There was a problem hiding this comment.
OK, I guess clarifying wouldn't hurt.
@akesandgren can you include a comment that only the Fortran compiler commands need to be overridden, i.e. that the C/C++ compilers are correctly set via the parent class?
|
@akesandgren I'm testing this with all So far, so good, but I'll ride it out until those tests are completed. I don't expect any problems, but it doesn't hurt to make sure. The plan is to include this in EasyBuild v3.0.1 bug fix release, which will probably go out mid next week. |
|
My testing suggests that old versions of I'll look into the details, and see how we can mitigate this in the relevant easyblocks/easyconfigs/patches... |
|
OK, both the problems with old
So, as far as I can tell, this is good to go. Thanks for reporting this and working out a fix @akesandgren! We'll need to mention this clearly in the release notes for EasyBuild v3.0.1 (cc @migueldiascosta). |
|
I did find one victim of this change in further testing, but a very minor one (source is not freely available), see fix in ALADIN easyblock at easybuilders/easybuild-easyblocks#1050 |
The combination of Intel compilers and IntelMPI should always use
mpiifort, mpiicc, mpiicpc and not mpif90, mpicc, mpicxx.
The main reason is that for Fortran90 code that uses
USE mpi
mpif90 finds the gfortran mpi.mod and not the ifort one, this regardless
of having I_MPI_F77/F90/FC set to ifort or not.
Without this patch building of any fortran mpi code that uses mpi.mod or
any of the other Fortran modules fails.
It is also a recommendation by Intel to use mpiicc, mpiicpc, and
mpiifort for this combination and not to use mpif90 with I_MPI_F90 or
similar.
Longer discussion about this in issue #2000