- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I have a somewhat large source code (Steve is a bit familiar with this one!). We usually compile it with "double precision" from the compiler. But before release, I also check out Single precision.
I had a double precision parameter that was causing some problems in the single precision compile as an argument. So, I made it a "Real" and then ran my usual double precision compile and run.
Finally -- to the disturbing part. It appears that this change to a "real" parameter but compiled "double precision" causes a change in results.
Is this a compiler problem? Is it a known compiler problem?
Linda
Link kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
For instance if the visible interface declares that parameter as type A but the actual function header says Type B, there will be problems!
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I agree with grg99 that mismatched types are likely the problem. Try building with the /gen-interfaces and /warn:interfaces options (in VS these are on the External Procedures and Diagnostics pages) and see if the compiler finds anything to complain about.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Nope, no joy there (that is, no warnings, errors, strikes, etc).
Very hard to nail down. What is happening is that some errors/warnings are being detected in the code.... (comparisons) but I think the results are the same in both instances.
I also had another developer report to me he had found differences in using LOG (intrinsic) vs DLOG with our double precision compile (so the arguments to both functions would have been double precision).
Linda
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Is it possible that a few of the calculations require double precision? I.e., might you be looking for a small number calculated as the difference between two large ones somewhere? Do you have any natural ill-conditioners like large-scale equation solution or eigensolution?
Bruce
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
But I'm using all double precision in both compiles.
Am I not making clear the problem?
Linda
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Sorry - I didn't get it. I guess the bit about single-precision compilation was irrelevant. You compile withdouble precision default reals and you get a difference if you change a REAL(8) declaration to a REAL declaration. Right?
Bruce
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Yep, that's it.
The junk about single precision compiling was irrelevant.
Linda
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Linda, your problem interests me because I, too, have to maintain single- and double-precision versions of my software, due to the existence of a couple of dusty old Crays in Houston. Consequntly, I have to do the same type of thing that you're doing, and if there's a problem somewhere, I want to know where to look.
Apparently, you modified a single variable. Is there no way to work your way in to find the exact point at which the results changed?
Bruce

- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite