Skip to content

Commit 2678ff0

Browse files
committed
omp print info
1 parent bebb35e commit 2678ff0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

source/speedy.f90

+15
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ program speedy
1414
use diagnostics, only: check_diagnostics
1515
use prognostics, only: vor, div, t, ps, tr, phi
1616
use forcing, only: set_forcing
17+
use omp_lib
1718

1819
implicit none
1920

@@ -23,6 +24,20 @@ program speedy
2324
! Initialization
2425
call initialize
2526

27+
#ifdef _OPENMP
28+
#ifdef INFO
29+
!$omp parallel
30+
!$omp single
31+
print *, new_line('a')
32+
print *, "================================================="
33+
print *, " Using OpenMP with threads: ", omp_get_num_threads()
34+
print *, " OpenMP version: ", _OPENMP
35+
print *, "=================================================", new_line('a')
36+
!$omp end single
37+
!$omp end parallel
38+
#endif
39+
#endif
40+
2641
! Model main loop
2742
do while (.not. datetime_equal(model_datetime, end_datetime))
2843
! Daily tasks

0 commit comments

Comments
 (0)