- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm seeing a weird crash when using an openmp do loop with a class(*) pointer. A short test case is attached. In the test case, if the three lines of the 'select type' statement are included, the code crashes. If the select type is commented, the code runs. Interestingly, the code does not even need to execute the select type statement for the crash to happen as I have a 'cycle' statement at the start of the loop.
I can't see anything apparently wrong with the code. Is this a possible openmp and/or fortran bug or am I violating something in the openmp standard?
I'm using intel fortran 14.0.3 on a linux machine. My compile line is 'ifort -openmp test.f90'
Thanks,
John
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note that the current OpenMP standard (and the draft next standard) explicitly states that polymorphic entities are not supported. I don't know what the compiler itself supports in this regard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. That's good to know that this is non-standard. We were wondering why it was not working.
Interestingly, if we give classpointer the 'save' attribute and make it THREADPRIVATE, then the code works fine. Do you know if THREADPRIVATE polymorphic entities are allowable by the standard or is this just luck that it is working.
Thanks again,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What happens when you point classpointer at something prior to entering the parallel region?
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In our full code (which this test case was boiled down from), use of classpointer before the parallel region works fine. The crash only happens after entering the parallel region, and, in this case, is produced when the select case statement is added (whether the select case code is executed or not).
I could modify the test case to show this if that would help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I do not have an older version here for testing. I seem to recall issues with CLASS(*) on some of the earlier version of IVF. Try the following:
!$omp parallel & !$omp private(i_t,classpointer), COPYIN(CLASSPOINTER)
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the report John. I can reproduce this also with the current release. I will pass along all the findings the Developers to get their feedback.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page