[gmx-developers] broadcast of zero-length arrays
Mark Abraham
Mark.Abraham at anu.edu.au
Mon Nov 23 04:11:32 CET 2009
Hi,
During src/gmxlib/mvdata.c bc_grpopts(), my BlueGene/L segfaults during
the broadcasts of the QMMM stuff. The lines that break are attempts to
broadcast arrays of zero length. Adding a check for non-zero length into
the definition of nblock_bc fixes the problem. Presumably a null pointer
is being dereferenced inside the MPI library.
I'm not sure whether this observation is indicative of (this version of)
IBM's MPI library not having implemented the full standard, the standard
not specifying behaviour in this case, or GROMACS not being sufficiently
defensive. I haven't found anything useful in the MPI documentation I
have to hand. You could argue cases either way - the implementors of the
library want to avoid such checks to speed performance, and the users of
the library expect it either to take care of such housekeeping for them,
or not dereference pointers unnecessarily (think buffering)...
Does anyone know what expected behaviour is here?
Cheers,
Mark
More information about the gromacs.org_gmx-developers
mailing list