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

Addresses configuration fortran testing flags #4276

Merged
merged 2 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config/cmake/HDF5UseFortran.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ if (${HAVE_ISO_FORTRAN_ENV})
string (REGEX REPLACE "," ";" VAR "${pac_validLogicalKinds}")

set(CMAKE_REQUIRED_QUIET TRUE)
set(save_CMAKE_Fortran_FLAGS ${CMAKE_Fortran_FLAGS})
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
set(CMAKE_Fortran_FLAGS "-warn error")
endif ()

foreach (KIND ${VAR})
unset(MPI_LOGICAL_KIND CACHE)
set (PROG_SRC
Expand All @@ -243,6 +248,7 @@ if (${HAVE_ISO_FORTRAN_ENV})
message (FATAL_ERROR "Failed to determine LOGICAL KIND for MPI")
endif ()
set(CMAKE_REQUIRED_QUIET FALSE)
set(CMAKE_Fortran_FLAGS ${save_CMAKE_Fortran_FLAGS})
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion fortran/testpar/subfiling.F90
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ PROGRAM subfiling_test
ENDIF

CALL mpi_info_get(info_ret,"foo", 3_MPI_INTEGER_KIND, info_val, flag, mpierror)
IF(LOGICAL(flag) .EQV. .TRUE.)THEN
IF(LOGICAL(flag) .EQV. LOGICAL(.TRUE.))THEN
IF(info_val.NE."bar")THEN
IF(mpi_rank.EQ.0) &
WRITE(*,*) "Failed H5Pset_mpi_params_f and H5Pget_mpi_params_f sequence"
Expand Down
7 changes: 6 additions & 1 deletion m4/aclocal_fc.m4
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,12 @@ AC_REQUIRE([PAC_FC_AVAIL_KINDS])
AC_MSG_CHECKING([default Fortran KIND of LOGICAL in MPI])
AC_LANG_PUSH([Fortran])
saved_FCFLAGS=$FCFLAGS
FCFLAGS=""
check_Intel="`$FC -V 2>&1 |grep '^Intel'`"
if test X != "X$check_Intel"; then
FCFLAGS="-warn error"
else
FCFLAGS=""
fi
for kind in `echo $pac_validLogicalKinds | sed -e 's/,/ /g'`; do
AC_COMPILE_IFELSE([
PROGRAM main
Expand Down
Loading