Ugh, more Fortran stuff that probably belongs in the rage thread. I'm beginning to question what the point of language standards are if code has to be significantly altered to compile in a different compiler.
This 10K line Fortran program compiles and (presumably) works fine in Intel's ifort compiler. To get it to compile in PGI's compiler I had to hand code some language extensions that weren't present (namely an isnan function). After I got it to compile, it crashed because of scary stuff that Intel's compiler was okay with (assigning to unallocated arrays). I fixed that. Now I have to figure out why it gives wildly different output compared to ifort's resulting binary. Like, several orders of magnitudes in output differences.
To help with that, I figured I'd try compiling it with the GNU Fortran compiler and see what its output is. It staunchly refuses to compile the code at all, giving me lots of innocent looking warnings such as:
commonVar.f90:29.132:
Included at tcsolver.f90:3:
5,sigw=2.0,gammastar=1.0
1
Warning: Line truncated at (1)
I don't really see a problem there, but I'm guessing lines like that have something to do with it complaining about some unbalanced parentheses later, which are most certainly balanced. This is in a .f90 file so I don't think it's still expecting the column based format or anything odd...
I just really don't want to have to slog through hours of trying to figure out why gfortran won't compile this program just so I can check its output against ifort and pgfortran's binaries. It'll probably give me an entirely different answer too, and where do I go from there?
I actually have no idea where to begin diagnosing why ifort and pgfortran produce binaries with different behaviors. For giggles I tried running them through Valgrind's memcheck tool, which did indicate a few examples of branching depending on uninitialized values, but fixing those didn't make any difference. Turning optimizations off didn't make any difference, which is both good and bad I suppose. I guess I really have no choice but to try dumping values at various points and pray that the cause is limited to a small section of code. Then I have to pray that I know what said code does, since it's just masses of equations using variables named things like ii or fspxxyzwa.
At least I'm getting paid by the hour.