I want to set my thread number to 10, by doing:
CALL OMP_SET_NUM_THREADS(10)
!$OMP PARALLEL
T=OMP_GET_NUM_THREADS()
!$OMP END PARALLEL
PRINT*, T
It prints out 10, which is correct. However, if I define a variable NUM_THREADS, and pass it into the get threads number subroutine, like this:
INTEGER(KIND=16), PARAMETER :: NUM_THREADS=10
CALL OMP_SET_NUM_THREADS(NUM_THREADS)
And run it, it gives me the bug:
Error: There is no specific subroutine for the generic ‘omp_set_num_threads’ at (1).
Why is that?