[MPICH] Re: [mvapich-discuss] Fatal error in MPI_Allreduce

Rajeev Thakur thakur at mcs.anl.gov
Fri Nov 30 12:32:46 CST 2007


This is caused by a bug in the Intel 10.0 compiler. It cannot handle case
statements of the form below. It needs a "return MPI_SUCCESS" after each
case statement. You can fix it in your code by editing
src/mpi/coll/opminloc.c and adding "return MPI_SUCCESS" after each of the
case statements below.

Rajeev 



int MPIR_MINLOC_check_dtype( MPI_Datatype type )
{
    static const char FCNAME[] = "MPIR_MINLOC_check_dtype";
    
    switch (type) {
    /* first the C types */
    case MPI_2INT: 
    case MPI_FLOAT_INT: 
    case MPI_LONG_INT: 
    case MPI_SHORT_INT: 
    case MPI_DOUBLE_INT: 
#if defined(HAVE_LONG_DOUBLE)
    case MPI_LONG_DOUBLE_INT: 
#endif
   /* now the Fortran types */
#ifdef HAVE_FORTRAN_BINDING
#ifndef HAVE_NO_FORTRAN_MPI_TYPES_IN_C
    case MPI_2INTEGER: 
    case MPI_2REAL: 
    case MPI_2DOUBLE_PRECISION: 
#endif
#endif
        return MPI_SUCCESS;
        /* --BEGIN ERROR HANDLING-- */
    default: 
        return MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
FCNAME, __LINE__, M
PI_ERR_OP, "**opundefined","**opundefined %s", "MPI_MINLOC" );
        /* --END ERROR HANDLING-- */
    }
}
 

> -----Original Message-----
> From: owner-mpich-discuss at mcs.anl.gov 
> [mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of amith 
> rajith mamidala
> Sent: Friday, November 30, 2007 11:57 AM
> To: Christian Guggenberger
> Cc: mvapich-discuss at cse.ohio-state.edu; mpich-discuss at mcs.anl.gov
> Subject: [MPICH] Re: [mvapich-discuss] Fatal error in MPI_Allreduce
> 
> Hi Christian,
> 
> We are not very sure about the exact reason why Intel 10.0 
> compiler causes the miscompilation. However, the source of 
> the problem could be not defining the fortran bindings 
> properly. You can take a look at the file:
> trunk/src/mpi/coll/opminloc.c which causes this error to occur.
> I would suggest to contact the mpich team to see if this is a 
> known error.
> 
> Thanks,
> 
> Amith.
> 
> On Thu, 29 Nov 2007, Christian Guggenberger wrote:
> 
> > Hi,
> >
> > attach is a small piece of Fortran code, which crashes with
> >
> > Fatal error in MPI_Allreduce: Invalid MPI_Op, error stack:
> > MPI_Allreduce(707)..........: MPI_Allreduce(sbuf=0x610be0, 
> > rbuf=0x610c40, count=5, MPI_2DOUBLE_PRECISION, MPI_MINLOC,
> > MPI_COMM_WORLD) failed
> > MPIR_MINLOC_check_dtype(215): MPI_Op MPI_MINLOC operation 
> not defined 
> > for this datatype
> >
> > as soon as it is compiled/linked with a MPI library (both 
> mpich2 and 
> > mvapich2), which was compiled with Intel C/C++ 10.0.026 and/or 
> > 10.1.008 on Linux
> > x86_64 machines.
> >
> > Intel 9.1, GNU or mixtures of GNU C/C++ and Lahey/Fujitsu 
> Fortran work 
> > well.
> >
> > My question - is anyone aware of miscompilation(s) of 
> mpich2/mvapich2 
> > caused by Intel C/C++ 10.0 and 10.1 ?
> >
> > thanks a lot,
> >
> >  - Christian
> >
> 
> 




More information about the mpich-discuss mailing list