Project

General

Profile

Bug #2206

IMD interface malfunctions in 2016.3

Added by Charlie Laughton over 2 years ago. Updated almost 2 years ago.

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

Description

I have been using the IMD facility in Gromacs 5.1.4 for some time without problems, but I have now updated to Gromacs 2016.3 and there are errors (I can’t connect to mdrun from e.g. VMD).

I'm thinking it is due to endianness issues in the socket-related code, for the following reasons:

Here are snippets of a job run with 5.1.4:

% gmx mdrun –deffnm test –imdwait imdport 0

                   :-) GROMACS - gmx mdrun, VERSION 5.1.4 (-:

                            GROMACS is written by:
     Emile Apol      Rossen Apostolov  Herman J.C. Berendsen    Par Bjelkmar
Aldert van Buuren   Rudi van Drunen     Anton Feenstra   Sebastian Fritsch
  Gerrit Groenhof   Christoph Junghans   Anca Hamuraru    Vincent Hindriksen
Dimitrios Karkoulis    Peter Kasson        Jiri Kraus      Carsten Kutzner
    Per Larsson      Justin A. Lemkul   Magnus Lundborg   Pieter Meulenhoff
   Erik Marklund      Teemu Murtola       Szilard Pall       Sander Pronk
   Roland Schulz     Alexey Shvetsov     Michael Shirts     Alfons Sijbers
   Peter Tieleman    Teemu Virolainen  Christian Wennberg    Maarten Wolf
                           and the project leaders:
        Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel

Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2015, The GROMACS development team at
Uppsala University, Stockholm University and
the Royal Institute of Technology, Sweden.
check out http://www.gromacs.org<http://www.gromacs.org/> for more information.

GROMACS is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.

GROMACS:      gmx mdrun, VERSION 5.1.4
Executable:   /usr/remote/gromacs/5.1.4/bin/gmx
Data prefix:  /usr/remote/gromacs/5.1.4
Command line:
  gmx mdrun -deffnm test -imdwait -imdport 0

(…etc..)
IMD: Enabled. This simulation will accept incoming IMD connections.
IMD: You chose a port number < 1. Will automatically assign a free port.
IMD: You chose a port number < 1. Will automatically assign a free port.

Back Off! I just backed up test.xvg to ./#test.xvg.7#
IMD: Pausing simulation while no IMD connection present (-imdwait).
IMD: Turning on IMD - port for incoming requests is 0.
IMD: Setting up incoming socket.
IMD: Listening for IMD connection on port 13134.
IMD: Will wait until I have a connection and IMD_GO orders.

In another window I then check the port:

% netstat -lntp | grep gmx
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:13134           0.0.0.0:*               LISTEN      308137/gmx


All looks healthy – gmx is listening on port 13134.

Now the same with 2016.3:


                      :-) GROMACS - gmx mdrun, 2016.3 (-:

                            GROMACS is written by:
     Emile Apol      Rossen Apostolov  Herman J.C. Berendsen    Par Bjelkmar
Aldert van Buuren   Rudi van Drunen     Anton Feenstra    Gerrit Groenhof
Christoph Junghans   Anca Hamuraru    Vincent Hindriksen Dimitrios Karkoulis
    Peter Kasson        Jiri Kraus      Carsten Kutzner      Per Larsson
  Justin A. Lemkul   Magnus Lundborg   Pieter Meulenhoff    Erik Marklund
   Teemu Murtola       Szilard Pall       Sander Pronk      Roland Schulz
  Alexey Shvetsov     Michael Shirts     Alfons Sijbers     Peter Tieleman
  Teemu Virolainen  Christian Wennberg    Maarten Wolf
                           and the project leaders:
        Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel

Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2017, The GROMACS development team at
Uppsala University, Stockholm University and
the Royal Institute of Technology, Sweden.
check out http://www.gromacs.org<http://www.gromacs.org/> for more information.

GROMACS is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.

GROMACS:      gmx mdrun, version 2016.3
Executable:   /usr/remote/gromacs/2016.3/bin/gmx
Data prefix:  /usr/remote/gromacs/2016.3
Working dir:  /users/charlie/tios/examples
Command line:
  gmx mdrun -deffnm test -imdwait -imdport 0

(..etc..)
IMD: Enabled. This simulation will accept incoming IMD connections.
IMD: You chose a port number < 1. Will automatically assign a free port.
IMD: You chose a port number < 1. Will automatically assign a free port.

Back Off! I just backed up test.xvg to ./#test.xvg.8#
IMD: Pausing simulation while no IMD connection present (-imdwait).
IMD: Turning on IMD - port for incoming requests is 0.
IMD: Setting up incoming socket.
IMD: Listening for IMD connection on port 52434.
IMD: Will wait until I have a connection and IMD_GO orders.


But in the other window:

% netstat -lntp | grep gmx
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:53964           0.0.0.0:*               LISTEN      308199/gmx


i.e. gmx is actually listening on port 53964. Not 52434.

Interestingly:

% python -c 'import socket; print socket.htons(53964)'
52434

It makes me wonder if some endianness issues have got into the code somehow?

Associated revisions

Revision 4fbe1650 (diff)
Added by Carsten Kutzner over 2 years ago

Fixed #2206 IMD interface malfunctions

Change-Id: Ia58586a281591cefea8a382a40e92e3e30b56b75

History

#1 Updated by Berk Hess over 2 years ago

  • Status changed from New to Accepted
  • Assignee set to Carsten Kutzner

#2 Updated by Carsten Kutzner over 2 years ago

I think the issue was introduced in
commit f70784b53df80a2c0cbe816e05e26e82d86c849a
"Converted imd module to C++."

When using htons, ntohl instead of gmx_htons, gmx_ntohl the connection between VMD and GROMACS works as expected.

#3 Updated by Gerrit Code Review Bot over 2 years ago

Gerrit received a related patchset '1' for Issue #2206.
Uploader: Carsten Kutzner ()
Change-Id: gromacs~release-2016~Ia58586a281591cefea8a382a40e92e3e30b56b75
Gerrit URL: https://gerrit.gromacs.org/6728

#4 Updated by Berk Hess over 2 years ago

  • Status changed from Accepted to Fix uploaded

#5 Updated by Erik Lindahl almost 2 years ago

  • Status changed from Fix uploaded to Resolved

#6 Updated by Erik Lindahl almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF