[gmx-developers] broadcast of zero-length arrays

Roland Schulz roland at utk.edu
Mon Nov 23 06:24:30 CET 2009

Hi Brian,

you could help before with a Segfault in the BlueGene MPI layer (in
scatterv). Do you consider the below described segfault a bug in the MPI
layer or in Gromacs?


---------- Forwarded message ----------
From: Mark Abraham <Mark.Abraham at anu.edu.au>
Date: Sun, Nov 22, 2009 at 10:11 PM
Subject: [gmx-developers] broadcast of zero-length arrays
To: Gromacs Developers <gmx-developers at gromacs.org>


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?


gmx-developers mailing list
gmx-developers at gromacs.org
Please don't post (un)subscribe requests to the list. Use the www interface
or send it to gmx-developers-request at gromacs.org.

ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20091123/5797bd81/attachment.html>

More information about the gromacs.org_gmx-developers mailing list