当我在代码中调用子例程时,我收到消息堆栈溢出。 注意:程序已完全运行,没有任何消息。几天后再次运行时突然开始。
do i=1,npop
do j=1,nvar
call random_number(r1)
call random_number(r2)
poptemp(i,j)=poptemp(i,j)+bheta*r1*(pop(i,j)-poptemp(i,j))+ &
bheta*r2*(pbest(j)-poptemp(i,j))
Pk(j)=poptemp(i,j)
end do
call RSM(Pk,varmin,varmax,obj,lda,x,y,z,mi,sigma2,Rinv,cvg)
objcont=objcont+1
ftemp(i)=obj
end do
Call RSM(....)语句向我显示错误消息。
forrtl:严重(170):程序异常-堆栈溢出
Image PC Routine Line Source
RSM_25.exe 00CC6947 Unknown Unknown Unknown
RSM_25.exe 00CC3A8D _MAIN__ 129 RSM_teste25.f90
RSM_25.exe 00CC8412 Unknown Unknown Unknown
RSM_25.exe 00CC6DDF Unknown Unknown Unknown
RSM_25.exe 00CC6C0F Unknown Unknown Unknown
KERNEL32.DLL 75E56359 Unknown Unknown Unknown
ntdll.dll 77947B74 Unknown Unknown Unknown
ntdll.dll 77947B44 Unknown Unknown Unknown