From: Benjamin K. <ben...@na...> - 2008-04-07 16:15:40
|
> On Mon, 7 Apr 2008, Tim Kroeger wrote: > >> although on my desktop computer everything now seems to work fine, the >> installation on a cluster fails. This time, I get >> >> /tmp/ccD7kaXW.o: In function `main': >> amr.cc:(.text+0x1860): undefined reference to `lam_mpi_comm_world' >> /tmp/ccD7kaXW.o: In function `PMPI::Datatype::Set_name(char const*)': >> amr.cc:(.text._ZN4PMPI8Datatype8Set_nameEPKc[PMPI::Datatype::Set_name(char >> const*)]+0x23): undefined reference to `MPI_Type_set_name' >> /tmp/ccD7kaXW.o: In function `PMPI::Datatype::Set_attr(int, void const*)': >> amr.cc:(.text._ZN4PMPI8Datatype8Set_attrEiPKv[PMPI::Datatype::Set_attr(int, >> void const*)]+0x2a): undefined reference to `MPI_Type_set_attr' >> /tmp/ccD7kaXW.o: In function `PMPI::Datatype::Get_name(char*, int&) const': >> amr.cc:(.text._ZNK4PMPI8Datatype8Get_nameEPcRi[PMPI::Datatype::Get_name(char* >> , int&) const]+0x2a): undefined reference to `MPI_Type_get_name' >> >> and some more stuff like this. >> >> Any suggestions what is going wrong? > > I've never seen this exact error, but it looks like a missing (or > incorrect) MPI library in the linker command. It would seen the linker is looking for stuff in the MPI namespace, which means somewhere along the way mpi.h included the "C++" support. We try to avoid that. I am not sure what the LAM way to avoid the C++ binding is, but in OpenMPI's mpi.h it checks for OMPI_SKIP_MPICXX, and MPICH looks at MPICH_SKIP_MPICXX. Anyway, you likely need a libmesh_CXXFLAGS="-DMPICH_SKIP_MPICXX" or whatever in your environment. Take a look at the LAM mpi.h file, see what you need to do to suppress the C++ MPI support. -Ben |