Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] Symbol _mpi_get_address0dr4_ not found when using OSX + gfortran + mpif90
From: Derek Teaney (derek.teaney_at_[hidden])
Date: 2013-06-02 17:21:16


     I am getting a frustrating message having to
     do with linking a simple fortran program


/opt/local/lib/openmpi/bin/mpif90 tmp.f

Yields with gfortran.

Undefined symbols for architecture x86_64:
  "_mpi_get_address0dr4_", referenced from:
      _MAIN__ in ccGWs06E.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status

I have attached the program, which runs fine on a linux box

2) The --showme gives

/opt/local/bin/gfortran-mp-4.8 -I/opt/local/include/openmpi -Wl,-commons,use_dylibs -I/opt/local/lib -L/opt/local/lib -lmpi_usempi -lmpi_mpifh -lmpi

Using gfortran-4.7 makes no difference.

3) Examining the file /opt/local/lib/libmpi_usempi.dylib with

nm libmpi_usempi.dylib | grep 'address0dr4_'


0000000000000bf0 T _mpi_address0dr4_

Something I'm missing …. but shouldn't that be mpi_get_address0dr4_

4/ Changing the USE mpi command to

include 'mpif.h' works just fine.

Shouldn't they be identical.

Derek Teaney
Dept. of Physics & Astronomy
SUNY at Stony Brook
Stony Brook, NY 11794-3800
Tel: (631) 632-4489
Fax: (631) 632-9718
e-mail: Derek.Teaney_at_[hidden]