Add safe-guard in fft_parallel.f90

This commit is contained in:
Ye Luo 2020-07-05 18:30:25 -04:00
parent fd50f8488a
commit b63b331d32
1 changed files with 9 additions and 0 deletions

View File

@ -257,6 +257,10 @@ CONTAINS
!
INTEGER :: comm2s
!
#if defined(_OPENMP) && !defined(__FFT_SCALAR_THREAD_SAFE)
CALL errore('many_cft3s::execute_using_tasks','needs thread-safe fft_scalar backend selected at compile time.',1)
#endif
!
IF ( isgn > 0 ) THEN ! G -> R
!$omp parallel default(none) &
!$omp private(i, j, comm2s) &
@ -350,6 +354,11 @@ CONTAINS
! This implementation requires thread-safe cft_1z
!
IMPLICIT NONE
!
#if defined(_OPENMP) && !defined(__FFT_SCALAR_THREAD_SAFE)
CALL errore('many_cft3s::execute_using_threads','needs thread-safe fft_scalar backend selected at compile time.',1)
#endif
!
IF ( isgn > 0 ) THEN ! G -> R
!$omp parallel default(none) &
!$omp private(i, j) &