Project

General

Profile

Bug #290

uninitialized number of atoms in gro leads to confusing error message in grompp

Added by Chris Neale almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Erik Lindahl
Category:
mdrun
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

Hello,

If one runs grompp with a .top that specifies a number of atoms that is different than the number of atoms in the specified .gro file, a sensible error message is generated.

Program grompp, VERSION 4.0.3
Source code file: grompp.c, line: 362
Fatal error:
number of coordinates in coordinate file (one.gro, 3)
does not match topology (topol.top, 648)

However, if the specified .gro file is entirely empty as in "touch empty.gro"
then the error message indicates a non-sensical number of atoms in the empty.gro file in both gmx 3 and 4:

Program grompp, VERSION 4.0.3
Source code file: grompp.c, line: 362
Fatal error:
number of coordinates in coordinate file (empty.gro, 1865)
does not match topology (topol.top, 648)

Program grompp, VERSION 3.3.1
Source code file: grompp.c, line: 448
Fatal error:
number of coordinates in coordinate file (empty.gro, 7900)
does not match topology (topol.top, 648)

I ran into this when one of my scripts copied a .gro to a new name and the NFS delay resulted in this file being completely empty when grompp was run.

I guess it's the kernel/grompp.c call to get_stx_coordnum() from gmxlib/confio.c that somehow doesn't properly initialize some variable, but I didn't track it any farther than that.

You can regenerate this problem by taking any system that works for you, "touch empty.gro" and run grompp using empty.gro instead of your regular .gro file.

Chris.

History

#1 Updated by Berk Hess almost 11 years ago

I have added a check for 4.0.4.

Berk

#2 Updated by Berk Hess almost 11 years ago

Pressed the wrong button, this bug was fixed.

Berk

Also available in: Atom PDF