- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Is there something about the associate in OpenMP? The program below gives internal compiler error with update 5 in VS2010.
Abhi
======
Is there something about the associate in OpenMP? The program below gives internal compiler error with update 5 in VS2010.
Abhi
======
[fortran] Program Test_OpenMPAssociate Implicit None Type newObject Integer :: m = 0 End Type newObject Type(newObject), Allocatable :: OBJ(:) Integer, Allocatable :: J(:) Integer :: N Integer :: i Integer :: iError N = 20 Allocate(OBJ(N), J(N), stat=iError) !$OMP PARALLEL DO do i=1,N Associate(m => OBJ%m) J(i) = m(i) End Associate end do !$OMP END PARALLEL DO do i=1,N print *, J(i) end do End Program Test_OpenMPAssociate [/fortran]
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Internal compiler error is almost always a compiler bug. It is here. I will report this to the developers. Issue ID is DPD200172236.
I found that if you move the ASSOCIATE construct to outside the parallel region, it works. But.. What do you think this program does? You never give a value (other than 0) to the various OBJ%m components.
I found that if you move the ASSOCIATE construct to outside the parallel region, it works. But.. What do you think this program does? You never give a value (other than 0) to the various OBJ%m components.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I should have mentioned that the above program was just for the illustration purpose. My apologies. But you can easily see its usage in general cases of associate inside a loop, for example, instead of the object suppose there was obj%subobject%sub-subobject etc..
Abhi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's fine - the compiler should never get an internal compiler error, even for a program that doesn't do anything useful. Yes, ASSOCIATE in a parallel region should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This has been fixed in our sources. I don't yet know when the fix will be available - I'll provide an update when I do.

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