- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
For instance if the visible interface declares that parameter as type A but the actual function header says Type B, there will be problems!
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
But I'm using all double precision in both compiles.
Am I not making clear the problem?
Linda
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Yep, that's it.
The junk about single precision compiling was irrelevant.
Linda
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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
