Showing results for

- Intel Community
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
- Pardiso memory problem with Visual Fortran

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted
##

Ioannis_K_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-22-2018
04:15 PM

35 Views

Pardiso memory problem with Visual Fortran

I use mkl with Visual Fortran Compiler XE 14.0.0.103.

I employ the pardiso function for a program that involves solution of a system of linear equations: {x} = {b}, where , {b} are given and we want to find vector {x}. My code has to solve this system of equations repeat..., {b}. The values of , {b} at each iteration depends on the value of {x} from the previous iteration, so the algorithm is...

Initialize {x}

do i = 1,Niter

[Find , {b}, given {x}]

[Solve {x} = {b} and find updated {x}]

end do !i

My code has encountered a SERIOUS problem with memory management. Specifically, I see a continuous increase in the amount of memory used, until my computer runs out of memory and the program aborts. I do not have any dynamic memory allocation in my code (I do not use pointers), so I believe that the problem is due to mkl.

I tried to include the line:

call mkl_free_buffers()

but this did not help in any way. I found some posts in this forum with similar comments, but I did not find anything helpful. Any help on this issue would be greatly appreciated!!

7 Replies

Highlighted
##

yes, we had similar problems with those versions. I recommend to try one of the latest versions of MKL ( 2018 ) and let us know if the problem is still exists on your side.

Gennady_F_Intel

Moderator

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-22-2018
07:10 PM

35 Views

Highlighted
##

Thank you Gennady. I had a follow-up question: can I download a newer version of mkl and install it on my computer, so that I replace the older version that I am currently using, or do I need to purchase a newer version of Visual Fortran? If I can download a new version of mkl, can you please briefly explain where I can find it and how to install it? For example, is special care required to manually replace existing lib files with newer versions?

Ioannis_K_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-22-2018
08:30 PM

35 Views

Highlighted
##

You may take the latest version of mkl for evaluation. Here are the links to pages show how to download: https://software.intel.com/en-us/mkl ; and to install: https://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-2018-install-guide.

Gennady_F_Intel

Moderator

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-22-2018
11:14 PM

35 Views

Highlighted
##

Ioannis_K_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-23-2018
06:56 AM

35 Views

Gennady,

I installed a trial version of the latest Intel Parallel Studio, but the problem still persists. Is there a way for me to check which version of mkl I am using?

Highlighted
##

Gennady_F_Intel

Moderator

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-23-2018
09:35 AM

35 Views

yes sure that's possible. The fastest way - to check mkl_version.h file or you may add into your code mkl_get_version routine. the code may look like as follow

#include <stdio.h>

#include "mkl.h" int main(void) { int len=198; char buf[198]; mkl_get_version_string(buf, len); printf("%s\n",buf); printf("\n"); return 0; }

Highlighted
##

Ioannis_K_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-23-2018
10:04 AM

35 Views

OK, thank you. I checked and my mkl version is indeed the 2018 one:

Intel(R) Math Kernel Library Version 2018.0.2 Product Build 20180127 for Intel(R) 64 architecture applications

What could I do to try and resolve the issue? Is there any alternative for parallel solution of systems of equations (direct or iterative), which will circumvent the need for pardiso and may prevent the occurrence of the specific problem?

Highlighted
##

Ioannis_K_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-23-2018
10:54 AM

35 Views

Gennady,

I think I may have found an "ad hoc fix" to the problem: I am going to describe the process I am following, for solving a sparse problem where the coefficient array is described by 3 vectors, namely, *Values*, *rowIndex* and *columns*, and my right-hand-side vector is *bvec*.

1) Create "copies of the input", that is: *Values*2 = *Values*, *rowIndex*2 = *rowIndex*, *columns*2 = *columns*, and *bvec*2 = *bvec*

2) call pardiso passing the "copies" as input arguments.

3) if pardiso has completed without error, then copy the solution vector to *bvec*.

4) Call pardiso again, this time using a value of parameter *phase* = -1.

Following these steps leads to a constant memory use in my program. Please note that I *HAD* to define and use the "copies" of the input arguments. If I tried to follow the above process without step "1", then the program aborted with error (access violation).

For more complete information about compiler optimizations, see our Optimization Notice.