Dave,

you should not expect anything when mixing Fortran compilers
(and to be on the safe side, you might not expect much when mixing C/C++ compilers too, for example, if you built ompi with intel and use gcc for your app, gcc might complain about unresolved symbols from the intel runtime)

if you compile OpenMPI with gfortran 4.8.5, the automatically generated mpif-sizeof.h contains

! Sad panda.
!
! This compiler does not support the Right Stuff to enable MPI_SIZEOF.
! Specifically: we need support for the INTERFACE keyword,
! ISO_FORTRAN_ENV, and the STORAGE_SIZE() intrinsic on all types.
! Apparently, this compiler does not support both of those things, so
! this file will be (effecitvely) blank (i.e., we didn't bother
! generating the necessary stuff for MPI_SIZEOF because the compiler
! doesn't support
! it).
!
! If you want support for MPI_SIZEOF, please use a different Fortran
! compiler to build Open MPI.

intel fortran compilers have the right stuff, so mpif-sizeof.h is usable, and you get something very different.

Cheers,

Gilles

On 3/4/2016 10:17 AM, Dave Turner wrote:

     My understanding is that OpenMPI built with either Intel or
GNU compilers should be able to use the other compilers using the
OMPI_CC and OMPI_FC environmental variables.
     For OpenMPI-1.8.8 built with Intel compilers, if you try to
compile any code that includes mpif.h using OMPI_FC=gfortran it
fails.  The Intel build creates mpi-sizeof.h that dimensions
arrays to more than 6 dimensions which gfortran cannot handle.
The example below illustrates this.
     I wasn't able to find any other reports like this on the
web, and I don't see any way of specifying a path to an alternate
mpif.h include file.  This looks to be a bug to me, but please let
me know if I missed a config flag somewhere.

               Dave Turner



Selene cat bugtest.F
! Program to illustrate bug when OpenMPI is compiled with Intel
!    compilers but run using OMPI_FC=gfortran.

      PROGRAM BUGTEST

      INCLUDE "mpif.h"

      END
Selene cat go
#!/bin/bash


echo "Compile test using default ifort"

mpifort --version
mpifort bugtest.F -o bugtest_ifort


echo "Compile test using gfortan when OpenMPI was compiled with ifort/icc"

export OMPI_FC=gfortran

mpifort --version
mpifort bugtest.F -o bugtest_gfortran


Selene ./go
Compile test using default ifort
ifort (IFORT) 15.0.3 20150407
Copyright (C) 1985-2015 Intel Corporation.  All rights reserved.

Compile test using gfortan when OpenMPI was compiled with ifort/icc
GNU Fortran (Gentoo 4.9.3 p1.4, pie-0.6.4) 4.9.3
Copyright (C) 2015 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

mpif-sizeof.h:75.48:
    Included at mpif.h:61:
    Included at bugtest.F:6:

      COMPLEX(REAL128), DIMENSION(1,1,1,1,1,1,1,*)::x
                                                1
Error: Array specification at (1) has more than 7 dimensions
mpif-sizeof.h:82.48:
    Included at mpif.h:61:
    Included at bugtest.F:6:

      COMPLEX(REAL128), DIMENSION(1,1,1,1,1,1,1,1,*)::x
                                                1
Error: Array specification at (1) has more than 7 dimensions
mpif-sizeof.h:89.48:
    Included at mpif.h:61:
    Included at bugtest.F:6:

      COMPLEX(REAL128), DIMENSION(1,1,1,1,1,1,1,1,1,*)::x
                                                1
Error: Array specification at (1) has more than 7 dimensions

[ More of the same errors have been clipped ]


--
Work: davetur...@ksu.edu <mailto:davetur...@ksu.edu>     (785) 532-7791
             2219 Durland, Manhattan KS  66502
Home: drdavetur...@gmail.com <mailto:drdavetur...@gmail.com>
              cell: (785) 770-5929


_______________________________________________
devel mailing list
de...@open-mpi.org
Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
Link to this post: 
http://www.open-mpi.org/community/lists/devel/2016/03/18671.php

Reply via email to