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

Mark Abraham Mark.Abraham at anu.edu.au
Thu Nov 19 21:46:07 CET 2009


Åke Sandgren wrote:
> On Fri, 2009-11-20 at 07:14 +1100, Mark Abraham wrote:
>> Å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.
> 
> Well in 4.0.5 there are a couple of situations it could still be NULL in
> do_atomtypes.
> 1) file_version <= 25

That's an ancient .tpr version.

> 2) file_version > 25 && !bRead

Stuff in tpxio isn't called from mdrun with bRead == FALSE - that's 
grompp's job.

Mark




More information about the gromacs.org_gmx-developers mailing list