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

Rename some forgotten OPENMP preprocessor statements

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