I have the following simple program:
program prog
include "omp_lib.h"
integer, parameter:: Na=8
integer n,i,thrNum,NaThr,k
real(8):: A(Na),A1(Na),st_tm,end_tm,OMPtime,CPUtime
A=0.D0; A1=0.D0;
n=0
thrNum=4
do k=1,2000000
NaThr=Na/thrNum
!$omp parallel num_threads(thrNum) shared(A) private(n,i,j)
n=omp_get_thread_num()
do j=n*NaThr,n*NaThr+NaThr-1
do i=1,2
A(j+1)=A(j+1)+dsin(3.1415D0*(j+1)*i)
enddo
enddo
!$omp end parallel
if (mod(k,2000).eq.0) print *,k
enddo
end program prog
It starts without any warning or errors but after certain number of time steps (variable “k”) the program become terminated with an error: “CreateThread failed”.
What does this error mean and how to overcome it?
Version of PGF is 11.6, OS is WinXP x64