Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28381 Discussions

Finalization not performed when within PARALLEL region

Matuszyk__Pawel
Beginner
317 Views

Hello,

I wrote a wrapper on FFT handler and computational subroutines. One of the futures is the deallocation of the FFT descriptor in the final subroutine. It works fine when running in sequential mode; however, the finalization is never called when leaving the PARALLEL region.

So, does not OpenMP support finalization, or I made some mistakes in my code?

Paweł

0 Kudos
4 Replies
Steve_Lionel
Honored Contributor III
317 Views

Which compiler version are you using?

The OpenMP 4.5 spec says:

Finalization of a list item of a finalizable type or subojects of a list item of a finalizable type occurs at the end of the region. The order in which any final subroutines for different variables of a 8 finalizable type are called is unspecified.

so, in theory, it ought to work. I have not tried your example.

0 Kudos
Matuszyk__Pawel
Beginner
317 Views

Hi Lionel,

I'm using Intel(R) Visual Fortran Compiler 19.0.5.281, which is pretty new one...

Paweł

0 Kudos
Steve_Lionel
Honored Contributor III
317 Views

Try 19.1.1.216.

0 Kudos
Matuszyk__Pawel
Beginner
317 Views

Well, unfortunately, I do not have access to the newer version....

 

Paweł

0 Kudos
Reply