Dependency problems


bdsatish
12-31-2007, 02:59 AM
Hi all,

I'm Satish from India. I've enjoyed reading NR2 (Fortran 90) and liked it very much.

I've now got the NR3 book (hard-copy) too. But I'm facing a few prob:

[1] The #includes are missing from all the routines in the book.
[2] nr.h is not found in the book.

One of my friends told that there is a web-based "Dependency" tool that sorts out the list of #includes (needed by any given routine). But here in India, we don't have proper Internet connectivity at all ( I'm sorry to say this, but it is a fact. )

It would be good if the list of dependencies (read #includes) is put in a plain text file (or HTML) for download (which I can read offline)

By the way I'm writing this message from one of the local cyber cafes here. It is a pain to go to a cyber shop every now & then, jst to view one HTML page.

Bill Press
12-31-2007, 06:29 PM
Hello, Satish.

Your points on behalf of users in developing countries, or for that matter anywhere else without good Internet connectivity, are well taken.

The dependency data is located in two text files, which you can download once and then either print out or else keep on your computer. The file masterdependency.txt (http://www.nr.com/dependencies/masterdependency.txt) gives the dependencies of each code file (plus nr3.h, which is always assumed). The file masterinclude.h (http://www.nr.com/dependencies/masterinclude.h) lists *all* the code files in an order that guarantees that all of a file's dependencies occur higher on the list than itself.

So, to use some set of NR3 routines you use the first file to assemble a list of dependencies, and then you use the second file to get them into the right order. This is what the PHP program on the web page http://www.nr.com/dependencies does automatically.

As for the file nr3.h (there is no file nr.h for the 3rd edition), it is at http://www.nr.com/codefile.php?nr3 . Obviously you'll need to download it once.

Hope this helps.

Cheers,
Bill P.

bdsatish
01-03-2008, 02:08 AM
Thank you very much, Bill. Your effort and prompt reply is greatly appreciated !!