Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6993 Discussions

Bug report of memory leakage for Scalapack subroutine PCGEMR2D (or my wrong usage)

phymilton
Beginner
461 Views

Hello, MKL Developers and users,

Possible Bug of memory leakage for Scalapack subroutine PCGEMR2D or my wrong usage.

At my program, I have to use a lot of PCGEMR2D to distribute and re-distribute between global matrixes. It is OK to use a few of PCGEMR2D, but when I use too much of PCGEMR2D, the program just crashed. Try to point out the problem is really at PCGEMR2D, I wrote a very simple test program with only PCGEMR2D called in the test program (the source code is attached with this post).

In the test program, I set up several pause points, and read the memory usage by the top command of Linux. I can see the memory usage will accumulated when more and more PCGEMR2D is called.

If memory is accumulated large enough, the program will crash with the following error message:

[2] Abort: VAPI_register_mr at line 65 in file collutils.c

Timeout alarm signaled

Cleaning up all processes ...forrtl: error (78): process killed (SIGTERM)

forrtl: error (78): process killed (SIGTERM)

forrtl: error (78): process killed (SIGTERM)

done.

In my test program, the program crashed after enter 3 integers which corresponding to total number of loop between 1500 and 2000.

My computer setup is as following:

Intel Xeon EM64t process

2GB memory

Intel fortran compiler V8.01

MPICH

Infinband communication network

Intel Math Kernel Library Cluster version 8.0

Thank you very much!!

Message Edited by phymilton on 06-22-200610:41 AM

0 Kudos
2 Replies
phymilton
Beginner
461 Views
I notice that at MKL release note, there is subroutine named MKL_FreeBuffers() which is supposed to relaase any working space by MKL routines. I added the [call MKL_FreeBuffers()] into the test program, but the memory leakage problem remains the same, no improvement at all.
I wonder anyone know how to release working space memory used by MKL routines.
Thank you very much!!
0 Kudos
Chao_Y_Intel
Moderator
461 Views

Hi,

Memory can be released by the user program through use of a function (MKL_FreeBuffers()) made available in Intel MKL or memory can be released after each call by setting an environment variable(MKL_DISABLE_FAST_MM). Using one of these methods to release memory will not necessarily stop programs from reporting memory leaks, and in fact may increase the number of such reports should you make multiple calls to the library thereby requiring new allocations with each call. Memory not released by one of the methods described will be released by the system when the program ends. The maximum number of buffers allocated in each thread is 32. To avoid this restriction disable memory management as described above.

Regards,

Chao

0 Kudos
Reply