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?
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.