home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!uwm.edu!cs.utexas.edu!hermes.chpc.utexas.edu!michael
- From: michael@chpc.utexas.edu (Michael Lemke)
- Newsgroups: comp.lang.fortran
- Subject: Re: VAX FORTRAN COMMON block problem
- Message-ID: <1992Nov5.073450.1798@chpc.utexas.edu>
- Date: 5 Nov 92 07:34:50 GMT
- Article-I.D.: chpc.1992Nov5.073450.1798
- References: <1992Nov4.215456.9045@Princeton.EDU> <1992Nov4.231000.16114@doug.cae.wisc.edu>
- Organization: The University of Texas System - CHPC
- Lines: 48
-
- In article <1992Nov4.231000.16114@doug.cae.wisc.edu> dafnioti@cae.wisc.edu (Petros Dafniotis) writes:
- >In article <1992Nov4.215456.9045@Princeton.EDU> mfterman@phoenix.Princeton.EDU (Mutant for Hire) writes:
- >>Here's the problem. I have the following set of lines in my code. This
- >>is the only common block in the entire program. These lines are repeated
- >>verbatim in every subroutine and in the main code.
- >>
- >> real t0,ts,c1,c2
- >> real e(-ks:ks,-ks:ks,-ks:ks)
- >> real ei(-ks:ks,-ks:ks,-ks:ks)
- >> real qqi(-ks:ks,-ks:ks,-ks:ks)
- >> complex y(0:iter,-ks:ks,-ks:ks,-ks:ks,1:dimf)
- >> common t0,ts,c1,c2,e,ei,qqi,y
- >
- >Martin,
- > I cannot find (at first glance) anything wrong with your code; so I only
- >have three suggestions:
-
- [1 and 2 deleted]
-
- >3) you might want to use the debugger and set a watch point for your y
- > variable that you know is messed up
-
- I want to strongly recommend the debugger which is my favorite tool
- for spotting such problems. The VAX debugger is not a toy like what
- you get in Unix but is an amazingly powerful tool. Compile you code
- with
-
- $ for/noop/deb ....for
- $ link/deb ....
- $ run the_stuff
-
- After a while noticably longer than usual you get the debugger prompt.
- Now press PF2 to get your code on the screen. With KP0 (keypad 0) you
- can step through your code line by line. PF1 KP0 will step into a
- subroutine when you are on a line that calls one; KP0 alone will step
- over it. KP, runs the code without further interruption. To do what
- dafnioti@cae.wisc.edu (Petros Dafniotis) suggests just enter SET WATCH Y
- <return> and press KP,. However, if your code is compute intensive this
- will probably slow it down that much that you don't want to trace it
- this way. SET WATCH Y(1,1,1,1,1) might help a little. Unless it is a
- very complex code I usually spot the error just by following the code's
- logic with STEPs (KP0) and a couple EXAMINEs. Also, make frequent use
- of HELP (PF2 as always) to find out more.
-
- --
- Michael Lemke
- Astronomy, UT Austin, Texas
- (michael@io.as.utexas.edu or UTSPAN::UTADNX::IO::MICHAEL [SPAN])
-