Re: can somebody verify this C program which calls dsaupd_ ? (longish)
- From: "H. S." <g_reate_xcalibur@xxxxxxxxx>
- Date: Sun, 03 Apr 2005 13:56:59 -0400
Apparently, _Madhusudan Singh_, on 03/04/05 03:10,typed:
First, FORTRAN refers to the language upto and including f77. This newsgroup discusses all aspects of Fortran, including FORTRAN.
More importantly, if your libraries compiled correctly, they were fine. The problem would then lie in the C code. And that is not (please do not use caps - use * * instead to emphasize) relevant to a Fortran newsgroup.
OK. I was under the impression that is how the name is actually written btw.
ARPACK library comes with a very well documented Makefile, which has been tested by hundreds (if not thousands) of people (including myself). Its illogical to assume that a untested / not adequately tested C wrapper is ok, but the Makefiles are not.
It could be true, but it certainly would not be the first thing to suspect.
I compiled two Fortran libs separately. One ARPACK and the other BLAS. Since there are some points to be taken care of (one that I am sure of is the "_" appended by some compilers to Fortran functions), I wasn't sure I had taken care of everything. Moreover, there have been instances where gcc has exhibited incorrect behavior when it's code is optimized(at least till a few years ago, IIRC). For all I know, similar things could be possible in g77. Are you willing to go over the makefiles of each of these libraries that I used and confirm I am on the right track?
If you used the Makefile included in the library (with the correct settings in ARmakes.inc - it would not even compile correctly if those settings were wrong), that is the wrong place to start looking for bugs.
See above.
Test what you wrote first (or whatever is the "weakest" in terms of testing). If that is sanity checked by some means, only then start casting the net wider. As a scientist, I am sure you can understand what logical elimination and sound experimental sequence means.
I am not sure if you read my original post carefuly. The C/C++ code is not what I wrote. I obtained it from the URL I mentioned. The code, when it was written, was running correctly. It's expected output is given in the comments at the top of one of the files (.c or .h). I only made a few minor changes, the changes were only in syntax to get it compiled with the new gcc compiler. (If you really want to find out the modifications, diff is your friend)
So, given this and the reasoning I gave at the top, either the gcc compiler is wrong or the g77 compiler is wrong or my syntax changes are wrong or the way I compiled Fortran libs is wrong.
Now, if you are saying that there is *no* way I could have made a mistake while compiling Fortran libs, then I am sure the problem is in the C code. Of course, this is with the assumption that both compilers do not have any bugs.
Further, as you partially realized when you made the post (assuming you tested your C code first), it would be better to first ask if someone was willing to test the code and only then send it to them off group. Posting a bunch of non-Fortran code and irritating people is not the most polite or even conducive way to get them to help you.
This is contradictory to you wrote in one of your earlier posts. So lets just not discuss this.
To better understand what I wrote, let me cast the choice in C :
If you were writing a piece of code using the GNU C library, and found unexpected behaviour, would you test your program first (and say consult someone on comp.lang.c) or start asking people if your glibc is compiled correctly ? The GNU C library is a widely used and extremely well-tested piece of code. Its the wrong thing to suspect first.
I am not questioning the g77 compiler itself mind it. See above.
Annnyy hoooowww .... originally I had assumed it wouldnt' be too hard for anyone who is familiar with programming
1. to copy the two files into a directory,
2. use the two commands I gave (with proper path to Fortran libs)
3. And type "dsaupd" on the command line
4. and report if it worked or not.
Hardly any work. Sigh!
->HS
--
Please remove the underscores ( the '_' symbols) from my email address to obtain the correct one. Apologies, but the fudging is to remove spam.
.
- Follow-Ups:
- Re: can somebody verify this C program which calls dsaupd_ ? (longish)
- From: Madhusudan Singh
- Re: can somebody verify this C program which calls dsaupd_ ? (longish)
- References:
- Re: can somebody verify this C program which calls dsaupd_ ? (longish)
- From: Madhusudan Singh
- Re: can somebody verify this C program which calls dsaupd_ ? (longish)
- Prev by Date: Re: A question on Newton's Method
- Next by Date: Re: A question on Newton's Method
- Previous by thread: Re: can somebody verify this C program which calls dsaupd_ ? (longish)
- Next by thread: Re: can somebody verify this C program which calls dsaupd_ ? (longish)
- Index(es):
Relevant Pages
|