Skip to content

Commit b89844c

Browse files
author
Daniel Ruprecht
committed
correct setting of number of threads in timestepper_test
1 parent 26a10e3 commit b89844c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/src/timestepper_test.f90

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
PROGRAM timestepper_test
22

3+
USE omp_lib, only : OMP_SET_NUM_THREADS
34
USE timestepper, only : Euler, Rk3Ssp, InitializeTimestepper, FinalizeTimestepper
45

56
IMPLICIT NONE
@@ -12,14 +13,17 @@ PROGRAM timestepper_test
1213
DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:) :: err_v, dt_v, convrate
1314

1415
DOUBLE PRECISION :: dt, dx, dy, dz, x, y, z, T0, T1, Tend
15-
INTEGER :: Nx, Ny, Nz, Nthreads, i, j, k, Nsteps, order_adv, nt, &
16+
INTEGER :: Nx, Ny, Nz, i, j, k, Nsteps, order_adv, nt, &
1617
mpi_thread_provided, ierr, method, kk, oodt, order_diff
17-
18+
19+
! Too many threads will slow down this test significantly
20+
INTEGER, PARAMETER :: Nthreads = 2
21+
1822
INTEGER, DIMENSION(7) :: N_v = (/ 260, 270, 280, 290, 300, 310, 620 /)
1923

2024
CALL MPI_INIT_THREAD(MPI_THREAD_FUNNELED, mpi_thread_provided, ierr)
2125

22-
Nthreads = 1
26+
CALL OMP_SET_NUM_THREADS(Nthreads)
2327
Tend = 0.2
2428

2529
DO method = 1,3,2

0 commit comments

Comments
 (0)