bsc-pm / tampi

The Task-Aware MPI (TAMPI) library extends the functionality of standard MPI libraries by providing new mechanisms for improving the interoperability between parallel task-based programming models and MPI operations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

configure: Setting OMPI_CXX causes hang

devreal opened this issue · comments

I'm trying to use TAMPI in combination with Open MPI on a Cray XC40. When I call MPI_Init_thread with MPI_THREAD_MULTIPLE things work fine but when I pass MPI_TASK_MULTIPLE, the call fails. I assume that this is because TAMPI picks up the wrong MPI compiler (CC on the Cray, instead of Open MPI's mpicxx) and thus uses the wrong symbol. I tried to pass the Open MPI compiler wrapper to configure directly by setting OMPI_CXX. However, that causes configure to hang indefinitely:

$ ../configure --prefix=$HOME/opt/tampi-master OMPI_CXX=mpicxx 
checking for mpiicpc... no
checking for mpicxx... mpicxx

Any ideas why that happens? Any other way to force TAMPI to use the Open MPI compiler wrapper and ignore CC?

We have simplified the way to indicate which compiler TAMPI should use to compile. On the one hand, TAMPI will try to find a regular C++ compiler to compile and link the code (e.g., g++, icpc, etc.), but you can override it by defining the CXX environment variable.

On the other hand, TAMPI needs to know which are the MPI flags to include and link to the MPI library. The configure will try to find a MPI C++ compiler (e.g., mpicxx, mpic++, mpiicpc, etc.) in the PATH. Even so, you can directly indicate which MPI compiler should use by defining the MPICXX environment variable. The MPI compilation flags are retrieved using that binary.

Both changes are already in the master branch.

So, in your case, this configure command should link TAMPI with the OpenMPI that you have in your PATH:

$ ../configure --prefix=$HOME/opt/tampi-master MPICXX=mpicxx

Looks good now, I can confirm that having mpicc/mpicxx in the PATH is sufficient to build TAMPI. Closing this issue, thanks for the work!