Different answers

I am trying to compile and execute the CALMET/CALPUFF modeling system on a linux box, but cannot seem to get the same results I do within windows. I have read some of the tips about precision, and tried most of them, to no avail. Here in a nutshell is what I’ve gotten:

  1. AMD 2600+ - Windows 2000 - compiled with Compaq Visual Fortran - gives a result of 78.320.

  2. Same machine as above - compiled with PGF 5.2-2 - gives a result of 78.320.

  3. Intel P3 550 mHz - RedHat 8.0 - compiled with PGF 5.2-2, pgf90 -tp p6 -pc 80 - gives a result of 77.822.

I have tried many different switch combinations, all to no avail. It just wants to give me 77.822. Any ideas?

Thanks…

This is most likely an issue between 80-bit x87 floating point representation and 64-bit SSE floating point representation. Optimizing compilers will try and keep values in registers so using the x87 will accumulate 80-bit values. With small values and/or many calculations, these extra bits add-up leading to different answers than the same calculation in 64-bits.

What happens when you use “-Kieee -pc 64” on the P3?

We actually have an FAQ about this issue at http://www.pgroup.com/support/execute.htm#precision

  • Mat

I came across this post because I am also having problems compiling CALMET on a linux box with a PG compiler. Specifically, I’m getting a lot of "multiple definition references.

I know the code must be altered for different compilers, so maybe I’m not making the right changes for PG.

Any ideas or guidance would be greatly appreciated!

Hello sreid,

Is this code freely available and if so, do you know where I can download it? I searched the web and could only find precompiled executables. A ftp site at the University of Edinburgh looked promising but I was unable to connect.

I’d like to help, but without the code or more information about the exact error, I’d only be guessing as to the cause.

Thanks,
Mat