These are chat archives for elemental/chat

20th
Oct 2016
Jeff Hammond
@jeffhammond
Oct 20 2016 00:14
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
Oct 20 2016 00:30
@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
Oct 20 2016 00:31
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
Oct 20 2016 00:32
and you wiped your build directory before the invocation that you specified MPI_C_INCLUDE_PATH?
Jeff Hammond
@jeffhammond
Oct 20 2016 00:32
i have not invoked cmake without rm -rf * in years ;-)
Jack Poulson
@poulson
Oct 20 2016 00:33
did you also specify MPI_C_LIBRARIES?
Jeff Hammond
@jeffhammond
Oct 20 2016 00:33
no, because it should not be necessary, because i am using the wrappers
Jack Poulson
@poulson
Oct 20 2016 00:34
I think you might need to do both
Jeff Hammond
@jeffhammond
Oct 20 2016 00:34
i have never had to specify them before. ever.
Jack Poulson
@poulson
Oct 20 2016 00:34
the FindMPI documentation says to set both
it's possible there is an if statement that only propagates MPI_C_INCLUDE_PATH if MPI_C_LIBRARIES is also defined
Jeff Hammond
@jeffhammond
Oct 20 2016 00:34
okay but somehow every other machine i've used is fine with -DMPI_CXX_COMPILER=CC -DMPI_C_COMPILER=cc -DMPI_Fortran_COMPILER=ftn
Jack Poulson
@poulson
Oct 20 2016 00:34
yes
Cray is a special kind of fun
I think I've had to do this with both Cray and BG/{P,Q}
Jeff Hammond
@jeffhammond
Oct 20 2016 00:35
Cray toolchain files are using the same method as i am

The Cray wrappers

set(COMPILER_DIR $ENV{CRAYPE_DIR}/bin)
set(CMAKE_C_COMPILER ${COMPILER_DIR}/cc)
set(CMAKE_CXX_COMPILER ${COMPILER_DIR}/CC)
set(CMAKE_Fortran_COMPILER ${COMPILER_DIR}/ftn)

This is just a hack, as this machine always uses the above wrappers

set(MPI_C_COMPILER ${CMAKE_C_COMPILER})
set(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER})
set(MPI_Fortran_COMPILER ${CMAKE_Fortran_COMPILER})

no other MPI stuff there
Jack Poulson
@poulson
Oct 20 2016 00:38
are you testing on NERSC?
Jeff Hammond
@jeffhammond
Oct 20 2016 00:46
yes
oh i did did set all the options:
-DMPI_C_INCLUDE_PATH=$CRAY_MPICH_DIR/include -DMPI_C_COMPILE_FLAGS="" -DMPI_C_LINK_FLAGS="" -DMPI_C_LIBRARIES=""
"" should be sufficient because cc/CC/ftn are MPI wrappers
Jack Poulson
@poulson
Oct 20 2016 00:47
I believe blank variables are treated as unset
Jeff Hammond
@jeffhammond
Oct 20 2016 00:48
ugh
Jack Poulson
@poulson
Oct 20 2016 00:49
I'm not 100% certain, but if (VARIABLE) might evaluate to false if VARIABLE=""
Jeff Hammond
@jeffhammond
Oct 20 2016 00:50
latest attempt:
... -DMPI_C_COMPILER=cc -DMPI_Fortran_COMPILER=ftn -DMPI_C_INCLUDE_PATH=$CRAY_MPICH_DIR/include -DMPI_C_COMPILE_FLAGS="-I$CRAY_MPICH_DIR/include" -DMPI_C_LINK_FLAGS="-L$CRAY_MPICH_DIR/lib" -DMPI_C_LIBRARIES=" -DURKADURKA " ...
Jack Poulson
@poulson
Oct 20 2016 00:50
cough
what version of CMake are you using?
Jeff Hammond
@jeffhammond
Oct 20 2016 00:53
jhammond@edison12:~/ELEMENTAL/git> cmake --version
cmake version 2.8.12.2
jhammond@edison12:~/ELEMENTAL/git> which cmake
/global/homes/j/jhammond/TOOLS/bin/cmake
i recall i needed to patch cmake
but i will try 3.3.2 now
Jeff Hammond
@jeffhammond
Oct 20 2016 01:00
-- Found MPI_C: -DURKADURKA
-- 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
-- Unable to determine MPI from MPI driver /opt/cray/craype/2.5.5/bin/ftn
-- Found MPI_Fortran: /opt/cray/craype/2.5.5/bin/ftn
-- Performing Test EL_HAVE_MPI_REDUCE_SCATTER
-- Performing Test EL_HAVE_MPI_REDUCE_SCATTER - Success
-- Will parse MPI header /opt/cray/mpt/7.4.1/gni/mpich-cray/8.3/include/mpi.h
Jack Poulson
@poulson
Oct 20 2016 01:01
sucess?
*success?
Jeff Hammond
@jeffhammond
Oct 20 2016 01:02
this is the weak form of success, but yes. i dispute cmake should behave this way but at least there is a deterministic solution.
thanks for your help and patience (especially Ryan). i have to eat dinner with the kids now. i'll add a toolchain file later
Ryan H. Lewis
@rhl-
Oct 20 2016 17:40
@jeffhammond hey no problem. I'm glad we got something going thats awesome.