compiling NR on Fedora (using f95)


Thurmond
09-08-2005, 01:52 PM
I have been unable to successfully run the makefiles provided with a recent purchase of NR. The problem appears to be the system (and perhaps the fortran version) we are using. We were able to install everything properly on a system running Red Hat (as a test, we can't use NR if it is there). We have tried to follow the instructions scrupulously.
Are there modifications that I need to make, or is another makefile available?
We only need a couple of the routines, of course. I've been trying to compile the utilities and such individually and bootstrap up to the things I need, but I have run into snags. Should I continue to try this?

Thanks for advice...

Jim

Saul Teukolsky
09-08-2005, 08:04 PM
Hi Jim,

It appears that gfortran (aliased to f95 in recent releases) is not yet really usable. It fails on a number of relatively simple things that are correct syntax.

Early versions of commercial f90 compilers also used to choke on some NR code, but are now OK, so hopefully these things will eventually get fixed.

Saul Teukolsky

Thurmond
09-09-2005, 04:06 PM
Thanks for your reply, Saul.

We have installed g95 on the system and are still experiencing problems during the make. Do we need to go to f90 for things to work?

Jim

Saul Teukolsky
09-09-2005, 07:23 PM
Hi Jim,

For any compiler, try some simple things by hand. Start with
f90 -c nrtype.f90
f90 -c nr.f90
f90 -c nrutil.f90
(in this order).

Then try something simple like
f90 xavevar.f90 avevar.f90 nrtype.o nr.o nrutil.o

Here f90 is whatever command you are using to invoke your compiler. If you get error messages for this, it's got nothing to do with the make file. Your compiler is not up to scratch.

Saul Teukolsky

Thurmond
09-10-2005, 06:50 PM
Yep, f95 seems to be the problem. It chokes on the nrutil.f90 compilation.

We installed g95 and the individual files you suggested compile properly. This will get us what we need - thanks.

Although I do wonder why even g95 won't let us use the makefile...

Jim