On May 11, 2008, at 12:00 AM, Wen Hao Wang wrote:
> 1. How can I change/set Fortran compiler used after installing
> I installed openmpi-1.2.5-2 on RHEL5.2 Server with x86_32 arch. The
> rpm has been shipped RHEL images. I directly installed the rpms
> without compiling the source code. Now all mpi* compiler wrappers
> point to GNU compilers. I need change to use Intel compilers by
> default. How should I do? I caught one message about configuration
> files /etc/openmpi-mca-params.conf and $HOME/.openmpi/mca-
> params.conf. Not sure whether these two files can help. While I
> failed to find detailed explanation for them.
You really need to compile Open MPI from source for this;
unfortunately, there are several aspects of Open MPI that are tied to
the specific compiler chain that is used. Specifically: you *might*
be able to get away without re-compiling Open MPI, but I wouldn't
You can download the OMPI source tarball from the main web site and
configure it with the following to specify the intel compiler suite:
./configure CC=icc CXX=icpc FC=ifort F77=ifort ...
You may want to list other configure options, such as --prefix, --
> 2. Can I use Intel compiler and GNU compiler together?
> I am not sure whether I can use two types of compiler to compile one
> program. For example, use GNU c/c++ compiler and Intel Fortran
> compiler together to compile my project.
Yes, there are cases where this works. But if possible, it's
generally easiest to simply use a single compiler toolset (e.g., all
Intel or all GNU). More specifically, unless you have a *need* to mix
the compilers, just use a single toolset.