From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu May 16 2013 - 15:52:41 CDT

Hi,
  I'm sure that you're missing some OpenMPI library dependency.
With some MPI implementations, rather than linking the program with
the system compilers or Intel C/C++, the user is expected to call
"mpicc" and/or "mpiCC" to compile/link the application. The mpicc/mpiCC
are usually scripts or small wrapper programs that just pass the right flags
to link with whatever internal libraries the MPI implementation uses.
If you look at what libraries get linked compiling a small hello world type
program with OpenMPI, it should be easy to add whatever other library
is missing that OpenMPI depends on.

Up to this point, the MPI builds of VMD have primarily been targeted
at the big Cray XE6/XK7 machines and I haven't had a chance to do much
on clusters using OpenMPI or MVAPICH, but the only differences should
be little details like the linkage flags, as you're currently seeing.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Thu, May 16, 2013 at 06:00:43PM +0200, Vlad Cojocaru wrote:
> Dear all,
>
> I tried as a test to build the CVS code of VMD (2013-05-16) also with
> MPI support.
> Details:
> OS: openSUSE 12.3
> Compiler: gcc 4.7.2
> mpi: openmpi 1.5.5 and 1.6.4
> cuda: 5.0.35
>
> However, I get the error below ...
> Anybody experience same issue ?
>
> Best wishes
> Vlad
>
> P.S. Without MPI, no problem
>
> VMDMPI.o: In function `MPI::Op::Init(void (*)(void const*, void*, int,
> MPI::Datatype const&), bool)':
> VMDMPI.C:(.text._ZN3MPI2Op4InitEPFvPKvPviRKNS_8DatatypeEEb[_ZN3MPI2Op4InitEPFvPKvPviRKNS_8DatatypeEEb]+0x19):
> undefined reference to `ompi_mpi_cxx_op_intercept'
> VMDMPI.o: In function `MPI::Intracomm::Create(MPI::Group const&) const':
> VMDMPI.C:(.text._ZNK3MPI9Intracomm6CreateERKNS_5GroupE[_ZNK3MPI9Intracomm6CreateERKNS_5GroupE]+0x27):
> undefined reference to `MPI::Comm::Comm()'
> VMDMPI.o: In function `MPI::Intercomm::Merge(bool)':
> VMDMPI.C:(.text._ZN3MPI9Intercomm5MergeEb[_ZN3MPI9Intercomm5MergeEb]+0x25):
> undefined reference to `MPI::Comm::Comm()'
> VMDMPI.o: In function `MPI::Intracomm::Split(int, int) const':
> VMDMPI.C:(.text._ZNK3MPI9Intracomm5SplitEii[_ZNK3MPI9Intracomm5SplitEii]+0x26):
> undefined reference to `MPI::Comm::Comm()'
> VMDMPI.o: In function `MPI::Intracomm::Clone() const':
> VMDMPI.C:(.text._ZNK3MPI9Intracomm5CloneEv[_ZNK3MPI9Intracomm5CloneEv]+0x2a):
> undefined reference to `MPI::Comm::Comm()'
> VMDMPI.o: In function `MPI::Cartcomm::Clone() const':
> VMDMPI.C:(.text._ZNK3MPI8Cartcomm5CloneEv[_ZNK3MPI8Cartcomm5CloneEv]+0x25):
> undefined reference to `MPI::Comm::Comm()'
> VMDMPI.o:VMDMPI.C:(.text._ZN3MPI8Cartcomm3SubEPKb[_ZN3MPI8Cartcomm3SubEPKb]+0x7a):
> more undefined references to `MPI::Comm::Comm()' follow
> VMDMPI.o:(.rodata._ZTVN3MPI8DatatypeE[_ZTVN3MPI8DatatypeE]+0x78):
> undefined reference to `MPI::Datatype::Free()'
> VMDMPI.o:(.rodata._ZTVN3MPI3WinE[_ZTVN3MPI3WinE]+0x48): undefined
> reference to `MPI::Win::Free()'
> collect2: error: ld returned 1 exit status
> make: *** [vmd_LINUXAMD64] Error 1
>
> --
> Dr. Vlad Cojocaru
> Max Planck Institute for Molecular Biomedicine
> Department of Cell and Developmental Biology
> Röntgenstrasse 20, 48149 Münster, Germany
> Tel: +49-251-70365-324; Fax: +49-251-70365-399
> Email: vlad.cojocaru[at]mpi-muenster.mpg.de
> http://www.mpi-muenster.mpg.de/research/teams/groups/rgcojocaru

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/