- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
tingscheekenMy DocumentsICAICAdatfile.tmp
Image PC Routine Line Source
drive.exe 00416329 Unknown Unknown Unknown
drive.exe 00416187 Unknown Unknown Unknown
drive.exe 00415364 Unknown Unknown Unknown
drive.exe 00415799 Unknown Unknown Unknown
drive.exe 0040D0C5 Unknown Unknown Unknown
drive.exe 00401100 DRIVER 50 Driv.for
drive.exe 00452269 Unknown Unknown Unknown
drive.exe 004376C9 Unknown Unknown Unknown
kernel32.dll 77E8141A Unknown Unknown Unknown
Press any key to continue
Message Edited by michael.m on 02-25-2005 01:42 PM
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
open(unit=22,file='datfile.tmp') read(22,*) tol read(22,*) tmax read(22,*) nres read(22,*) z0 read(22,*) Q read(22,*) choice read(22,*) bla read(22,*) omegac read(22,*) omegae read(22,*) ramp read(22,*) kc read(22,*) w read(22,*) R read(22,*) K read(22,*) ratio read(22,*) conmech read(22,*) nonconmech read(22,*) chcramp read(22,*) Deq read(22,*) thick read(22,*) break read(22,*) cura read(22,*) ratio2 read(22,*) Vol read(22,*) www read(22,*) qq read(22,*) miu read(22,*) rho close(22)
Certainly. Thank you for responding. The READ code is above, and I've attached the offending data file (note that I appended .txt to the file name in order for the message boards to allow me to upload it).
Thanks again!
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
program driver integer*4 nresmax real*8 pi,xi0,xi1 parameter(nresmax=300002,pi=3.141592654,xi0=8.854D-03, + xi1=3.897D-02) real*8 t,tmax,tstep,tout real*8 sa(nresmax,4),d0 real*8 d(2),work(142),phase,amplitude,a2,www,qq,miu,rho real*8 tol,bla,Q,Dnorm,break,thick,cura,betaw,ratio2 real*8 z0,z1,omegac,omegae,ramp,ratio,dmax,pnorm,Vol,wqq,wqp real*8 betac,kc,mc,Aa1,Aa2,R,K,F0,w,a0,betai,Deq,lambda integer*4 nres,choice,contact,capflag integer*4 i,ii,conmech,nonconmech,chcramp,tnres integer*4 iflag,iwork(5) common /step/ tmax,tstep,nres common /excit/ z0,z1,omegac,omegae common /excit2/ ramp common /dataeq/ betac,kc,mc,R,K,F0,w,a0,betai,Deq,tol common /res/ sa common /model/ conmech,nonconmech,d0,dmax common /rampchoi/ chcramp common /maugisdat/ Dnorm,lambda common /flags/ contact,capflag common /radcon/ a2 common /forces/ Aa1,Aa2 common /capi/ break,cura,thick,betaw common /chafiel/ qq,miu,rho external equa,resul,ode open(unit=22,file='datfile.tmp') read(22,*) tol read(22,*) tmax read(22,*) nres read(22,*) z0 read(22,*) Q read(22,*) choice read(22,*) bla read(22,*) omegac read(22,*) omegae read(22,*) ramp read(22,*) kc read(22,*) w read(22,*) R read(22,*) K read(22,*) ratio read(22,*) conmech read(22,*) nonconmech read(22,*) chcramp read(22,*) Deq read(22,*) thick read(22,*) break read(22,*) cura read(22,*) ratio2 read(22,*) Vol read(22,*) www read(22,*) qq read(22,*) miu read(22,*) rho close(22)
Curiously, if I run the executable from the command prompt (instead of the debugger) I get the following, differenterror:
C: ... >drive
forrtl: severe (157): Program Exception - access violation
Image PC Routine Line Source
drive.exe 0042D104 Unknown Unknown Unknown
drive.exe 0041F093 Unknown Unknown Unknown
drive.exe 0040D52F Unknown Unknown Unknown
drive.exe 0040D0DB Unknown Unknown Unknown
drive.exe 0040114A DRIVER51 Driv.for
drive.exe 00452269 Unknown Unknown Unknown
drive.exe 004376C9 Unknown Unknown Unknown
kernel32.dll 77E8141A Unknown Unknown Unknown
Line 51 is the second read statement. (I'm puzzled as to why I get two different errors; perhaps the EOF error closes the file but still runs, and the second statement gets an access violation because the file is now closed?)
Michael
Message Edited by michael.m on 02-2 6-2005 04:26 PM
Message Edited by michael.m on 02-26-2005 04:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The reason you are getting the EOF error is that the input file is not where the program expects it to be. When you run the program from within the Developer Studio IDE, the default directory is set to the project directory, NOT the directory containing the EXE. So the OPEN is creating a new, empty file, which when read from gets an EOF. You see a different behavior when run from the command line because the input file is in the same directory as the EXE.
You can set the default directory for the debugger in Project..Settings..Debug or put a copy of the input file in the project folder.
The access violation is trickier. I don't see anything directly in the source that would cause this, but I can think of two things that could make this happen:
- You have a common block and a routine of the same name
- The common blocks are not the same length in all the source files
Either of these is illegal in Fortran.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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