主题:编译连接没错,运行出现这样的问题!怎么回事啊
我用的别人的程序,据说用别人的程序容易出现这个问题,这是原代码,运行结果在下面,这个问题该怎么解决啊?有没有朋友遇到相同的问题?
program ddn
implicit none
c
integer num_node,num_elem,inode,t,ii,dn,tt
integer,parameter::N=20
integer::nn(35683)
integer::ne(7888)
integer::s(7888,20)
real::ucr(35683,3)
real::A(N)
real::B(N)
real::C(N)
real::D(N)
integer I,J
real TEMP,TE
c
open(11,file='lashen.txt',status='old',action='read')
c
read(11,*) num_node,num_elem
c
do inode=1,num_node
read(11,*) nn(inode),ucr(inode,1),ucr(inode,2),ucr(inode,3)
enddo
c
do t=1,num_elem
read(11,*) ne(t),s(t,1),s(t,2),s(t,3),s(t,4),s(t,5),s(t,6),
& s(t,7),s(t,8),s(t,9),s(t,10),s(t,11),s(t,12),s(t,13),s(t,14),
& s(t,15),s(t,16),s(t,17),s(t,18),s(t,19),s(t,20)
enddo
c
dn=0
do t=1,num_elem
do ii=1,20
A(ii)=ucr(s(t,ii),2)
B(ii)=ucr(s(t,ii),1)
C(ii)=ucr(s(t,ii),3)
D(ii)=A(ii)*A(ii)+B(ii)*B(ii)
enddo
c
do I=N-1,1,-1
do J=1,I
if(C(J)>C(J+1)) then
TEMP=C(J)
C(J)=C(J+1)
C(J+1)=TEMP
TE=s(t,J)
s(t,J)=s(t,J+1)
s(t,J+1)=TE
endif
enddo
enddo
c
if (C(1)>=39.98.AND. C(1)<=40.14 .AND. C(2)>=39.98
& .AND. C(2)<=40.14 .AND. C(3)>=39.98 .AND. C(3)<=40.14
& .AND. C(4)>=39.98 .AND. C(4)<=40.14 .AND. C(5)>=39.98
& .AND. C(5)<=40.14 .AND. C(6)>=39.98 .AND. C(6)<=40.14
& .AND. C(7)>=39.98 .AND. C(7)<=40.14 .AND. C(8)>=39.98
& .AND. C(8)<=40.14 .AND. C(9)>=39.98 .AND. C(9)<=40.14
& .AND. C(10)>=39.98
& .AND. C(10)<=40.14 .AND. C(11)>=39.98 .AND. C(11)<=40.14
& .AND. C(12)>=39.98 .AND. C(12)<=40.14 .AND. C(13)>=39.98
& .AND. C(13)<=40.14 .AND. C(14)>=39.98 .AND. C(14)<=40.14
& .AND. C(15)>=39.98 .AND. C(15)<=40.14 .AND. C(16)>=39.98
& .AND. C(16)<=40.14 .AND. C(17)>=39.98 .AND. C(17)<=40.14
& .AND. C(18)>=39.98 .AND. C(18)<=40.14 .AND. C(19)>=39.96
& .AND. C(19)<=40.14 .AND. C(20)>=39.98 .AND. C(20)<=40.10 )
& then
if ( D(1)>16.1.AND.D(2)>16.1.AND.D(3)>16.1.AND.D(4)>16.1.AND.
& D(5)>16.1.AND.D(6)>16.1.AND.D(7)>16.1.AND.D(8)>16.1.AND.
& D(9)>16.1.AND.D(10)>16.1.AND.D(11)>16.1.AND.D(12)>16.1.AND.
& D(13)>16.1.AND.D(14)>16.1.AND.D(15)>16.1.AND.D(16)>16.1.AND.
& D(17)>16.1.AND.D(18)>16.1.AND.D(19)>16.1.AND.D(20)>16.1 ) then
dn=dn+1
endif
endif
enddo
c
open(10,file='dn.txt',status='new',action='write')
c
write(10,200) dn
200 format(I6)
end
以下是我的运行结果:
forrtl: severe (10): cannot overwrite existing file, unit 10, file D:\YZ\1W\01co
ating\01dn\dn.txt
Image PC Routine Line Source
dn.exe 0040AEA9 Unknown Unknown Unknown
dn.exe 0040ACDB Unknown Unknown Unknown
dn.exe 00409EE4 Unknown Unknown Unknown
dn.exe 0040A319 Unknown Unknown Unknown
dn.exe 00404A14 Unknown Unknown Unknown
dn.exe 00402894 Unknown Unknown Unknown
dn.exe 00433379 Unknown Unknown Unknown
dn.exe 00428B54 Unknown Unknown Unknown
kernel32.dll 7C817077 Unknown Unknown Unknown
Incrementally linked image--PC correlation disabled.
Press any key to continue
program ddn
implicit none
c
integer num_node,num_elem,inode,t,ii,dn,tt
integer,parameter::N=20
integer::nn(35683)
integer::ne(7888)
integer::s(7888,20)
real::ucr(35683,3)
real::A(N)
real::B(N)
real::C(N)
real::D(N)
integer I,J
real TEMP,TE
c
open(11,file='lashen.txt',status='old',action='read')
c
read(11,*) num_node,num_elem
c
do inode=1,num_node
read(11,*) nn(inode),ucr(inode,1),ucr(inode,2),ucr(inode,3)
enddo
c
do t=1,num_elem
read(11,*) ne(t),s(t,1),s(t,2),s(t,3),s(t,4),s(t,5),s(t,6),
& s(t,7),s(t,8),s(t,9),s(t,10),s(t,11),s(t,12),s(t,13),s(t,14),
& s(t,15),s(t,16),s(t,17),s(t,18),s(t,19),s(t,20)
enddo
c
dn=0
do t=1,num_elem
do ii=1,20
A(ii)=ucr(s(t,ii),2)
B(ii)=ucr(s(t,ii),1)
C(ii)=ucr(s(t,ii),3)
D(ii)=A(ii)*A(ii)+B(ii)*B(ii)
enddo
c
do I=N-1,1,-1
do J=1,I
if(C(J)>C(J+1)) then
TEMP=C(J)
C(J)=C(J+1)
C(J+1)=TEMP
TE=s(t,J)
s(t,J)=s(t,J+1)
s(t,J+1)=TE
endif
enddo
enddo
c
if (C(1)>=39.98.AND. C(1)<=40.14 .AND. C(2)>=39.98
& .AND. C(2)<=40.14 .AND. C(3)>=39.98 .AND. C(3)<=40.14
& .AND. C(4)>=39.98 .AND. C(4)<=40.14 .AND. C(5)>=39.98
& .AND. C(5)<=40.14 .AND. C(6)>=39.98 .AND. C(6)<=40.14
& .AND. C(7)>=39.98 .AND. C(7)<=40.14 .AND. C(8)>=39.98
& .AND. C(8)<=40.14 .AND. C(9)>=39.98 .AND. C(9)<=40.14
& .AND. C(10)>=39.98
& .AND. C(10)<=40.14 .AND. C(11)>=39.98 .AND. C(11)<=40.14
& .AND. C(12)>=39.98 .AND. C(12)<=40.14 .AND. C(13)>=39.98
& .AND. C(13)<=40.14 .AND. C(14)>=39.98 .AND. C(14)<=40.14
& .AND. C(15)>=39.98 .AND. C(15)<=40.14 .AND. C(16)>=39.98
& .AND. C(16)<=40.14 .AND. C(17)>=39.98 .AND. C(17)<=40.14
& .AND. C(18)>=39.98 .AND. C(18)<=40.14 .AND. C(19)>=39.96
& .AND. C(19)<=40.14 .AND. C(20)>=39.98 .AND. C(20)<=40.10 )
& then
if ( D(1)>16.1.AND.D(2)>16.1.AND.D(3)>16.1.AND.D(4)>16.1.AND.
& D(5)>16.1.AND.D(6)>16.1.AND.D(7)>16.1.AND.D(8)>16.1.AND.
& D(9)>16.1.AND.D(10)>16.1.AND.D(11)>16.1.AND.D(12)>16.1.AND.
& D(13)>16.1.AND.D(14)>16.1.AND.D(15)>16.1.AND.D(16)>16.1.AND.
& D(17)>16.1.AND.D(18)>16.1.AND.D(19)>16.1.AND.D(20)>16.1 ) then
dn=dn+1
endif
endif
enddo
c
open(10,file='dn.txt',status='new',action='write')
c
write(10,200) dn
200 format(I6)
end
以下是我的运行结果:
forrtl: severe (10): cannot overwrite existing file, unit 10, file D:\YZ\1W\01co
ating\01dn\dn.txt
Image PC Routine Line Source
dn.exe 0040AEA9 Unknown Unknown Unknown
dn.exe 0040ACDB Unknown Unknown Unknown
dn.exe 00409EE4 Unknown Unknown Unknown
dn.exe 0040A319 Unknown Unknown Unknown
dn.exe 00404A14 Unknown Unknown Unknown
dn.exe 00402894 Unknown Unknown Unknown
dn.exe 00433379 Unknown Unknown Unknown
dn.exe 00428B54 Unknown Unknown Unknown
kernel32.dll 7C817077 Unknown Unknown Unknown
Incrementally linked image--PC correlation disabled.
Press any key to continue