From d221cf330fa443aa0d6749725bdf3b45b256a519 Mon Sep 17 00:00:00 2001 From: Carsten Kutzner Date: Tue, 14 Oct 2014 10:56:14 +0200 Subject: [PATCH] Fix order of ED/swap blocks during checkpoint reading. For some reason the order of reading the swap state and the essential dynamics (ED) state were mixed up in read_checkpoint(), which lead to unreadable state files if both ED and swap functionality were used. This fix changes the order of those blocks to be consistent with write_checkpoint(). Change-Id: Ie234486b990861decef9e00fc5125f867001f814 --- src/gromacs/gmxlib/checkpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gromacs/gmxlib/checkpoint.c b/src/gromacs/gmxlib/checkpoint.c index 18c0a312a6..5f93ff28e5 100644 --- a/src/gromacs/gmxlib/checkpoint.c +++ b/src/gromacs/gmxlib/checkpoint.c @@ -2102,13 +2102,13 @@ static void read_checkpoint(const char *fn, FILE **pfplog, cp_error(); } - ret = do_cpt_swapstate(gmx_fio_getxdr(fp), TRUE, &state->swapstate, NULL); + ret = do_cpt_EDstate(gmx_fio_getxdr(fp), TRUE, &state->edsamstate, NULL); if (ret) { cp_error(); } - ret = do_cpt_EDstate(gmx_fio_getxdr(fp), TRUE, &state->edsamstate, NULL); + ret = do_cpt_swapstate(gmx_fio_getxdr(fp), TRUE, &state->swapstate, NULL); if (ret) { cp_error(); -- 2.11.4.GIT