scalapack icon indicating copy to clipboard operation
scalapack copied to clipboard

Cray build issue problems - advice?

Open dtaller opened this issue 1 year ago • 1 comments

I recently tried to build scalapack on a Cray machine, but ran into issues. The first issue occured with the code block

find_package(MPI)
if (MPI_FOUND)
   message(STATUS "Found MPI_LIBRARY : ${MPI_FOUND} ")
   INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH})

   find_program(MPI_C_COMPILER
      NAMES mpicc
      HINTS "${MPI_BASE_DIR}"
      PATH_SUFFIXES bin
      DOC "MPI C compiler.")
   MARK_AS_ADVANCED(MPI_C_COMPILER)
   if ("${MPI_C_COMPILER}" STREQUAL "MPI_C_COMPILER-NOTFOUND")
      message(ERROR "--> MPI C Compiler NOT FOUND (please set MPI_BASE_DIR accordingly")

Basically, on the Cray machine, I am supposed to load the modules I want, and then use compiler wrappers CC, cc, and ftn (point to whichever compiler and mpi I need). So this logic where we search for mpicc failed.

In addition, the logic

if (UNIX)
   if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Intel")
      set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fltconsistency -fp_port" )
   endif ()
endif ()

failed because the cray-compatible intel compiler did not support the -fp_port flag.

I was able to resolve these issues by commenting out the offending lines in the cmake file. But I was wondering if you can think of a better solution?

dtaller avatar Oct 31 '24 19:10 dtaller

Do the cray compilers not support using the original compiler. These days you do not need to use mpic* wrappers with the FindMPI. The logic with NOT MPI_FOUND should be removed as per #78.

failed because the cray-compatible intel compiler did not support the -fp_port flag.

That is worth accounting for. Do you have some details if it's version dependent or something else?

LecrisUT avatar Jul 31 '25 18:07 LecrisUT