Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

New to OpenMP

g_f_thomas
Beginner
329 Views

Why is !$write... ignored unlike !$omp while !$ write... is fine? Note the space or not.

Is thread count zero based?

Why does the likes of

use omp_lib

integer nt

nt = 3

!$ call omp_set_num_threads ( nt )

!$ write ( *, '(a,i6)' ) ' The number of threads is ', omp_get_num_threads( )

return 1 on a C2D even with /QaxT, /Qparallel, and /Qopemmp all set?

Thanks,

Gerry

0 Kudos
1 Reply
Steven_L_Intel1
Employee
329 Views
!$ is an OpenMP conditional compilation prefix and has its own rules. On an initial line, a space is required after the $. Otherwise you'd have confusion over something like:

!$ompalompa = 3

I'll leave the question about threads to someone with more experience, though this question might do better in the threading forum section.
0 Kudos
Reply