Hello all.
Disclaimer: I'm not a professional Fortran programmer. So forgive me if I sound incompetent in some areas. With that said....
I'm running a code, specifically RSICC neutron transport code, and I'm running into a limitation that I can't seem to verify. I'm asked to allocate a certain length of memory. What I need is 40,000,000 words. An array is created and each element initialized to zero ranging from a starting value to this 40million number. However, the do loop that initializes the array, half way through, stops itterating. No error codes of any kind. it simple stops. It stops on iteration 20018392.
Here is the code:
subroutine clearx (a,n1,n2)
dimension a(0)
c - - - - - sets (a(i),i=n1,n2) to 0 if n1.le.n2
if(n2.lt.n1) go to 9900
do 10 n=n1,n2
10 a = 0.
9900 return
end
n1 starts at 10,000,001
n2, the word size requested, is 40,000,000
Another interesting note: On iteration 20,000,053, n2 is no longer 40,000,000 but 0 and remains 0 for all subsequent iterations until it terminates.
Can anyone lend a hand to this dillemma? I'm at a loss and getting very frustrated!
Compiler: Intel Fortran Compiler V8.0
With MS C++ .NET 2003 Standard
Thanks in advanced!
-kirk
Disclaimer: I'm not a professional Fortran programmer. So forgive me if I sound incompetent in some areas. With that said....
I'm running a code, specifically RSICC neutron transport code, and I'm running into a limitation that I can't seem to verify. I'm asked to allocate a certain length of memory. What I need is 40,000,000 words. An array is created and each element initialized to zero ranging from a starting value to this 40million number. However, the do loop that initializes the array, half way through, stops itterating. No error codes of any kind. it simple stops. It stops on iteration 20018392.
Here is the code:
subroutine clearx (a,n1,n2)
dimension a(0)
c - - - - - sets (a(i),i=n1,n2) to 0 if n1.le.n2
if(n2.lt.n1) go to 9900
do 10 n=n1,n2
10 a = 0.
9900 return
end
n1 starts at 10,000,001
n2, the word size requested, is 40,000,000
Another interesting note: On iteration 20,000,053, n2 is no longer 40,000,000 but 0 and remains 0 for all subsequent iterations until it terminates.
Can anyone lend a hand to this dillemma? I'm at a loss and getting very frustrated!
Compiler: Intel Fortran Compiler V8.0
With MS C++ .NET 2003 Standard
Thanks in advanced!
-kirk