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

memory leakage in ifx with openmp

Adelson_BR1
Beginner
180 Views

The following fortran code,

PROGRAM Test_leakage
IMPLICIT NONE
REAL(KIND=8), ALLOCATABLE :: A(:,:)
INTEGER, ALLOCATABLE :: B(:)
INTEGER :: i, j, k, n
i=3000; j=100
ALLOCATE(A(i,j))
CALL RANDOM_NUMBER(A)
DO n=1,1000000
! !$OMP PARALLEL DO SCHEDULE(DYNAMIC) PRIVATE(B)
DO k=1,i
B=PACK([(j,j=1,100)],A(k,:) < 0.5)
ENDDO
! !$OMP END PARALLEL DO
IF(MOD(n,100) == 0) WRITE(*,*) n
ENDDO
END PROGRAM Test_leakage

 

triggers a memory leakage when one uncomment the OpenMP lines. To see this just observe the %MEM of top command.

Here ifx 2025.3.2, RHEL 8.10, glibc 2.28.

This is possibly related to temporary arrays generated in the PACK function.

Thanks for any help, suggestions.

0 Kudos
1 Reply
Adelson_BR1
Beginner
179 Views

I forgot to say that this was run in 32 CPUs with 256 GB.

Sorry!

0 Kudos
Reply