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

dynamic array problem

ksmphn
Beginner
387 Views
I am a new user of ifort for linux, and the problem for me is that my program stops automatically without any warnning. (See the code blow) when I set nlength=3000 or 5000, the program works quite well. But when I set nlength=8000, the output stops at x/xmax=0.97, but the program is designed to continue after x/xmax=1. For nlength=12000, the output stops at x/xmax=0.2x. So I think maybe the problem is caused by a too large array. But I totally have no idea how to solve this problem. Anyone have some suggestions? Thank you.

The following is part of my program.
double precision, allocatable :: Isum(:,:), A(:,:),B(:),TOLD(:),s(:),aclone(:,:)
double precision, allocatable :: xp(:), dxp(:)
...
do 1003 nl=0,nlength
do 1003 i=0,nl
dummytwo=dabs(xp(nl)-xp(i))/VL/tautotalmin
Idummy1 =(1.0_8-dummytwo)*dexp(-dummytwo)+dummytwo**2*expint(1,dummytwo)
dummytwo=(xp(nl)+xp(i))/VL/tautotalmin
Idummy2 = (1.0_8-dummytwo)*dexp(-dummytwo)+dummytwo**2*expint(1,dummytwo)
Isum(nl,i)=Isum(nl,i)+x**2*dx*(Idummy1+Idummy2)/VL**2
1003 continue
print*, 'L', x/xmax
....
0 Kudos
1 Reply
Steven_L_Intel1
Employee
387 Views
I see no use of nlength in this code. Please provide a short but complete example that demonstrates the problem.
0 Kudos
Reply