I did an unpack and “make” on my port of the older GIStemp. Long time tech followers here will remember that I’d made a “Makefile” for it.
GIStemp does a particularly brain-dead style of computing where the source code is compiled, via a script, each time it is run. This guarantees a “never the same way twice” set of binary code being run, while wasting resources, while providing the minor (near trivial) benefit that anyone changing the code doesn’t need to type “make”… it also avoids all the usual formalities of things like source code archives with version control (like “cvs checkin” or more modern systems like git) and any ability to look at prior version history…
Well, I couldn’t quite bring myself to live with that, so made a traditional Makefile to do the build, and put sources in a source directory and had a distinct binary directory for runs, and, well, basically brought the structure up to about 1990 or so… ( it still uses f77 in some areas, so parts of it are well back in 1977 in terms of the FORTRAN used, while other bits use f95, so are almost in this millennium…)
At any rate, I’ve unpacked, and did a “make”. It failed. I fixed. It failed. I fixed. The normal cycle. Here are the things I had to do to get it to compile on CentOS 6.3 directly quoted from my notes. Also remember that in an earlier posting I’d had to add the FORTRAN compiler and the Python language via a near trivial apt-get development tools. That’s the first line about replacing the compiler names as instead of distinct f77 and g95 (for GNU Fortran 95) compilers it all uses the gfortran compiler now. These changes are with respect to my Makefile, not the dozen or two scripts in the original GIStemp. Part of the advantage of a Makefile is that things like swapping the compiler name can happen in one place only… Lines starting with “#” have been commented out, or removed, and replaced by something else without the leading “#”.
I’d used FC as the environment variable for FORTRAN Compiler where version didn’t matter, and FC77 for those parts that critically depended on the FORTRAN77 compiler specification; with FC95 used for those programs that needed the FORTRAN95 language spec. Now it looks like gfortran handles all of it just fine. No need to divide them.
One program had had a ‘trace’ directive in the compile statement. That was not accepted by gfortran so was removed. In another, I’d had a bogus “:q” line stuck in it. When leaving the vi editor, you type “:q” so that tells me I was in “insert line” mode when I tried to exit and didn’t notice I’d stuck a bogus line in.
Finally, the options to “tail” are slightly different.
Changes need to make GIStemp go:
Replace f77, g95 compiler lines with gfortran.
Remove “trace” directive in Makefile for one program.
In toANNsnom.f remove :q in file in error.
tail +100 input_files/t_hohenpeissenberg_200306.txt_as_received_July17_2003 > t_hohenpeissenberg
tail -n +100 input_files/t_hohenpeissenberg_200306.txt_as_received_July17_2003 > t_hohenpeissenberg
That’s all! Nearly nothing, really. After that, I did a “make” and then ran it. It ran fine.
So it looks like I have the old version of GIStemp running again.
Next up, port the current version. Then do a “compare and contrast” to see what’s changed in a 1/2 decade or so.
All in all, CentOS makes it fairly easy to run GIStemp.