Commit 8368a0fe authored by Andreas Marek's avatar Andreas Marek
Browse files

Rename some forgotten OPENMP preprocessor statements

parent 62299f15
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
matrixRows = obj%local_nrows matrixRows = obj%local_nrows
matrixCols = obj%local_ncols matrixCols = obj%local_ncols
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
! store the number of OpenMP threads used in the calling function ! store the number of OpenMP threads used in the calling function
! restore this at the end of ELPA 2 ! restore this at the end of ELPA 2
omp_threads_caller = omp_get_max_threads() omp_threads_caller = omp_get_max_threads()
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
! restore original OpenMP settings ! restore original OpenMP settings
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
! store the number of OpenMP threads used in the calling function ! store the number of OpenMP threads used in the calling function
! restore this at the end of ELPA 2 ! restore this at the end of ELPA 2
call omp_set_num_threads(omp_threads_caller) call omp_set_num_threads(omp_threads_caller)
......
...@@ -8,7 +8,7 @@ subroutine global_gather_& ...@@ -8,7 +8,7 @@ subroutine global_gather_&
use precision use precision
use elpa_abstract_impl use elpa_abstract_impl
use elpa_mpi use elpa_mpi
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
use elpa_omp use elpa_omp
#endif #endif
implicit none implicit none
......
...@@ -5,7 +5,7 @@ subroutine global_product_& ...@@ -5,7 +5,7 @@ subroutine global_product_&
use precision use precision
use elpa_abstract_impl use elpa_abstract_impl
use elpa_mpi use elpa_mpi
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
!use elpa_omp !use elpa_omp
#endif #endif
implicit none implicit none
......
...@@ -9,7 +9,7 @@ recursive subroutine merge_recursive_& ...@@ -9,7 +9,7 @@ recursive subroutine merge_recursive_&
use precision use precision
use elpa_abstract_impl use elpa_abstract_impl
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
use elpa_omp use elpa_omp
#endif #endif
use elpa_mpi use elpa_mpi
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
use ELPA_utilities use ELPA_utilities
use elpa_mpi use elpa_mpi
use solve_secular_equation use solve_secular_equation
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
use omp_lib use omp_lib
#endif #endif
implicit none implicit none
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
dbase(na), ddiff(na), ev_scale(na), tmp(na) dbase(na), ddiff(na), ev_scale(na), tmp(na)
real(kind=REAL_DATATYPE) :: d1u(na), zu(na), d1l(na), zl(na) real(kind=REAL_DATATYPE) :: d1u(na), zu(na), d1l(na), zl(na)
real(kind=REAL_DATATYPE), allocatable :: qtmp1(:,:), qtmp2(:,:), ev(:,:) real(kind=REAL_DATATYPE), allocatable :: qtmp1(:,:), qtmp2(:,:), ev(:,:)
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
real(kind=REAL_DATATYPE), allocatable :: z_p(:,:) real(kind=REAL_DATATYPE), allocatable :: z_p(:,:)
#endif #endif
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
&PRECISION& &PRECISION&
&_real &_real
integer(kind=ik), intent(in) :: max_threads integer(kind=ik), intent(in) :: max_threads
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
integer(kind=ik) :: my_thread integer(kind=ik) :: my_thread
allocate(z_p(na,0:max_threads-1), stat=istat, errmsg=errorMessage) allocate(z_p(na,0:max_threads-1), stat=istat, errmsg=errorMessage)
...@@ -460,7 +460,7 @@ ...@@ -460,7 +460,7 @@
! Solve secular equation ! Solve secular equation
z(1:na1) = 1 z(1:na1) = 1
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
z_p(1:na1,:) = 1 z_p(1:na1,:) = 1
#endif #endif
dbase(1:na1) = 0 dbase(1:na1) = 0
...@@ -468,7 +468,7 @@ ...@@ -468,7 +468,7 @@
info = 0 info = 0
infoBLAS = int(info,kind=BLAS_KIND) infoBLAS = int(info,kind=BLAS_KIND)
!#ifdef WITH_OPENMP !#ifdef WITH_OPENMP_TRADITIONAL
! !
! call obj%timer%start("OpenMP parallel" // PRECISION_SUFFIX) ! call obj%timer%start("OpenMP parallel" // PRECISION_SUFFIX)
!!$OMP PARALLEL PRIVATE(i,my_thread,delta,s,info,infoBLAS,j) !!$OMP PARALLEL PRIVATE(i,my_thread,delta,s,info,infoBLAS,j)
...@@ -492,7 +492,7 @@ ...@@ -492,7 +492,7 @@
! Compute updated z ! Compute updated z
!#ifdef WITH_OPENMP !#ifdef WITH_OPENMP_TRADITIONAL
! do j=1,na1 ! do j=1,na1
! if (i/=j) z_p(j,my_thread) = z_p(j,my_thread)*( delta(j) / (d1(j)-d1(i)) ) ! if (i/=j) z_p(j,my_thread) = z_p(j,my_thread)*( delta(j) / (d1(j)-d1(i)) )
! enddo ! enddo
...@@ -518,7 +518,7 @@ ...@@ -518,7 +518,7 @@
ddiff(i) = delta(i) ddiff(i) = delta(i)
endif endif
enddo enddo
!#ifdef WITH_OPENMP !#ifdef WITH_OPENMP_TRADITIONAL
!!$OMP END PARALLEL !!$OMP END PARALLEL
! !
! call obj%timer%stop("OpenMP parallel" // PRECISION_SUFFIX) ! call obj%timer%stop("OpenMP parallel" // PRECISION_SUFFIX)
...@@ -544,7 +544,7 @@ ...@@ -544,7 +544,7 @@
! Calculate scale factors for eigenvectors ! Calculate scale factors for eigenvectors
ev_scale(:) = 0.0_rk ev_scale(:) = 0.0_rk
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
call obj%timer%start("OpenMP parallel" // PRECISION_SUFFIX) call obj%timer%start("OpenMP parallel" // PRECISION_SUFFIX)
...@@ -566,7 +566,7 @@ ...@@ -566,7 +566,7 @@
&(obj, d1, dbase, ddiff, z, ev_scale(i), na1,i) &(obj, d1, dbase, ddiff, z, ev_scale(i), na1,i)
! ev_scale(i) = ev_scale_val ! ev_scale(i) = ev_scale_val
enddo enddo
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
!$OMP END PARALLEL DO !$OMP END PARALLEL DO
call obj%timer%stop("OpenMP parallel" // PRECISION_SUFFIX) call obj%timer%stop("OpenMP parallel" // PRECISION_SUFFIX)
...@@ -906,7 +906,7 @@ ...@@ -906,7 +906,7 @@
deallocate(ev, qtmp1, qtmp2, stat=istat, errmsg=errorMessage) deallocate(ev, qtmp1, qtmp2, stat=istat, errmsg=errorMessage)
check_deallocate("merge_systems: ev, qtmp1, qtmp2",istat, errorMessage) check_deallocate("merge_systems: ev, qtmp1, qtmp2",istat, errorMessage)
endif !very outer test (na1==1 .or. na1==2) endif !very outer test (na1==1 .or. na1==2)
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
deallocate(z_p, stat=istat, errmsg=errorMessage) deallocate(z_p, stat=istat, errmsg=errorMessage)
check_deallocate("merge_systems: z_p",istat, errorMessage) check_deallocate("merge_systems: z_p",istat, errorMessage)
#endif #endif
......
...@@ -5,7 +5,7 @@ subroutine resort_ev_& ...@@ -5,7 +5,7 @@ subroutine resort_ev_&
&(obj, idx_ev, nLength, na, p_col_out, q, ldq, matrixCols, l_rows, l_rqe, l_rqs, & &(obj, idx_ev, nLength, na, p_col_out, q, ldq, matrixCols, l_rows, l_rqe, l_rqs, &
mpi_comm_cols, p_col, l_col, l_col_out) mpi_comm_cols, p_col, l_col, l_col_out)
use precision use precision
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
use elpa_omp use elpa_omp
#endif #endif
use elpa_mpi use elpa_mpi
......
...@@ -4,7 +4,7 @@ subroutine transform_columns_& ...@@ -4,7 +4,7 @@ subroutine transform_columns_&
l_rows, mpi_comm_cols, p_col, l_col, qtrans) l_rows, mpi_comm_cols, p_col, l_col, qtrans)
use precision use precision
use elpa_abstract_impl use elpa_abstract_impl
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
use elpa_omp use elpa_omp
#endif #endif
use elpa_mpi use elpa_mpi
......
...@@ -134,7 +134,7 @@ program test ...@@ -134,7 +134,7 @@ program test
#ifdef HAVE_REDIRECT #ifdef HAVE_REDIRECT
use test_redirect use test_redirect
#endif #endif
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
use omp_lib use omp_lib
#endif #endif
use precision_for_tests use precision_for_tests
...@@ -196,7 +196,7 @@ program test ...@@ -196,7 +196,7 @@ program test
do_test_toeplitz_eigenvalues, do_test_cholesky, & do_test_toeplitz_eigenvalues, do_test_cholesky, &
do_test_hermitian_multiply do_test_hermitian_multiply
logical :: ignoreError logical :: ignoreError
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
TEST_INT_TYPE :: max_threads, threads_caller TEST_INT_TYPE :: max_threads, threads_caller
#endif #endif
...@@ -564,7 +564,7 @@ program test ...@@ -564,7 +564,7 @@ program test
endif endif
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
threads_caller = omp_get_max_threads() threads_caller = omp_get_max_threads()
if (myid == 0) then if (myid == 0) then
print *,"The calling program uses ",threads_caller," threads" print *,"The calling program uses ",threads_caller," threads"
...@@ -646,7 +646,7 @@ program test ...@@ -646,7 +646,7 @@ program test
assert_elpa_ok(error_elpa) assert_elpa_ok(error_elpa)
#endif #endif
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
max_threads=omp_get_max_threads() max_threads=omp_get_max_threads()
call e%set("omp_threads", int(max_threads,kind=c_int), error_elpa) call e%set("omp_threads", int(max_threads,kind=c_int), error_elpa)
assert_elpa_ok(error_elpa) assert_elpa_ok(error_elpa)
...@@ -855,7 +855,7 @@ program test ...@@ -855,7 +855,7 @@ program test
#endif #endif
#ifdef WITH_OPENMP #ifdef WITH_OPENMP_TRADITIONAL
if (threads_caller .ne. omp_get_max_threads()) then if (threads_caller .ne. omp_get_max_threads()) then
if (myid .eq. 0) then if (myid .eq. 0) then
print *, " ERROR! the number of OpenMP threads has not been restored correctly" print *, " ERROR! the number of OpenMP threads has not been restored correctly"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment