Ah, I bet its failing right here: find_package(MPI)
Jeff Hammond
@jeffhammond
yes it tells me CMake Error at cmake/detect/MPI.cmake:69 (message): Could not find mpi.h Call Stack (most recent call first): CMakeLists.txt:361 (include)
and then "See also "/global/homes/j/jhammond/ELEMENTAL/git/build-cray/CMakeFiles/CMakeOutput.log"."
instead put: message(STATUS "JEFF: ${MPI_PATH}") on line 62
Jeff Hammond
@jeffhammond
but you can see that lines 46-90 are specifically for OpenMPI
Cray MPI (MPICH-based) should not need that
would be better to test if OMPI used and only then look for mpi.h
so my next attempt is to just disable all of that code
Ryan H. Lewis
@rhl-
sure, I was just suggesting to see what that is
might suggest what your problem is.
Jeff Hammond
@jeffhammond
yeah i will debug later once everything else works
Jeff Hammond
@jeffhammond
i got the build working just fine but then i hit Cray compiler ICE. FML
Jeff Hammond
@jeffhammond
back to MPI debugging: i made it print this out: -- Jeff: MPI_C_INCLUDE_PATH= -- Jeff: MPI_HEADER_PATH=MPI_HEADER_PATH-NOTFOUND this is how i cmaked: jhammond@edison12:~/ELEMENTAL/git/build-cray> rm -rf * && cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/ELEMENTAL/install-cray -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_COMPILER_ID=Cray -DCMAKE_C_COMPILER_ID=Cray -DCMAKE_Fortran_COMPILER_ID=Cray -DCMAKE_CXX_COMPILER=CC -DCMAKE_C_COMPILER=cc -DCMAKE_Fortran_COMPILER=ftn -DMPI_CXX_COMPILER=CC -DMPI_C_COMPILER=cc -DMPI_Fortran_COMPILER=ftn -DMPI_C_INCLUDE_PATH=$CRAY_MPICH_DIR/include -DMPI_C_COMPILE_FLAGS="" -DMPI_C_LINK_FLAGS="" -DMPI_C_LIBRARIES="" -DCMAKE_CXX_FLAGS="-h std=c++11 -h omp " -DCMAKE_C_FLAGS="-h std=c11 -h omp " -DMATH_LIBS="-L${CRAY_LIBSCI_PREFIX_DIR}/lib -lsci_cray_mpi_mp -lsci_cray_mp " -DEL_HYBRID=TRUE -DEL_DISABLE_PARMETIS=TRUE -DCMAKE_BUILD_TYPE=Debug -DEL_USE_64BIT_INTS=ON -DEL_USE_64BIT_BLAS_INTS=OFF -DINSTALL_PYTHON_PACKAGE=OFF -DEL_DISABLE_QUAD=TRUE please tell me why -DMPI_C_INCLUDE_PATH=$CRAY_MPICH_DIR/include is not effective
Jeff Hammond
@jeffhammond
so CMake is too dumb to pass arguments down: -- Jeff: MPI_C_INCLUDE_PATH=/opt/cray/mpt/7.4.1/gni/mpich-cray/8.3/include -- Unable to determine MPI from MPI driver /opt/cray/craype/2.5.5/bin/cc -- Found MPI_C: /opt/cray/craype/2.5.5/bin/cc -- Unable to determine MPI from MPI driver /opt/cray/craype/2.5.5/bin/CC -- Found MPI_CXX: /opt/cray/craype/2.5.5/bin/CC -- Performing Test EL_HAVE_MPI_REDUCE_SCATTER -- Performing Test EL_HAVE_MPI_REDUCE_SCATTER - Success -- Jeff: MPI_C_INCLUDE_PATH= -- Jeff: MPI_HEADER_PATH=MPI_HEADER_PATH-NOTFOUND first message is in CMakeLists.txt, second and third are in cmake/detect/MPI.cmake
Jack Poulson
@poulson
@jeffhammond I frequently have needed to fully specify the full list of MPI variables to CMake (I think the include and library directories) rather than just the MPI compilers
Jeff Hammond
@jeffhammond
it's clear from the debug messages i added that CMake is not passing MPI_C_INCLUDE_PATH. i see no explanation for that. why would adding other variables cause CMake to handle that one properly?
Jack Poulson
@poulson
and you wiped your build directory before the invocation that you specified MPI_C_INCLUDE_PATH?
Jeff Hammond
@jeffhammond
i have not invoked cmake without rm -rf * in years ;-)