OpenMP issue: a threadprivate pointer doen't work when it has the dimension attribute

jimdempseyatthecove
Total Points:
36,397
Status Points:
36,397
Black Belt
March 3, 2009 11:24 AM PST
Rate
 
#4

Try something like this:
program test   
  use mod_test, only: check   
  implicit none   
  integer,dimenstion(:), pointer,save :: p=>null()   
  !$omp threadprivate(p)
  ! Above is in variable declarations of program test
  ! ...
  ! initialization portion of program test
  !$omp parallel
  nullify(p) ! shouldn't be required, used for work-around
  !$omp end parallel
  ! ...
  ! compute section of program test   
  !$omp parallel   
  allocate(p(1))   
  call check(p)   
  !$omp end parallel   
end program test  

Jim Dempsey

--------

Blog: The Parallel Void


www.quickthreadprogramming.com


Intel Software Network Forums Statistics

8470 users have contributed to 31601 threads and 100640 posts to date.
In the past 24 hours, we have 31 new thread(s) 110 new posts(s), and 153 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member kopernikus