int/Integer argument type mismatch inside peigs is causing segmentation fault


Click here for full thread
Forum Vet
Quote:Bvoigt Jan 20th 3:29 pm
I can put in some porting effort. You say that "Global Arrays" (under src/tools/ga*, correct) are the main source of incompatibility? It just happens that I already built that area with debug information (-g) as part of tracking down this bug.


Yes, that's the part I am calling Global Arrays. More details at
http://hpc.pnl.gov/globalarrays/

Quote:Bvoigt Jan 20th 3:29 pm

Still, the bug I reported here may exhibit itself on your supported platforms as well -- the code is invalid according to the C standard and newer compiler versions are getting more and more aggressive about these things.

LP64 platforms such as Linux64 may have bogus values passed in these function calls, because sizeof (Integer) > sizeof (int), and the optimizer may choose not to zero out the padding bytes.

I mentioned CYGWIN64 only as proof that this bug has consequences on real systems, not just a theoretical correctness issue.


I am not sure I am following you. On LP64 we use the Integer = long trick for the Fortran to C interface since we do use 64-bit integers in Fortran on LP64 (by using the -i8 compiler options). I do not see any int appearing in this sequence