Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Symbol _mpi_get_address0dr4_ not found when using OSX + gfortran + mpif90
From: Gustavo Correa (gus_at_[hidden])
Date: 2013-06-02 19:32:01


Hi Derek

Since your mpif90 is installed in /opt/local/lib/openmpi/bin/mpif90
shouldn't the openmpi libraries be located in /opt/local/lib/openmpi/lib,
rather than /opt/local/lib that your "--showme" shows?
I wonder if this is an environment variable problem
(PATH and LD_LIBRARY_PATH/DYLD_LIBRARY_PATH),
in a system with multiple versions of OpenMPI installed.

I hope it helps,
Gus Correa

On Jun 2, 2013, at 5:21 PM, Derek Teaney wrote:

> Hi,
>
> 1)
> I am getting a frustrating message having to
> do with linking a simple fortran program
>
> Typing
>
> /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
> <test_usempi.f>
>
> 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_'
>
> gives
>
> 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.
>
> <test_mpifh.f>
>
>
> ------------------------------------------------------------------------
> 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]
> ------------------------------------------------------------------------
>
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users