Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
公告
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

severe (41): insufficient virtual memory

Mike_Z_
新手
7,125 次查看

Windows 10x64, has 76 Gb free real memory, and have very small (1Gb) virtual memory. Program compiled as x64 application, and at the attempt to allocate 3Gb memory matrix ends with message severe (41): insufficient virtual memory. May be (but it strange) it needs namely VIRTUAL, not real memory? Or, what I can do wrong?

7 回复数
jimdempseyatthecove
名誉分销商 III
7,124 次查看

Check:

Control Panel | System and Security | System | Advanced system settings | Advanced Tab | Performance [Settings] | Advanced
  | Virtual memory

In there you will see the size of the paging file. You likely have too small of a size specified.

** The above assumes you do not have a programming error.

For example, you are using an int type where size_t is required.

Jim Dempsey

Mike_Z_
新手
7,124 次查看

Thanks Jim. I increased swapping file from 1 to 30Gb, but witout success. In operator ALLOCATE I still have same error (even after reboot). What's wrong? Smaller allocations are OK...

0 项奖励
Steve_Lionel
名誉分销商 III
7,124 次查看

I agree with Jim that it's probably a coding error on your part. Can you show us a small but complete program that demonstrates the problem?

Mike_Z_
新手
7,124 次查看

You are right, I was wrong. Before allocation I calculate needed memory with error. So, I wrongly thought how much memory I allocate. Now all is OK, thanks and sorry.  Only one question remains: do I need ro have big swapping file if I have enough real memory? In other words, program need 50 Gb, and I have 70 Gb free real memory, do I need in 50+ Gb swapping file?

0 项奖励
Steve_Lionel
名誉分销商 III
7,124 次查看

Yes - Windows will limit you to the size of the swapfile. 50GB for a swapfile is easy, 70GB RAM? VERY expensive and few systems support so much.

0 项奖励
jimdempseyatthecove
名誉分销商 III
7,124 次查看

Notes:

The swap file is a shared resource.

Windows has a long history of NOT managing process virtual memory use of a paging application. It is not unusual for a process that  exceeds the physical RAM to bring the system to a crawl (IOW even the Task Manager can take 10-20 minutes to respond). MS could address this issue with better programming and system tuning parameters. e.g. not permitting a process physical RAM occupation exceed nn% thus making the process slow down a bit earlier while keeping the system a bit more alive.

Jim Dempsey

0 项奖励
gib
新分销商 II
7,124 次查看

Coincidentally, I just encountered this "insufficient virtual memory" error in a C++ (Qt) program that links a Fortran DLL.  After spending some time fruitlessly trying to understand and rectify the paging file size issue (I installed Process Explorer, which can tell you the virtual memory requirements of the running processes - it showed that the 8 Firefox processes were together using about 20 times as much virtual memory as my program), I discovered that the crash was caused by a Fortran coding error.  It turned out to have nothing to do with virtual memory.  I've made a mental note that next time I see "insufficient virtual memory" I will suspect my code.

回复