This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Gfortran vs Ifort when using MPI
> Interesting.. When you say the "fast 64-bit MPICH" is compiled with ifort,
> do you mean that the C parts of MPICH are compiled with gcc, and only the
> Fortran interface with ifort, or do you mean it's compiled with icc + ifort?
> AFAICT there's not much Fortran code in any MPI implementation, the actual
> code tends to be C with only a very thin Fortran wrapper.
The C parts are compiled with gcc, and only the Fortran interface with ifort.
> Have you tried a different MPI implementation, such as Open MPI?
I have just tried OpenMPI, the results are as following:
On 32-bit I see full speed for both compilers.
On 64-bit it seems like the deciding factor is which compiler is used
to build the simulator, and not the Fortran wrappers of OpenMPI. This
is the opposite case MPICH.
> Or does "use mpi" vs. "include 'mpif.h'" make a difference?
I was not able to run (Error in MPI_Comm_rank) when using "include
'mpif.h'" and ifort compiled simulator. Using gfortran compiled
simulator there was no difference between them.
To summarize, my 64-bit OpenMPI findings are as follows:
MPI Include | OpenMPI comp | Simul. comp | Result
----------------------------------------------------------------------------
use mpi | gfortran | gfortran | slow
use mpi | ifort | gfortran | slow
use mpi | ifort | ifort | fast
use mpi | gfortran | ifort | fast
mpif.h | gfortran | gfortran | slow
mpif.h | ifort | gfortran | slow
mpif.h | ifort | ifort | fail
mpif.h | gfortran | ifort | fail
> As far as the frontend is concerned, not really. Some differences in sizes
> of some types, e.g. array indexes are internally 64-bit in the 64-bit
> version.
Could the size of these types somehow propagate into the simulator,
and cause some MPI communcation to time out?
Can any compile switches affect these types?
--
Regards Johan Seland