In a parallel region, there are several ALLOCATE statements, the questions is do we need to enclosethese statementswith OMP Critical directives explicitly,without the Critical directives, arethe statementsexecuted in a critical session?
I have seen some strange errors with the ALLOCATE function, sometimes the functions return the error of #41, insufficient virtual memory, though the allocated space is not big.
Thanks for your reply. I am allocating a private data region, in particular, the data region for allocatable arrays is allocated in the routines that are called by the statements within the parallel region, they are temporary arrays in the routines. I agree with you that each thread does its own allocation, and each thread should have its own copies of these allocatalbe variables, while thread data sharing detection monitor detects the variables being accessed by multiple threads. I understand that these messages do not indicate errors, but sometimes the program has trouble allocating data space for these allocatable arrays due to insufficient virtual memory problem.