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

error(41) insufficient virtual memory

Brooks_Van_Horn
New Contributor I
1,102 Views

I have 2.35 TB of virtual memory in a x64 application but I still get a error(41) insufficient virtual memory message. I ham using Win-10 x64 and debug build targetting x64 using msvs 2013 community edition and Intel's PS XE CE Fortran 2017 r2. So how do I tell my exe that it has a lot of memory? How do I give it a larger stack space, a larger fp stack space?

Thanks,

Brooks

0 Kudos
11 Replies
jimdempseyatthecove
Honored Contributor III
1,102 Views

Brooks,

You are likely confusing the term Virtual or Physical Address Space with Virtual Memory. The Virtual/Physical Address Space is a hardware limitation of the CPU. Whereas the Virtual Memory capacity of a process is an O/S limitation providing a sub-set of the CPU capability. This limitation is typically a limitation of the system Page File (Swap File) capacity and/or how the O/S is configured to partition the CPU's Virtual/Physical Address Space (portion for O/S, portion for application, portion for dynamically loaded libraries, portion for I/O, etc...).

Look at the page file size. On Windows 7 this is in System Properties, Advanced, Performance, Settings, Advanced, Virtual Memory, Change

Note, this will reserve sufficient disk space for the size you specify. To get what you stated, you will require a single volume with 2.35TB free space (less current page file size) to make that size available. (Subject to O/S limitations https://msdn.microsoft.com/en-us/library/windows/desktop/aa366778(v=vs.85).aspx#physical_memory_limits_windows_10)

Jim Dempsey

 

0 Kudos
Brooks_Van_Horn
New Contributor I
1,102 Views

Attached is the memory status during this run.

0 Kudos
FortranFan
Honored Contributor II
1,102 Views
0 Kudos
Steve_Lionel
Honored Contributor III
1,101 Views

The "memory status" you posted is inaccurate. You certainly don' have 2TB of available virtual memory - not with only 1TB and change of free disk space. That is showing you the theoretical maximum Windows currently supports. There really isn't a good way to know what the actual limit is, as there is no setting for this. You don't know until you run out.

You asked about FP stack size - on X64 there is no such thing, and even on IA-32 you're using SSE instructions and not the old x87 FP stuff (where the FP stack size is fixed.)

So how much VM did your program use before it failed? Intel Inspector XE has a "memory growth" display that can be helpful.

0 Kudos
Brooks_Van_Horn
New Contributor I
1,101 Views

Steve, I don't have Intel Inspector XE. I have the Composer edition. I don't have money for something like Inspector.

Brooks

0 Kudos
Steve_Lionel
Honored Contributor III
1,101 Views

You can always get a 30-day free trial.

0 Kudos
Brooks_Van_Horn
New Contributor I
1,101 Views

Steve,

I got it and ran it. I'm only using about 500GB and the only memory errors are coming from tv_x64.dll. It is not an easy tool to use and I had to manually change the global flags by hand in the hklm.

Brooks

0 Kudos
Brooks_Van_Horn
New Contributor I
1,101 Views

That is 500 MB not GB.

Brooks

0 Kudos
Steve_Lionel
Honored Contributor III
1,101 Views

I don;t know what tv_x64.dll is. How much memory was trying to be allocated when it failed? Was this an explicit ALLOCATE in your code?

0 Kudos
Brooks_Van_Horn
New Contributor I
1,101 Views

It may take me a few days to answer your questions.

Brooks

0 Kudos
Brooks_Van_Horn
New Contributor I
1,101 Views

All,

 

This was my problem. I didn't destroy all the resources I created under Windows. And some I destyroyed too many times. I had to do a pairwise grouping process to make sure I destroyed everything I created.

 

Thanks all,

 

Brooks

0 Kudos
Reply