Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29238 Discussions

I really need help getting MPI and iFort working together on OS X Leopard

intel1
Beginner
1,816 Views
I've been suffering with trying to get this to work for nearly two weeks now to no avail.

Can anyone tell me how to get MPI (any version that works) that will compile with iFort?

I've tried getting OpenMPI to work but although I managed to compile it in the end (by using the -no-multibyte-chars flag in the configure process) but it wouldn't install on my Mac Pro (but did on my 32bit MacBook). I think one problem might be that a gcc compiled version of OpenMPI is bundled with Leopard's Xcode and its conflicting so I probably need to somehow replace it with a recompiled version that uses ICC, ICPC and iFort.

Please, can someone help, anything? I'm at my wits end!!

I have the latest version of all the Intel compilers and Leopard 10.5.1.
0 Kudos
5 Replies
Ron_Green
Moderator
1,816 Views
It's failing on install - weird. Can you show us the failure you see (cut n' paste) from the
'make install' step?

thanks

ron
0 Kudos
TimP
Honored Contributor III
1,816 Views
Most of what you should need to know is in the OpenMPI FAQ or in the files which come with your OpenMPI source. You use the --prefix option in configure to avoid conflicts with any other MPI installation which you want to keep. You should be able to use either gcc/g++ or icc/icpc along with ifort to build your mpi, taking care to use exclusively 32- or 64-bit compilers. When you run the MPI, the MPI and compilers you want must appear first on PATH and LD_LIBRARY_PATH on each node.
Some of my colleagues prefer lam mpi, if using only GigE interconnect.
0 Kudos
intel1
Beginner
1,816 Views
I just tried installing it again on my Mac Pro and it seemed to work this time without any errors. I don't know what was going on before.

So, in order to use this, what do I have to do? Am I correct in saying its only a matter of getting OS X to look for my Intel compiled OpenMPI libraries?

My configure command was:

./configure --prefix=/usr/local F77=ifort FC=ifort CC="icc -no-multibyte-chars" CXX="icpc -no-multibyte-chars" --enable-mpi-f90

I installed with:

sudo make all install

My .bashrc file is:

PATH=$PATH:$HOME/bin:/usr/local/bin
SHELL=/bin/bash
source /opt/intel/fce/10.1.007/bin/ifortvars.sh
source /opt/intel/idbe/10.1.007/bin/idbvars.sh
export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}
export DYLD_LIBRARY_PATH=/usr/local/lib:${DYLD_LIBRARY_PATH}

Calling mpif90 results in the following message:

--------------------------------------------------------------------------
Unfortunately, this installation of Open MPI was not compiled with
Fortran 90 support. As such, the mpif90 compiler is non-functional.

--------------------------------------------------------------------------

So I'm guessing its trying to use Leopard's integrated version of OpenMPI.

BTW you mentioned I should exclusively use 32 or 64 bit compilers, how do i do this? My MacBook is 32 bit and my MP is obviously 64 bit.

PS Sorry for coming across as such a newbie and thank you so much for your help!
0 Kudos
TimP
Honored Contributor III
1,816 Views
Didn't the OpenMPI documentation show the additional configure parameter F90=ifort ? I'm guessing that the Leopard MPI would use gfortran, if it is set up for mpif90, and that won't work with ifort. I recall the OpenMPI notes pointing out that you normally want the same Fortran for all Fortran versions, in case you want to use both mpif77 and mpif90 in the same build.

You probably got the 64-bit thing right. You would set the ifort and icc 64-bit environment (fce, cce) and use gcc/g++ without the -m32 switch. If you intended to use both 32- and 64-bit MPI, you would need to segregate them, e.g. into /usr/local/omp64/ and /usr/local/omp32, the latter built with the fc, cc, and gcc -m32 compilers.
0 Kudos
Ron_Green
Moderator
1,816 Views
Your PATH is wrong and is picking up the default OpenMPI. You need /usr/local/bin BEFORE the other things in PATH:

export PATH=/usr/local/bin:${PATH}:${HOME}/bin

you can check this with:

which mpif90

to show where it's finding the command mpif90.

If you built on the 64bit Mac, then you will have defaulted to 64bits. Similarly, on the MacBook your default is 32bits. Check out the -m32 and -m64 options to override these defaults.

ron
0 Kudos
Reply