Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] openmpi -cc=<compiler name> option
From: Gus Correa (gus_at_[hidden])
Date: 2011-09-22 17:09:38

Jeff Squyres wrote:
> On Sep 22, 2011, at 4:17 PM, Uday Kumar Reddy B wrote:
>> Yes, but I can't find anything about -cc in openmpi's mpicc man page. So, -cc should either not be supported or work as per mpich's mpicc if you are wrapping around it.
> mpicc has no way of knowing that an option is not supposed to work. It only knows about a small number of options that it can understand (e.g., --showme). Any other command line tokens are passed through to the underlying compiler.
> More specifically: how is mpicc supposed to know that any given option was intended for mpicc and not the underlying compiler, particularly the ones that it doesn't support?


If you want to use icc (instead of gcc or whatever is under your OpenMPI),
just download the OpenMPI tarball
to say /home/uday/install/openmpi, untar it,
and build it with icc [and I would guess, with icpc and ifort as well].
Configure it with --prefix=/your/favorite/directory (e.g. something
under your home directory, and pass the compiler names to it CC=icc,
CXX=icpc, F77=ifort, FC=ifort.
Use the prefix so as not to mix it
with other MPI flavors that may be there.
Building takes three steps: 1) configure; 2) make; 3) make install.
Then set your PATH and LD_LIBRARY_PATH to point to the bin and lib
subdirectories of /your/favorite/directory.
In case of doubts, read the README file and the OpenMPI FAQ.
You're good to go.
That one will have icc under mpicc's hood, which I guess
is what you want.
It is that simple.

My two cents,
Gus Correa