Skip to content

Commit

Permalink
MPI Fortran Finder fixes for ParaStationMPI
Browse files Browse the repository at this point in the history
  • Loading branch information
kvrigor committed Oct 9, 2024
1 parent e4935d5 commit 94d0474
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
15 changes: 9 additions & 6 deletions cmake/FindMPIFortran.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ find_package(MPI REQUIRED)
find_package(PkgConfig QUIET)
include(FindPackageHandleStandardArgs)

if (MPI_Fortran_MODULE_DIR)
message(STATUS "MPI_Fortran_MODULE_DIR=${MPI_Fortran_MODULE_DIR}")
if (NOT MPI_Fortran_INCLUDE_DIRS)
# TODO: MPICH is specific to ParaStationMPI; another approach is necessary for IntelMPI
pkg_check_modules(MPICH_Fortran REQUIRED mpich)
if (MPICH_Fortran_FOUND)
pkg_get_variable(MPI_Fortran_INCLUDE_DIRS mpich includedir)
pkg_get_variable(MPI_Fortran_LIB_DIR mpich libdir)
endif()
endif()

if (MPI_mpi_LIBRARY)
message(STATUS "MPI_mpi_LIBRARY=${MPI_mpi_LIBRARY}")
get_filename_component(MPI_Fortran_LIB_DIR ${MPI_mpi_LIBRARY} DIRECTORY)
message(STATUS "MPI_Fortran_LIB_DIR=${MPI_Fortran_LIB_DIR}")
if (NOT MPI_Fortran_MODULE_DIR)
find_path(MPI_Fortran_MODULE_DIR NAMES "mpi.mod" "mpi_f08.mod" HINTS MPI_Fortran_INCLUDE_DIRS)
endif()

find_package_handle_standard_args(MPIFortran
Expand Down
4 changes: 3 additions & 1 deletion env/jsc.2024_Intel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ module --force purge
module use $OTHERSTAGES
module load Stages/2024
module load Intel/2023.2.1
module load IntelMPI/2021.10.0
module load ParaStationMPI/5.9.2-1
#module load IntelMPI/2021.10.0

#
module load Hypre/2.29.0
module load Silo/4.11.1
Expand Down

0 comments on commit 94d0474

Please sign in to comment.