[gmx-users] compiling with the PGI compiler

Teemu Murtola teemu.murtola at cbr.su.se
Thu Dec 1 16:49:22 CET 2011


On Thu, Dec 1, 2011 at 16:46, Szilárd Páll <szilard.pall at cbr.su.se> wrote:
>> With the pgi compiler, I am most concerned about this floating point
>> overflow warning:
>>
>> ...
>> [ 19%] Building C object src/gmxlib/CMakeFiles/gmx.dir/trajana/trajana.c.o
>> [ 19%] Building C object
>> src/gmxlib/CMakeFiles/gmx.dir/trajana/centerofmass.c.o
>> [ 19%] Building C object src/gmxlib/CMakeFiles/gmx.dir/trajana/nbsearch.c.o
>> PGC-W-0129-Floating point overflow. Check constants and constant expressions
>> (/home/nealechr/exe/pgi/gromacs-4.5.4/source/src/gmxlib/trajana/nbsearch.c:
>> 166)
>
> That looks like a bug, in case of real==float HUGE_VALF should be used
> instead of HUGE_VAL.

I'll fix that; I think the best solution is to use GMX_REAL_MAX, as
HUGE_VALF isn't in C89, and might fail to compile, e.g., on Windows...
I think that on most implementations, HUGE_VAL equals infinity, and
thus works even in this context, but apparently not on all.

And as Szilard said, this doesn't affect mdrun, only g_select at the
moment. Depending a bit on what the compiler does, it might even work
correctly despite the warning.

Teemu



More information about the gromacs.org_gmx-users mailing list