Cannot install MPI version

528 views
Skip to first unread message

Ivan Nekhaev

unread,
Jul 14, 2022, 12:55:25 PM7/14/22
to revbayes-users
Hi all,

The regular version runs and works well. However, when trying to install the mpi version from the manual, an error appears.

Output after the command

./build.sh -mpi true

is: 

(base) anisus@MacBook-Pro cmake % ./build.sh -mpi true

Building rb-mpi

Generating version numbers in GitVersion.cpp

Running './regenerate.sh /Users/anisus/revbayes/projects/cmake/build-mpi

Making build directory '/Users/anisus/revbayes/projects/cmake/build-mpi'

Generating src/generated_include_dirs.cmake

Generating src/libs/CMakeLists.txt

Generating src/core/CMakeLists.txt

Generating src/revlanguage/CMakeLists.txt

Generating src/help2yml/CMakeLists.txt

Generating src/cmd/CMakeLists.txt


Note these environment variables:

Running 'cmake ../../../src -DRB_EXEC_NAME=rb-mpi -DMPI=ON ' in /Users/anisus/revbayes/projects/cmake/build-mpi

-- Could NOT find MPI_C (missing: MPI_C_WORKS) 

-- Could NOT find MPI_CXX (missing: MPI_CXX_WORKS) 

CMake Error at /opt/homebrew/Cellar/cmake/3.23.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):

  Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND)

Call Stack (most recent call first):

  /opt/homebrew/Cellar/cmake/3.23.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)

  /opt/homebrew/Cellar/cmake/3.23.2/share/cmake/Modules/FindMPI.cmake:1830 (find_package_handle_standard_args)

  CMakeLists.txt:62 (find_package)


-- Configuring incomplete, errors occurred!

See also "/Users/anisus/revbayes/projects/cmake/build-mpi/CMakeFiles/CMakeOutput.log".

See also "/Users/anisus/revbayes/projects/cmake/build-mpi/CMakeFiles/CMakeError.log".

________________________

I use MacBook with Apple M1 and MacOS Monterey 12.3

CMake version is 3.23

Has anyone faced a similar problem?

Googling gives out several similar problems with other programs, but the proposed solutions do not work for me.

Thank you in advance and I apologize if the question has an obvious solution.

Benjamin Redelings

unread,
Jul 15, 2022, 9:53:22 AM7/15/22
to revbaye...@googlegroups.com
On 7/14/22 12:55 PM, Ivan Nekhaev wrote:
> Running 'cmake ../../../src -DRB_EXEC_NAME=rb-mpi -DMPI=ON ' in
> /Users/anisus/revbayes/projects/cmake/build-mpi
>
> -- Could NOT find MPI_C (missing: MPI_C_WORKS)
>
> -- Could NOT find MPI_CXX (missing: MPI_CXX_WORKS)
>
> CMake Error at
> /opt/homebrew/Cellar/cmake/3.23.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230
> (message):
>
>   Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND)
>
>
> I use MacBook with Apple M1 and MacOS Monterey 12.3
>
> CMake version is 3.23
>
> Has anyone faced a similar problem?
>
> Googling gives out several similar problems with other programs, but
> the proposed solutions do not work for me.
>
> Thank you in advance and I apologize if the question has an obvious
> solution.
>
Hi Ivan,

is MPI installed on your computer?  Cmake says that it can't find MPI,
and one possible reason is that MPI is not installed.

This link indicates that the mpi compilers might be called 'mpicc' and
'mpicxx':
https://stackoverflow.com/questions/63087881/could-not-find-mpi-c-and-mpi-cmake-on-ubuntu-18-04

If you run "mpicc -v" at the command line, is the program found?

It looks like you can install open-mpi using homebrew:
https://formulae.brew.sh/formula/open-mpi

-BenRI

Ivan Nekhaev

unread,
Jul 15, 2022, 10:30:33 AM7/15/22
to Benjamin Redelings, revbaye...@googlegroups.com
mpicc -v returns:

mpicc for MPICH version 3.3.2


Yes, I installed open-mpi (4.1.4) with homebrew before trying to compile RevBayes


пт, 15 июл. 2022 г. в 16:53, Benjamin Redelings <benjamin....@gmail.com>:
--
You received this message because you are subscribed to a topic in the Google Groups "revbayes-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/revbayes-users/lTm__L2jp34/unsubscribe.
To unsubscribe from this group and all its topics, send an email to revbayes-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/revbayes-users/579aa917-7589-fb06-b1be-76d8945abe52%40gmail.com.


--
Dr. Ivan Nekhaev
Senior Scientist
Department of Applied Ecology
Saint Petersburg State University

Benjamin Redelings

unread,
Jul 15, 2022, 10:57:33 AM7/15/22
to Ivan Nekhaev, revbaye...@googlegroups.com

So, mpich and open-mpi are two ALTERNATIVE mpi implementations.  You installed open-mpi 4.1.4, but mpicc is finding mpich 3.3.2, which is different.  Any idea how you got two different mpi versions installed?

I suspect that cmake is finding mpi, but its attempts to USE it are failing.

-BenRI

Reply all
Reply to author
Forward
0 new messages