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

Error Code 157 - What to do

Vanka_Sastry
Beginner
6,005 Views
I am currently the compiler on 64-bit Windows 7 running Core 2 Duo 64-bit with 4GB of RAM. I have a large monte carlo program, and when I fire a job using this compiler, first I get stack overflow error 170.
While the documentation says that one should set enough memory by a "\\FXXX" bytes, it doesn't give an idea as to
how much memory needs to be set. This program can be circumvented by setting an arbitrarily large memory like 200MB.
When the compiler returns the executable, and it is run, it starts the calculation but quickly returns with error
code 157 indicating that there has been a memory access violation.

It may be noted that in other compilers, there is a way to set the environment for a large model.
1. How does one indicate such large model to this compiler?
2. How to circumvent this error?
3. Does this error have anything to do with the settings in windows?
0 Kudos
1 Reply
IDZ_A_Intel
Employee
6,005 Views

Windows does not have the concept of a "large memory model" the way Linux does. On 64-bit Windows, you automatically have up to 8TB of virtual address space for dynamically-allocated memory, but the same 2GB static code and data and 1GB stack limit of 32-bit Windows. For more information, see Memory Limits for Applications on Windows.

However, I don't think this is relevant to your case, as you would see different errors if you were exceeding the 2GB static limit.

The access violation can have many possible causes - I suggest you start with Don't Touch Me There - What Error 157 is trying to tell you on the topic. I suggest you look at either the traceback or, preferably, where it stops in the debugger, to find out where exactly the access violation occurs. This may give you a clue as to the cause. If you aren't already, I recommend building a Debug configuration in Visual Studio or use /check:bounds and /warn:interface when compiling.

Can you show us the actual text of the access violation error? The PC and address themselves can often be a clue.

0 Kudos
Reply