[mvapich-discuss] MVAPICH2 Invalid communicator errors

Shaun Rowland rowland at cse.ohio-state.edu
Thu Sep 13 18:53:00 EDT 2007


Mark Potts wrote:
> Nathan,
>    I'm far from an expert, but when I manually removed the
>    -L/usr/include from the icc command line generated by mpicc,
>    my problem went away. The mpi.h in your /usr/include in all
>    probability does conflict with the one provided in MVAPICH2.
>    The harder problem in my case and perhaps yours was finding
>    how the /usr/include was getting injected.  Hint: read the
>    mpicc script for your intel builds very carefully.
>          regards,

Can you try the attached patch with the MVPAICH2 0.9.8 source code? This
modifies the mpicc.in, mpif77.in, mpif90.in, and mpicxx.in files to put
the MVAPICH2 installation include directory before anything else. It
should be all right to do this in all cases.

What I was saying before in reference to the standard include define
doesn't matter. Once the compiler has found the proper include file,
it's not going to search for it again or anything - and with this
change, it should be checking the MVAPICH2 installation include
directory first no matter what.

Nathan, I am not sure if this will help you - but maybe you can try it
as well. This has the same effect as editing the already built compiler
commands in the same way... the context should be clear from the patch,
so you both could try that as well.
-- 
Shaun Rowland	rowland at cse.ohio-state.edu
http://www.cse.ohio-state.edu/~rowland/
-------------- next part --------------
Index: src/env/mpicc.in
===================================================================
--- src/env/mpicc.in	(revision 1507)
+++ src/env/mpicc.in	(working copy)
@@ -225,10 +225,10 @@
 	# prepend the path for the shared libraries to the library list
 	mpilibs="$C_LINKPATH_SHL$libdir $mpilibs"
     fi
-    $Show $CC $CFLAGS $LDFLAGS $allargs -I$includedir -L$libdir $mpilibs $MPI_OTHERLIBS
+    $Show $CC -I$includedir $CFLAGS $LDFLAGS $allargs -L$libdir $mpilibs $MPI_OTHERLIBS
     rc=$?
 else
-    $Show $CC $CFLAGS $allargs -I$includedir
+    $Show $CC -I$includedir $CFLAGS $allargs 
     rc=$?
 fi
 
Index: src/env/mpif90.in
===================================================================
--- src/env/mpif90.in	(revision 1507)
+++ src/env/mpif90.in	(working copy)
@@ -331,10 +331,10 @@
         # Prepend the path for the shared libraries to the library list
         mpilibs="$F90_LINKPATH_SHL$libdir $mpilibs"
     fi
-    $Show $F90 $F90FLAGS $LDFLAGS $allargs $F90INCDIRS $F90MODDIRS -L$libdir $F90MODLIBS $mpilibs $MPI_OTHERLIBS
+    $Show $F90 $F90INCDIRS $F90FLAGS $LDFLAGS $allargs $F90MODDIRS -L$libdir $F90MODLIBS $mpilibs $MPI_OTHERLIBS
     rc=$?
 else
-    $Show $F90 $F90FLAGS $allargs $F90INCDIRS $F90MODDIRS
+    $Show $F90 $F90INCDIRS $F90FLAGS $allargs $F90MODDIRS
     rc=$?
 fi
 if [ -n "$rmfiles" ] ; then
Index: src/env/mpicxx.in
===================================================================
--- src/env/mpicxx.in	(revision 1507)
+++ src/env/mpicxx.in	(working copy)
@@ -220,10 +220,10 @@
         # Prepend the path for the shared libraries to the library list
         shllibpath="$CXX_LINKPATH_SHL$libdir"
     fi
-    $Show $CXX $CXXFLAGS $LDFLAGS $allargs -I$includedir -L$libdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS
+    $Show $CXX -I$includedir $CXXFLAGS $LDFLAGS $allargs -L$libdir $shllibpath $cxxlibs $mpilibs $MPI_OTHERLIBS
     rc=$?
 else
-    $Show $CXX $CXXFLAGS $allargs -I$includedir
+    $Show $CXX -I$includedir $CXXFLAGS $allargs 
     rc=$?
 fi
 
Index: src/env/mpif77.in
===================================================================
--- src/env/mpif77.in	(revision 1507)
+++ src/env/mpif77.in	(working copy)
@@ -281,10 +281,10 @@
         # Prepend the path for the shared libraries to the library list
         mpilibs="$FC_LINKPATH_SHL$libdir $mpilibs"
     fi
-    $Show $FC $FFLAGS $LDFLAGS $allargs -I$includedir -L$libdir $mpilibs $MPI_OTHERLIBS
+    $Show $FC -I$includedir $FFLAGS $LDFLAGS $allargs -L$libdir $mpilibs $MPI_OTHERLIBS
     rc=$?
 else
-    $Show $FC $FFLAGS $allargs -I$includedir
+    $Show $FC -I$includedir $FFLAGS $allargs 
     rc=$?
 fi
 if [ -n "$rmfiles" ] ; then


More information about the mvapich-discuss mailing list