Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Mac Ifort and gfortran together
From: Tim Prince (n8tm_at_[hidden])
Date: 2010-12-15 21:28:23


On 12/15/2010 8:22 PM, Jeff Squyres wrote:
> Sorry for the ginormous delay in replying here; I blame SC'10, Thanksgiving, and the MPI Forum meeting last week...
>
>
> On Nov 29, 2010, at 2:12 PM, David Robertson wrote:
>
>> I'm noticing a strange problem with Open MPI 1.4.2 on Mac OS X 10.6. We use both Intel Ifort 11.1 and gfortran 4.3 on the same machine and switch between them to test and debug code.
>>
>> I had runtime problems when I compiled openmpi in my usual way of no shared libraries so I switched to shared and it runs now.
> What problems did you have? OMPI should work fine when compiled statically.
>
>> However, in order for it to work with ifort I ended up needing to add the location of my intel compiled Open MPI libraries (/opt/intelsoft/openmpi/lib) to my DYLD_LIBRARY_PATH environment variable to to get codes to compile and/or run with ifort.
> Is this what Intel recommends for anything compiled with ifort on OS X, or is this unique to OMPI-compiled MPI applications?
>
>> The problem is that adding /opt/intelsoft/openmpi/lib to DYLD_LIBRARY_PATH broke my Open MPI for gfortran. Now when I try to compile with mpif90 for gfortran it thinks it's actually trying to compile with ifort still. As soon as I take the above path out of DYLD_LIBRARY_PATH everything works fine.
>>
>> Also, when I run ompi_info everything looks right except prefix. It says /opt/intelsoft/openmpi rather than /opt/gfortransoft/openmpi like it should. It should be noted that having /opt/intelsoft/openmpi in LD_LIBRARY_PATH does not produce the same effect.
> I'm not quite clear on your setup, but it *sounds* like you're somehow mixing up 2 different installations of OMPI -- one in /opt/intelsoft and the other in /opt/gfortransoft.
>
> Can you verify that you're using the "right" mpif77 (and friends) when you intend to, and so on?
>
Well, yes, he has to use the MPI Fortran libraries compiled by ifort
with his ifort application build, and the ones compiled by gfortran with
a gfortran application build. There's nothing "strange" about it; the
PATH for mpif90 and DYLD_LIBRARY_PATH for the Fortran library have to be
set correctly for each case. If linking statically with the MPI Fortran
library, you still must choose the one built with the compatible
Fortran. gfortran and ifort can share C run-time libraries but not the
Fortran ones. It's the same as on linux (and, likely, Windows).

-- 
Tim Prince