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

Memory Requirement for PARDISO (solving large systems)

Alemdar__Bulent
Beginner
1,922 Views

Hi All

I run into this recently, and found a few posts on this issue, but none of them offered a conclusive answer. Apparently, I am having trouble to solve big systems in PARDISO. I use MKL 10.0.4.023 in MS VS2005 (32 bit Windows XP). I have 2GB P4 with 3.4 GHz system. And I include these libraries in my project: mkl_c.lib, libiomp5md.lib and mkl_solver.lib .

I try to solve a positive definite symmetric matrix ( ~340,000 equations with ~7.5 million non-zero terms) . I call these phases in order: 11, 22 and 33.

Phase 11 is always completed successfully, but phase 22 gives me error = -2, which indicates "Not enough memory". When I check memory on my computer just before Phase 22 is called, I see that almost 1.2GB of 2GB is still available. Then, I switch to OOC feature of PARDISO. During Phase 11, it creates an external file (ooc_temp.ind), but again it fails in Phase 22 with the same error.

I call my PARDISO routines from a COM DLL that uses Microsoft MFC (I am not sure this has anything with this).

Appreciate your help and comments.

Bulent

0 Kudos
7 Replies
Tabrez_Ali
Beginner
1,922 Views
Did you try a smaller linear system?

I dont think free RAM as anything to do with it. For example PARDISO might have trouble simply allocating memory (before it actually fills it).
0 Kudos
Alemdar__Bulent
Beginner
1,922 Views

Tabrezali

I have solved many smaller systems and I haven't seen this problem before (they all worked just fine). This is the only example that gives me the memory error.

I would be very suprised if PARDISO can not use such a relatively large models (in fact, this is the only reason I want to use PARDISO to address large systems in my projects)

bulent.

0 Kudos
Tabrez_Ali
Beginner
1,922 Views
I am sure PARDISO can solve larger problems but perhaps not with the setup you have (P4/Windows). Isnt there a limit on the maximum addressable memory under 32-bit windows?

Maybe others here might be able to answer your question better.
0 Kudos
Alemdar__Bulent
Beginner
1,922 Views

Quite interestingly, a colleauge of mine has an older version of MKL (v7 or 8), and I gave the same matrix to him, and it took only less than 30 seconds on his computer to solve it completely (he has dual core with Windows 32 bit XP, 2GB).

b.

0 Kudos
Tabrez_Ali
Beginner
1,922 Views
I have both MKL 7.2.1 and 10.0. If you can post the matrix (preferably in the CSR format) then I can try it (on linux)
0 Kudos
Alemdar__Bulent
Beginner
1,922 Views

Hi
I have tried a few things, so I wanted to post my findings here
* I have PARDISO placed in one of the DLL I use, which is called from another program. When PARDISO solver was called, I believe that there was not enough continuous memory block left so that I got "not enough memory" during Phase 22 for my test model.
* I created a Windows - console application, and I read in the my test model and run PARDISO right away (I close down all programs running in my system to save some memory). This time it worked and I didn't see any memory error.
* Either it failed because of not enough continuous memory block available to PARDISO during Phase 22 or there are some compatibility issues when Intel MKL and MFC DLL are used together

Then I tried to use out of core (OOC) feature of PARDISO (this time I set iparam[60] =2). With my Windows-console application, it worked fine again (I noticed there created a few files and deleted later, and one of the file was ~500 MB).

Finally I tried to use OOC PARDISO in my real application, and again no luck. Either I got -2 or -9 during Phase 22.

bulent
0 Kudos
Gennady_F_Intel
Moderator
1,922 Views

Hello Tabrazali,

About a limit on the max addressable [virtual] memory for 32bit apps:

The theoretical limit is 4Gb (=2^32) but practical one ~ 2-3Gb (depending on version of Windows)

Now back to Pardiso.

Pardiso In-Core is restricted in a way that input data and internal structures should fit into addressable memory.

It could be more then the system RAM but then a swapping would be an issue.

Note when talking about an input matrix size we always refer to the memory size for nonzero elements in it: nonzero(A), not to the matrix size in terms rows and columns.

The size of Pardiso internal structures highly depends on the input matrix type.

Because of above the input matrix size limit (that Pardiso In-Core) could deal with can not be defined precisely. But it is definitely much less then 2^31.

Pardiso Out-of-core (OOC) is exactly to deal with large matrixes. Its implementation makes possible to deal with matrixes which size is close to 2^31.

But again we should remember that internal structures (e.g. for LU factors) also take significant space which again depends on the matrix type.

However in this case the size of internal structures is limited by (or order of) free space available on your hard drive.

Hope this helps.

--Gennady

0 Kudos
Reply