Pavan Inguva
Pavan Inguva

Reputation: 85

Location of base directory of OpenMPI for cmake

I am trying to compile Trilinos with MPI capabilities. But to specify the cmake command, i need to also specify the MPI base directory:

cmake \
-DTPL_ENABLE_MPI=ON \
-DMPI_BASE_DIR:FILEPATH="" \
-DTrilinos_ENABLE_PyTrilinos:BOOL=ON \
-DTrilinos_ENABLE_ALL_PACKAGES=ON \
-DTrilinos_ENABLE_TESTS:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCMAKE_INSTALL_PREFIX:STRING="$HOME/trilinos-install" \
$SOURCE_DIR

However, I am unable to find any base directory even though MPI is installed on my machine. When i enter commands like mpirun --version, I get:

mpirun (Open MPI) 2.1.1

or ompi_info:

 Package: Open MPI buildd@lcy01-amd64-009 Distribution
                Open MPI: 2.1.1
  Open MPI repo revision: v2.1.0-100-ga2fdb5b
   Open MPI release date: May 10, 2017
                Open RTE: 2.1.1
...

I am running Ubuntu 18.04 LTS on WSL if that is useful info.

Upvotes: 3

Views: 4999

Answers (1)

ztdep
ztdep

Reputation: 381

The command "which mpich" can give you the default directory of mpi installation. Another way is to use mpic++ as the compiler in the CMake.

Upvotes: 0

Related Questions