I am writing to signal the following problem that I have bumped into. I am trying to run a program that I wrote some time ago and the following happens:
Given the above I suspect that the problem may be that I am using more memory than Intel fortran can handle but since I don’t know much about its inner working I don’t know if my diagnosis is correct and I know even less regarding how I could fix the problem.
I doubt memory size is the problem. I suggest you look for variables that have not been initialised or incorrect argument lists for the routines (unless all are contained in modules - then the number and types of arguments can be checked of course). Increasing the stack means that the memory layout changes, which could affect the memory location and the contents thereof for uninitialised variables. If memory size was a problem, you would have seen messages about access violation and the like, not so much NaNs.
As Arjen suggest it is probable that your code has some bugs that remained hidden with the old compiler. Compile with /traceback /check:uninit which will throw errors if you use variables that have not been given a value. You can then locate and fix them.
Thanks, indeed some of the elements in an array were not initialized. I believe the old compiler simply initialized to 0 everything that was not explicitely initialized and that's why I had not realized of the problem.
That is a well-known problem :). Fortran very explicitly guarantees no automatic initialisation will occur. Of course, memory management and compiler options may change that - as you have experienced - but the essence is that no such thing occurs, unless you explicitly do so. You can therefore not rely on variables having a value zero, they can in fact have any odd value, but it can be tricky to find the location in the code. Or even realise there is a problem.
You can use compiler flag /Qinit:zero which might 'fix' the problem. IMO this is just a quick bandage to apply whilst the proper cure is worked on.
Note that you also have to set /Qinit:arrays for arrays to be zero-initialized with /Qinit:zero.