- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
type :: zmplx2d
complex*16,pointer:: val1(:,:),val2(:,:)
end type
type(zmplx2d),dimension(:),allocatable:: acamats
!$omp parallel do private(ilo,jlo,snedges,fnedges,
& ies,ief) shared(acamats)
& schedule(guided)
do j = Levindx(i), Levindx(i+1)-1
ilo = edgeips(2,j)
jlo = edgeips(1,j)
snedges = igall(jlo+1)-igall(jlo)
fnedges = igall(ilo+1)-igall(ilo)
ies = igall(jlo)
ief = igall(ilo)
call farboxInteraction2(snedges,fnedges,acacomps(j),
& acamats(j)%val1,
& acamats(j)%val2,ztmp1(ief),ztmp2(ies))
enddo
I want to parallelize the do-loop using OpenMP. the result of the codes is not correct. It seems OpenMP don't support derived types.
Anyone knows why and how to solve this problem ?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ztmp2 is the output of subroutine farboxinteraction2 ,so i have to perfect the variable ztmp2
add clause reduction(:+ ztmp2) in OpenMP constructs would solve the problem
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems not the problem of derived type array .
i replaced the derived type by a complex array, the problem remains.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ztmp2 is the output of subroutine farboxinteraction2 ,so i have to perfect the variable ztmp2
add clause reduction(:+ ztmp2) in OpenMP constructs would solve the problem
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page