[gmx-developers] minor bug in gmx_wallcycle.c
Mark Abraham
Mark.Abraham at anu.edu.au
Fri Aug 21 05:52:17 CEST 2009
Hi,
I found that under at least some circumstances on BlueGene/L, the
declaration of print_cycles in 4.0.5 as:
static void print_cycles(FILE *fplog, double c2t, char *name, int nnodes,
int n, gmx_cycles_t c, gmx_cycles_t tot)
causes mdrun to crash after a floating-point exception in a library
routine called __f64tou64rz that is called before entering print_cycles.
Presumably that function is doing a float-to-unsigned conversion.
All calls to print_cycles pass either gmx_cycles_t or double variables
as the last two arguments (and the latter are recently converted from
gmx_cycles_t types). Both parameters are then cast to floating-point
types for almost all uses inside print_cycles. The exception does not
arise if the declaration of the type of these last two parameters is
changed to double, rather than gmx_cycles_t. I don't know what the
underlying cause is, but this fix seems wildly unlikely to cause other
problems.
This part of the code is the same in the master branch, so presumably
the same fix will work everywhere.
I noticed that node_time is measured in processor cycles with clock(),
and real_time is measured in seconds with time(). Why is this different?
Mark
More information about the gromacs.org_gmx-developers
mailing list