Note: I wrote this page: Thu Dec 12 16:12:17 1996 -- but I still like ups, even though it hasn't been actively developed by anyone for a long time. On Tue 7/8/07 I tried downloading ups on sourceforge and it didn't seem to work as a C++ debugger. An alternative debugger might be cgdb.

Using ups to debug fortran90 on thor

I strongly recommend using the ups debugger to debug your C code or Fortran. I have succeeded in getting ups to work on thor. Here is how. (Thanks to Brian Fox ( and Rod Armstrong ( for their help and to Tony Stoneley ( for putting ups on thor).

What to do

Time-saving execution of ups using Make

As a convenient shortcut (which demonstrates the advantages of using "make") I have added a line to my Makefile such that to compile ex0.go (if it needs compiling) and then run the command ups ex0.go, all you need to do is type

Using ups to debug f77 code

According to, ups3.14 works fine with the version of f77 we have on Thor but not with the version we have on the CUS.

Using ups to debug C code

Using ups to debug C code is much easier. No need for the UPS_LANGUAGE and nodemangle things above. Just run
ups command
and if your command normally has arguments, you can include them thus
ups command -a 'arguments'

More information about ups


The old way of using ups

When I first used ups, it didn't work right. Something to do with the fortran compiler. There was a work-around as follows:
  • In your bash shell, type the following:
        export UPS_LANGUAGE
    [These commands could be added to your .bash_profile if you decide you want to use ups frequently]
  • OK, you are ready to run ups. If you normally run the code by typing
    in a window, then what you should do is type
           ups ex0.go -nodemangle 
    instead. This will cause an xwindow to come up containing your source code, a list of useful variables and subroutines, and a load of buttons. To run your code as normal, click on "start". To stop the executation of the code, click on "stop". To examine the value of a variable, click on the name of the variable in your code. Its value should appear in the upper window. To step through your code one line at a time (and step into routines), press "step"; to continue execution to the next line (without visibly stepping into routines) press "next". When a variable changes value, the value in the upper window will change colour. Neat hey? Why is it necessary to assert that the language is C++ and why is the `nodemangle' flag required? Well, this is because of the strange properties of fortran. In particular, fortran compiliers insist on adding "_" to variable names, instead of leaving the variable names as they are in the source code. The above two hacks get around this oddity and give a working debugger.
    David MacKay <>
    Last modified: Tue Aug 7 16:35:18 2007