[gmx-developers] segfault in mdlib/qmmm.c

Mark Abraham Mark.Abraham at anu.edu.au
Thu Nov 19 21:14:15 CET 2009

Åke Sandgren wrote:
> On Thu, 2009-11-19 at 20:55 +0100, Åke Sandgren wrote:
>> Hi!
>> I have an input set that makes gromacs segfault in qmmm.c when compiled
>> for mpi.
>> The segfault is in init_QMrec on the
>> qm->nelectrons       += mtop->atomtypes.atomnumber[atom->type];
>> atomnumber is NULL.
>> Where is the bug? On that line or somewhere else?
>> I.e. is it a bug that it is NULL or that it isn't protected against that
>> possibility?

It seems from the usage of do_atomtypes in src/gmxlib/tpxio.c that it 
should never be NULL.

> Maybe the
>   /* communication for mtop->atomtypes is missing here */
> line in gmxlib/mvdata.c in bcast_ir_mtop is a hint...

Indeed, sounds a likely suspect.


More information about the gromacs.org_gmx-developers mailing list