edu
edu

Reputation: 11

Could NOT find MPI_C and MPI cmake on Ubuntu 18.04

- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'libusb-1.0>=1.0.17'
--   Found libusb-1.0, version 1.0.21
-- Checking for module 'opencv>=3.0'
--   Found opencv, version 3.2.0
-- Checking for module 'libcaer>=2.0'
--   Found libcaer, version 3.3.7
-- Could NOT find MPI_C (missing: MPI_C_WORKS)
-- Found MPI_CXX: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so (found version "3.1")
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find MPI (missing: MPI_C_FOUND) (found version "3.1")
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.10/Modules/FindMPI.cmake:1444 (find_package_handle_standard_args)
  CMakeLists.txt:193 (find_package)

Tried everything exported the paths done everything I've found on google still have this annoying error.

Reading package lists... Done
Building dependency tree
Reading state information... Done
cmake is already the newest version (3.10.2-1ubuntu2.18.04.1).

Which command results:

endrel@Siraly:~/Developer/BrainHarmonics/build$ which mpicc
/usr/bin/mpicc
endrel@Siraly:~/Developer/BrainHarmonics/build$ which mpicxx
/usr/bin/mpicxx

Upvotes: 1

Views: 7294

Answers (1)

MatzZze
MatzZze

Reputation: 401

From FindMPI.cmake module:

If the find procedure fails for a variable MPI_<lang>_WORKS, then the settings detected by or passed to the module did not work and even a simple MPI test program failed to compile.

-- Could NOT find MPI_C (missing: MPI_C_WORKS)

Your mpicc is found but probably not working correctly.

Maybe your CMakeLists.txt is wrong, but you didn't provide it's content, so it's hard to say.

Upvotes: 1

Related Questions