[Omp] Passing private arrays to subroutines

James Beyer beyerj at cray.com
Wed Jan 10 07:41:36 PST 2007


Håkan Lane wrote:
> ...
> Get_elmat is located in another module of the program. I have not included the interface in this module. The subroutine is not overloaded. It should not do anything with the status of the arrays. It works fine with the serial version. ...
What do you mean by "I have not included the interface in this module"?  
You are not showing us, or your source code does not contain an 
interface for the subroutine in the module shown?

When the program seg-faults what is wrong, are the addresses of the 
allocatables bad or is the code trying to access something in a bad way, 
bad index?

For what it is worth, I would expect your code to look something like

!$OMP parallel ...
!allocate the privates
do i = lvarde,hvarde
...
end do
!deallocate the privates
!$OMP end parallel

james


More information about the Omp mailing list