Search code examples
macoscompilationosx-snow-leopardopenmpimeep

Compiling meep with openmpi


I am trying to build meep from MIT with OpenMPI on an iMac with Corei7 processor. I installed OpenMPI using macport.

I have also installed hdf5 with OpenMPI.

Now when I try to compile meep with mpi using --with-mpi, meep does not compile and gives the following error message.

CXXLD  meep_mpi
Undefined symbols:
  "MPI::Comm::Set_errhandler(MPI::Errhandler const&)", referenced from:
  vtable for MPI::Intercommin libmeep_mpi.a(h5file.o)
  vtable for MPI::Graphcommin libmeep_mpi.a(h5file.o)
  vtable for MPI::Cartcommin libmeep_mpi.a(h5file.o)
  vtable for MPI::Intracommin libmeep_mpi.a(h5file.o)
  vtable for MPI::Commin libmeep_mpi.a(h5file.o)
  vtable for MPI::Intercommin libmeep_mpi.a(mympi.o)
  vtable for MPI::Graphcommin libmeep_mpi.a(mympi.o)
  vtable for MPI::Cartcommin libmeep_mpi.a(mympi.o)
  vtable for MPI::Intracommin libmeep_mpi.a(mympi.o)
  vtable for MPI::Commin libmeep_mpi.a(mympi.o)
  "MPI::Win::Set_errhandler(MPI::Errhandler const&)", referenced from:
  vtable for MPI::Winin libmeep_mpi.a(h5file.o)
  vtable for MPI::Winin libmeep_mpi.a(mympi.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [meep_mpi] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I do not understand whats going wrong. I am following the instructions given in the meep website. Parallel Meep and Meep Installation

Please help.


Solution

  • I recommend mpich vs. openmpi (my preference), but make sure your HDF5 MPI install is okay (i.e., make sure you set the --with-mpi configure flag and check that your config has found your mpi install in the final message after running configure).