Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPI configuration is somehow broken #122

Open
knepley opened this issue Apr 3, 2019 · 9 comments
Open

MPI configuration is somehow broken #122

knepley opened this issue Apr 3, 2019 · 9 comments

Comments

@knepley
Copy link
Collaborator

knepley commented Apr 3, 2019

I get this. What log do you need from me?

Error configuring PRAGMATIC with cmake Could not execute "['/PETSc3/petsc/petsc-pylith/arch-pylith-debug/bin/cmake .. -DCMAKE_INSTALL_PREFIX=/PETSc3/petsc/petsc-pylith/arch-pragmatic-debug -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_C_COMPILER="/PETSc3/petsc/bin/mpicc" -DCMAKE_AR=/usr/bin/ar -DCMAKE_RANLIB=/usr/bin/ranlib -DCMAKE_C_FLAGS:STRING="-Qunused-arguments -g3" -DCMAKE_C_FLAGS_DEBUG:STRING="-Qunused-arguments -g3" -DCMAKE_C_FLAGS_RELEASE:STRING="-Qunused-arguments -g3" -DCMAKE_CXX_COMPILER="/PETSc3/petsc/bin/mpicxx" -DCMAKE_CXX_FLAGS:STRING="-g" -DCMAKE_CXX_FLAGS_DEBUG:STRING="-g" -DCMAKE_CXX_FLAGS_RELEASE:STRING="-g" -DBUILD_SHARED_LIBS=on -DMETIS_DIR=/PETSc3/petsc/petsc-pylith/arch-pragmatic-debug -DENABLE_VTK=OFF -DENABLE_OPENMP=OFF -DEIGEN_INCLUDE_DIR=/PETSc3/petsc/petsc-pylith/arch-pragmatic-debug/include/eigen3 -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON']":
-- The C compiler identification is AppleClang 6.0.0.6000057
-- The CXX compiler identification is AppleClang 6.0.0.6000057
-- Check for working C compiler: /PETSc3/petsc/bin/mpicc
-- Check for working C compiler: /PETSc3/petsc/bin/mpicc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /PETSc3/petsc/bin/mpicxx
-- Check for working CXX compiler: /PETSc3/petsc/bin/mpicxx -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- LIBRT_LIBRARIES:
-- Configured without VTK support.
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Found MPI_C: /PETSc3/petsc/bin/mpicc
-- Configuring incomplete, errors occurred!
See also "/PETSc3/petsc/petsc-pylith/arch-pragmatic-debug/externalpackages/git.pragmatic/petsc-build/CMakeFiles/CMakeOutput.log".CMake Error at /PETSc3/petsc/petsc-pylith/arch-pylith-debug/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find MPI_CXX (missing: MPI_CXX_LIBRARIES MPI_CXX_INCLUDE_PATH)
Call Stack (most recent call first):
/PETSc3/petsc/petsc-pylith/arch-pylith-debug/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
/PETSc3/petsc/petsc-pylith/arch-pylith-debug/share/cmake-3.9/Modules/FindMPI.cmake:640 (find_package_handle_standard_args)
CMakeLists.txt:65 (FIND_PACKAGE)

@taupalosaurus
Copy link
Contributor

Damn. At least the error message is pretty clear, the line that fails is
FIND_PACKAGE(MPI REQUIRED) from the main CMakeLists.txt

Now, if I understand what I just googled, find_package looks if it finds a FindMPI.cmake in the Cmake/Modules directory, and since there is no such file, tries to find it by itself.

So. Cmake can't find your MPI... is it in a very non standard place ?

@taupalosaurus
Copy link
Contributor

We're currently using this: https://cmake.org/cmake/help/v3.0/module/FindMPI.html
It should find MPI in standard locations.

I quote their doc if it fails:

If this fails, or if your MPI implementation does not come with
a compiler wrapper, then set both MPI_LIBRARIES and
MPI
_INCLUDE_PATH. You may also set any other variables
listed above, but these two are required. This will circumvent
autodetection entirely.

I don't really know if your fancy build system lets you pass cmake command line options for external modules....

@taupalosaurus
Copy link
Contributor

taupalosaurus commented Apr 3, 2019

This line from your log tells us what is going wrong doesn't it ?

Could NOT find MPI_CXX (missing: MPI_CXX_LIBRARIES MPI_CXX_INCLUDE_PATH)

Where are these ?

@knepley
Copy link
Collaborator Author

knepley commented Apr 3, 2019

The first line show what we executed the build with:

-DCMAKE_CXX_COMPILER="/PETSc3/petsc/bin/mpicxx"

Do we need to set another option?

@taupalosaurus
Copy link
Contributor

Oh yes sorry.
I can only guess from the scarce documentation/user forums I find online.

Error message suggests that you set -DMPI_CXX_LIBRARIES and -DMPI_CXX_INCLUDE_PATH
Another forum suggests using -DMPI_CXX_COMPILER could be enough

If neither of these work, I would try inserting CMAKE in the variable names, and if neither work I would cry for help to @ggorman .

I'm also going to try to setup a clean virtual machine to experiment with Stephan's bug (issue #120), if you tell me exactly how you configure I can try to replicate and experiment myself

@taupalosaurus
Copy link
Contributor

https://cmake.org/pipermail/cmake/2016-November/064634.html

Also suggests

-DMPI_C_COMPILER=/path/to/mpicc
-DMPI_CXX_COMPILER=/path/to/mpiCC
-DMPI_Fortran_COMPILER=/path/to/mpif90

is enough

@taupalosaurus
Copy link
Contributor

@knepley was any of the above useful ? Can you pass specific configuration options for external modules to your Build System ?

@knepley
Copy link
Collaborator Author

knepley commented Apr 7, 2019 via email

@taupalosaurus
Copy link
Contributor

In conclusion, was there anything wrong on our side regarding this issue ?
Except the use of Cmake and C++ ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants