Memory dealocation is not performed in OMP parallel block
I have a strange problem with memory allocation/deallocation within OMP parallel block. Bellow there is a very basic program where I just perform allocation, initialization and deallocation of 2-dimensional array.
complex*16, allocatable, dimension(:,:) :: A
!$OMP PARALLEL PRIVATE(A) SHARED(N)
allocate( A( 1:N, 1:N ) )
A = 0
deallocate( A )
!$OMP END PARALLEL
The code is compiled with Intel(R) Visual Fortran Compiler 22.214.171.124 [Intel(R) 64] in Visual Studio 2015 environment. The code is statically linked to run-time libraries (/libs:static /threads) and processing of OpenMP directives is enabled (/Qopenmp). I run the program in debug mode and monitor Private Working Set parameter in Task Manager.
When compile the program with N=2901, private working set shows that memory allocated within parallel block is not deallocated at the end of the program. When N=2902 the problem is gone. Also the problem cannot be observed when dynamically linking to run-time libraries.
I've tried this code on Intel(R) Visual Fortran Compiler XE 126.96.36.1995 [Intel(R) 64] and everything is fine there.