How to ask macports to wrap openmpi with intel compilers?

203 views Asked by At

I used MacPorts to install openmpi. However, I realized when I use mpicxx, it actually uses clang at the backend. I want it to wrap with intel compiler (i.e. icpc). I checked the openmpi website but didn't figure out how to do this.

Could anyone help me?

1

There are 1 answers

3
John Zwinck On BEST ANSWER

It's spelled out in the docs:

Set the environment variable OMPI_CXX (or perhaps just CXX) before invoking mpicxx or mpic++.

-cxx=name

Use compiler name instead of the default choice. Use this only if the compiler is compatible with the MPICH library (see below)

or

The environment variables MPICH_CXX may be used to select different C++ compiler and linker.