Alternative VE Offloading
2.8
examples/VE/libompfortran.f90
1
INTEGER
FUNCTION
omp_hello()
2
INTEGER
:: tid = 0
3
INTEGER
:: nthreads = 0
4
!$OMP PARALLEL PRIVATE(TID, NTHREADS)
5
tid = omp_get_thread_num()
6
WRITE
(*,*)
"Hello, World! from thread = "
, tid
7
IF
( tid == 0 )
THEN
8
nthreads = omp_get_num_threads()
9
omp_hello = nthreads
10
WRITE
(*,*)
"Number of threads = "
, nthreads
11
END IF
12
!$OMP END PARALLEL
13
END FUNCTION
omp_hello
Generated by
1.8.5