mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-27 21:55:16 -04:00
Remove old flags __HAS_PATCHED_CUFFT_70, __NO_MPI_THREAD_SUPPORT_CHECK, and __MINGW
This commit is contained in:
parent
8580e8378d
commit
7bf99f7a74
4 changed files with 17 additions and 65 deletions
|
|
@ -420,15 +420,12 @@ CONTAINS
|
|||
!> \return ...
|
||||
! **************************************************************************************************
|
||||
FUNCTION m_procrun(pid) RESULT(run_on)
|
||||
INTEGER, INTENT(IN) :: pid
|
||||
INTEGER :: run_on
|
||||
#if defined(__MINGW)
|
||||
run_on = 0
|
||||
#else
|
||||
INTEGER :: istat
|
||||
INTEGER, INTENT(IN) :: pid
|
||||
INTEGER :: run_on
|
||||
|
||||
INTEGER :: istat
|
||||
INTERFACE
|
||||
FUNCTION kill(pid, sig) BIND(C, name="kill") RESULT(errno)
|
||||
FUNCTION kill(pid, sig) RESULT(errno) BIND(C, name="kill")
|
||||
IMPORT
|
||||
INTEGER(KIND=C_INT), VALUE :: pid, sig
|
||||
INTEGER(KIND=C_INT) :: errno
|
||||
|
|
@ -445,7 +442,6 @@ CONTAINS
|
|||
ELSE
|
||||
run_on = 0 ! error, process probably does not exist
|
||||
END IF
|
||||
#endif
|
||||
END FUNCTION m_procrun
|
||||
|
||||
! **************************************************************************************************
|
||||
|
|
@ -594,11 +590,6 @@ CONTAINS
|
|||
! **************************************************************************************************
|
||||
SUBROUTINE m_hostnm(hname)
|
||||
CHARACTER(len=*), INTENT(OUT) :: hname
|
||||
#if defined(__MINGW)
|
||||
! While there is a gethostname in the Windows (POSIX) API, it requires that winsocks is
|
||||
! initialised prior to using it via WSAStartup(..), respectively cleaned up at the end via WSACleanup().
|
||||
hname = "<unknown>"
|
||||
#else
|
||||
INTEGER :: istat, i
|
||||
CHARACTER(len=default_path_length) :: buf
|
||||
|
||||
|
|
@ -618,7 +609,6 @@ CONTAINS
|
|||
END IF
|
||||
i = INDEX(buf, c_null_char) - 1
|
||||
hname = buf(1:i)
|
||||
#endif
|
||||
END SUBROUTINE m_hostnm
|
||||
|
||||
! **************************************************************************************************
|
||||
|
|
@ -732,7 +722,7 @@ CONTAINS
|
|||
RETURN
|
||||
END IF
|
||||
|
||||
! first remove target (needed on windows / mingw)
|
||||
! first remove target (needed on windows)
|
||||
istat = m_unlink(TARGET)
|
||||
! ignore istat of unlink
|
||||
|
||||
|
|
|
|||
|
|
@ -138,9 +138,6 @@ CONTAINS
|
|||
#if defined(__COSMA)
|
||||
flags = TRIM(flags)//" cosma"
|
||||
#endif
|
||||
#if defined(__HAS_PATCHED_CUFFT_70)
|
||||
flags = TRIM(flags)//" patched_cufft_70"
|
||||
#endif
|
||||
#if defined(__ACE)
|
||||
flags = TRIM(flags)//" ace"
|
||||
#endif
|
||||
|
|
@ -175,15 +172,9 @@ CONTAINS
|
|||
#if defined(__NO_SOCKETS)
|
||||
flags = TRIM(flags)//" no_sockets"
|
||||
#endif
|
||||
#if defined(__NO_MPI_THREAD_SUPPORT_CHECK)
|
||||
flags = TRIM(flags)//" no_mpi_thread_support_check"
|
||||
#endif
|
||||
#if defined(__NO_STATM_ACCESS)
|
||||
flags = TRIM(flags)//" no_statm_access"
|
||||
#endif
|
||||
#if defined(__MINGW)
|
||||
flags = TRIM(flags)//" mingw"
|
||||
#endif
|
||||
#if defined(__PW_CUDA_NO_HOSTALLOC)
|
||||
flags = TRIM(flags)//" pw_cuda_no_hostalloc"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1075,50 +1075,24 @@ CONTAINS
|
|||
SUBROUTINE mp_world_init(mp_comm)
|
||||
CLASS(mp_comm_type), INTENT(OUT) :: mp_comm
|
||||
#if defined(__parallel)
|
||||
INTEGER :: ierr
|
||||
!$ INTEGER :: provided_tsl
|
||||
!$ LOGICAL :: no_threading_support
|
||||
INTEGER :: ierr, provided_tsl
|
||||
|
||||
#if defined(__NO_MPI_THREAD_SUPPORT_CHECK)
|
||||
! Hack that does not request or check MPI thread support level.
|
||||
! User asserts that the MPI library will work correctly with
|
||||
! threads.
|
||||
!
|
||||
!$ no_threading_support = .TRUE.
|
||||
#else
|
||||
! Does the right thing when using OpenMP: requests that the MPI
|
||||
! library supports serialized mode and verifies that the MPI library
|
||||
! provides that support.
|
||||
!
|
||||
! Developers: Only the master thread will ever make calls to the
|
||||
! MPI library.
|
||||
!
|
||||
!$ no_threading_support = .FALSE.
|
||||
#endif
|
||||
!$ IF (no_threading_support) THEN
|
||||
CALL mpi_init(ierr)
|
||||
IF (ierr /= 0) CALL mp_stop(ierr, "mpi_init @ mp_world_init")
|
||||
!$ ELSE
|
||||
!$OMP MASTER
|
||||
#if defined(__DLAF)
|
||||
! DLA-Future requires that the MPI library supports
|
||||
! THREAD_MULTIPLE mode
|
||||
!$ CALL mpi_init_thread(MPI_THREAD_MULTIPLE, provided_tsl, ierr)
|
||||
! DLA-Future requires that the MPI library supports THREAD_MULTIPLE mode
|
||||
CALL mpi_init_thread(MPI_THREAD_MULTIPLE, provided_tsl, ierr)
|
||||
IF (ierr /= 0) CALL mp_stop(ierr, "mpi_init_thread @ mp_world_init")
|
||||
IF (provided_tsl < MPI_THREAD_MULTIPLE) THEN
|
||||
CALL mp_stop(0, "MPI library does not support the requested level of threading (MPI_THREAD_MULTIPLE), required by DLA-Future. Build CP2K without DLA-Future.")
|
||||
END IF
|
||||
#else
|
||||
!$ CALL mpi_init_thread(MPI_THREAD_SERIALIZED, provided_tsl, ierr)
|
||||
#endif
|
||||
!$ IF (ierr /= 0) CALL mp_stop(ierr, "mpi_init_thread @ mp_world_init")
|
||||
#if defined(__DLAF)
|
||||
!$ IF (provided_tsl < MPI_THREAD_MULTIPLE) THEN
|
||||
!$ CALL mp_stop(0, "MPI library does not support the requested level of threading (MPI_THREAD_MULTIPLE), required by DLA-Future. Build CP2K without DLA-Future.")
|
||||
!$ END IF
|
||||
#else
|
||||
!$ IF (provided_tsl < MPI_THREAD_SERIALIZED) THEN
|
||||
!$ CALL mp_stop(0, "MPI library does not support the requested level of threading (MPI_THREAD_SERIALIZED).")
|
||||
!$ END IF
|
||||
CALL mpi_init_thread(MPI_THREAD_SERIALIZED, provided_tsl, ierr)
|
||||
IF (ierr /= 0) CALL mp_stop(ierr, "mpi_init_thread @ mp_world_init")
|
||||
IF (provided_tsl < MPI_THREAD_SERIALIZED) THEN
|
||||
CALL mp_stop(0, "MPI library does not support the requested level of threading (MPI_THREAD_SERIALIZED).")
|
||||
END IF
|
||||
#endif
|
||||
!$OMP END MASTER
|
||||
!$ END IF
|
||||
CALL mpi_comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN, ierr)
|
||||
IF (ierr /= 0) CALL mp_stop(ierr, "mpi_comm_set_errhandler @ mp_world_init")
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -81,12 +81,10 @@ FLAG_EXCEPTIONS = (
|
|||
# See also https://github.com/cp2k/cp2k/issues/4611
|
||||
r"__PW_FPGA",
|
||||
r"__PW_FPGA_SP",
|
||||
r"__NO_MPI_THREAD_SUPPORT_CHECK",
|
||||
r"__NO_SOCKETS",
|
||||
r"__SCALAPACK_NO_WA",
|
||||
r"__CRAY_PM_ACCEL_ENERGY",
|
||||
r"__CRAY_PM_ENERGY",
|
||||
r"__MINGW",
|
||||
r"__NO_STATM_ACCESS",
|
||||
r"__STATM_RESIDENT",
|
||||
r"__STATM_TOTAL",
|
||||
|
|
@ -95,7 +93,6 @@ FLAG_EXCEPTIONS = (
|
|||
r"__ELPA_NVIDIA_GPU",
|
||||
r"__CRAY_PM_ACCEL_ENERGY",
|
||||
r"__CRAY_PM_ENERGY",
|
||||
r"__HAS_PATCHED_CUFFT_70",
|
||||
r"__OFFLOAD_PROFILING",
|
||||
r"__STATM_RESIDENT",
|
||||
r"__STATM_TOTAL",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue