Tutorial: How to do input/output in FORTRAN

One of these days, you might encounter FORTRAN source code (very common in legacy material models even in modern C++ codes). You might have to “tweak” the FORTRAN even if you aren’t an expert. This program illustrates how to read and write numbers and strings in FORTRAN, which should familiarize you with the syntax. See next entry for further assistance in deciphering Fortran.

You may download the program here.

Tutorial: Emacs and GDB

I remember learning how to use a debugger and Utah State University as an undergraduate.  We learned to program in Fortran 90, and used a Microsoft debugger.  It seemed cool, but honestly with the types of programs I was writing at the time, using print statement seemed to be effective enough and less of a hassle.  Recently I have been working with the Uintah MPM code, which is MUCH larger and more complex than any code I’ve ever written.  After several months of wading through the code I finally came across a problem that “cout” just could not help me solve.  The code was suddenly crashing with an allocation error and giving no useful backtrace information.  A colleague suggested that I use gdb to find out where the problem was occurring.  It turned out to be very, very helpful and surprisingly easy to use.  I’ve recently become a convert to Emacs, and found that the gdb interface in Emacs is especially nice.  So here is goes:

Continue reading