- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
forrtl: severe (29): file not found, unit 8, file /home/milenko/mt2ddib/fort.8
program main
c
include 'params.dat'
c
integer*2 iho2,imi2,ise2,ihu2
character fexpdat*200,fmodel*200,yesno*1
logical*4 laccept,scam_accept
c
c
open(2,file='fexp.dat',status='unknown')
open(8,file='fmodel.dat',status='unknown')
c
read(8,*)n,m,ma
n1=n-1
m1=m-1
read(8,*)(sy(i),i=1,n1)
read(8,*)(sz(i),i=1,m1)
Why?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you post "ifort -V" output to show us which compiler you have?
Where is fmodel.dat relative to the executable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The I/O error message indicates that a read from unit-8 with an implicit OPEN (since the name is fort.8, rather than model.dat) was attempted before the file was opened.
Can you explain the reasons for opening an input file with status='unknown'? Do you know the consequences of doing so?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried also with status='old' get the same problems.I have used unknown with my previous program without any problems,then just followed here same way.I am now putting wholw programme:
program main
include 'params.dat'
integer*2 iho2,imi2,ise2,ihu2
character fexpdat*200,fmodel*200,yesno*1
logical*4 laccept,scam_accept
c
open(2,file='fexp.dat',status='unknown')
open(8,file='fmodel.dat',status='unknown')
c
read(8,*)n,m,ma
n1=n-1
m1=m-1
read(8,*)(sy(i),i=1,n1)
read(8,*)(sz(i),i=1,m1)
syy(1)=0.
do i=1,n1
syy(i+1)=syy(i)+sy(i)
enddo
szz(ma)=0.
do i=ma,m1
szz(i+1)=szz(i)+sz(i)
enddo
do i=ma-1,1,-1
szz(i)=szz(i+1)-sz(i)
enddo
do i=1,ma-1
do j=1,n1
ic(i,j)=1
enddo
enddo
do i=ma,m1
read(8,*)(ic(i,j),j=1,n1)
enddo
icd=1
res(icd)=-1.
cond(icd)=0.
ivar(icd)=0
read(8,*)nc
nc=nc+1
do i=2,nc
read(8,*)icd,res(icd),ivar(icd)
if(res(icd).le.0.)then
cond(icd)=0.
else
cond(icd)=1./res(icd)
endif
enddo
close(8)
c
read(2,*)np
read(2,*)(per(i),i=1,np)
c
call solve_mt2d_direct
c
stop
end
c
c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is still not the complete program but the situation is as mecej4 described earlier.
I verified with a smaller test case that the compiler you have functions properly and as mecej4 suggested. Somehow within the actual source you compiled unit 8 is not opened and associated with model.dat, therefore, the I/O runtime defaults to looking for fort.8. You might double check that you actually compiled the same source that you showed here.
You could also place an INQUIRE statement at various positions within the program you showed and inquire by filename model.dat with the OPENED specifier or unit number8with the NAME specifier.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page