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

Visual Studio: memory utilisation

AS_Cardiff
Beginner
1,530 Views

I am using 128 GB RAM workstation for my simulation on Intel FORTRAN Compiler on Visual studio platform. I intend to use the workstation for high speed and large computational domain. However, for larger computational size, the memory limitation comes into picture. While processing for comparatively smaller computations, it shows only the 10% of full capacity of RAM in the task manager. However, a little larger size gives memory error.

For accommodating larger computational domain, visual studio should utilize higher memory. Could you suggest some way out so that higher memory allocation is possible and large computational domain could be solved!  @fortran  @Visual studio

Thanks

 

0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
1,416 Views

As I suspected, you have large static arrays (in COMMON most likely). On Windows, there is a 2GB limit on static code and data, even in x64.

Change these arrays to ALLOCATABLE and ALLOCATE them to the desired sizes. Then you will be able to use more virtual memory.

View solution in original post

0 Kudos
5 Replies
AndrewG_Intel
Employee
1,510 Views

Hello @AS_Cardiff

Thank you for posting on the Intel® communities.


In regards, to this request, we would like to inform you that we have a forum for those specific products and questions so we are moving it to the Intel® Fortran Compiler Forum so it can get answered more quickly.


Best regards,

Andrew G.

Intel Customer Support Technician


0 Kudos
Steve_Lionel
Honored Contributor III
1,473 Views

I think we need some more details. Are you using ALLOCATABLE arrays for the large data, or are you declaring them as local arrays or in COMMON? Are you building a 32-bit or 64-bit application? What is the error that you get?

0 Kudos
AS_Cardiff
Beginner
1,428 Views

Thanks @Steve_Lionel .

I am using allocatable arrays for the larger data; some of them are local arrays and some are shared. I am using VS 2019 in windows  64 bits, 128 GB RAM, 10 cores. 

the error message is: 
Error fatal error LNK1248: image size (A3CC0000) exceeds maximum allowable size (80000000) LINK

I changed my executable to run in x64 mode (which is said to address upto 2GB memory!).  Since the RAM of workstation, I am using is 128 GB,  is there a way to address the memory issue?

0 Kudos
Steve_Lionel
Honored Contributor III
1,417 Views

As I suspected, you have large static arrays (in COMMON most likely). On Windows, there is a 2GB limit on static code and data, even in x64.

Change these arrays to ALLOCATABLE and ALLOCATE them to the desired sizes. Then you will be able to use more virtual memory.

0 Kudos
mecej4
Honored Contributor III
1,450 Views

AS_Cardiff: Please note that the thread title as well as your description of the problem is confusing. The issue is about the memory used by your program after being compiled and run, not by Visual Studio or the compiler.

As Steve_Lionel pointed out, the term "memory error" is rather vague since there are many different errors related to attempts to use/misuse memory. A more specific and precise statement of the error is needed before an attempt to overcome the error can be suggested.

The most likely reason for your program failing when running a test case where more memory is used: an error in your program, such as exceeding array bounds, attempting to write to a section of memory that is write-protected, etc. Again, note that this has little to do with Visual Studio or the compiler.

0 Kudos
Reply