From mrao.cam.ac.uk!mackay Tue Oct 29 16:29:39 1996 From: mackay@mrao.cam.ac.uk (David J.C. MacKay) To: ups-users@ukc.ac.uk Subject: ups <-> fortran (sunos) Cc: mackay@mrao.cam.ac.uk Dear ups-users, I have the amusing task of teaching fortran 90, and obviously I would like to have the help of ups as my debugger. The Sun on which I do this work does have ups (hurray!) but when I try to use it on my fortran programs I don't get much success. (1) is there a web page somewhere giving hints for getting the fortran capabilities of ups working? (2) if not, would anyone care to comment on my symptoms? (attached_) Thanks David ========================================================================== David J.C. MacKay email: mackay@mrao.cam.ac.uk www: http://wol.ra.phy.cam.ac.uk/mackay/ Cavendish Laboratory, tel: (01223) 339852 fax: 354599 home: 276411 Madingley Road, international code: +44 1223 Cambridge CB3 0HE. U.K. home: 19 Thornton Road, Girton, Cambridge CB3 0NP SYMPTOMS First, let me tell you how I make the executable. Here is the makefile: LIBS = -L/opt/nag/lib -lnag \ -L/opt/SUNWspro/SC2.0.1 -lF77 -lM77 -lm clean: rm -f *.o %.go: %.f90 f90 -g -o $*.go $*.f90 $(LIBS) ----------------- OK, so I make ex0.go where the source code ex0.f90 is ! Program to convert an input number of seconds to hours, minutes and seconds ! REAL, PARAMETER :: seconds_per_minute = 60.0 INTEGER, PARAMETER :: minutes_per_hour = 60 INTEGER hours, minutes REAL seconds, remainder ! real variables allow the use of decimals ! WRITE (*,*) ' input number of seconds to be converted ' READ (*,*) seconds ! minutes = seconds / seconds_per_minute remainder = MOD ( seconds , seconds_per_minute ) hours = minutes / minutes_per_hour minutes = MOD ( minutes , minutes_per_hour ) WRITE (*,*) seconds,' seconds is ', hours,' hours', minutes, & ' minutes ', remainder, ' seconds' END ------------------------ I then type ups ex0.go, and ups comes up with source code, and I click on start and then on stop (the program having paused for the "read".) Here is where my problems start: [ups version 3.14.1 (build date: Fri Nov 17 18:15:28 GMT 1995)] I click on the variables like minutes in the source code, and the message "no function or variable 'minutes'" comes up. I click on main and expand it, and I find that the variables come up ok. but in the original xterm I get a zillion of these: UPS trapped non fatal X error: BadValue (integer parameter out of range for operation) this message comes up every time I do anything like click "step". A zillion times. Any ideas? many thanks David -------- Rod A suggested using this option: ups ex0raw.go -nodemangle and this had a good effect. Rod also suggested using setenv UPS_LANGUAGE C++ because this would make string matching happen, and this worked for me once I found out the bash equivalent of setenv (export). export UPS_LANGUAGE UPS_LANGUAGE=C++