From 667da1b3d38b44edea1ec315bc93f3cde0b75b3e Mon Sep 17 00:00:00 2001 From: Giovanni Bussi <giovanni.bussi@gmail.com> Date: Tue, 20 Sep 2016 09:00:14 +0200 Subject: [PATCH] Fix for METAD multiple walkers When using METAD with file-based multiple walkers and many processes launched with mpirun (e.g. with gromacs -multi) replica suffix is not added to hills file. Contributed by Marco De La Pierre --- CHANGES/v2.3.txt | 1 + src/bias/MetaD.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES/v2.3.txt b/CHANGES/v2.3.txt index 6291296c0..62f299cd5 100644 --- a/CHANGES/v2.3.txt +++ b/CHANGES/v2.3.txt @@ -126,6 +126,7 @@ Fixes since 2.3b. Relevant things could be merged in the changelog above when we - \ref PUCKERING now supports 6 membered rings. - Tutorials have been (partially) updated to reflect some of the changes in the syntax - gromacs 5.1.x patch updated to 5.1.4 +- When using \ref METAD with file-based multple walkers and parallel jobs (i.e. mpirun) extra suffix is not added (thanks to Marco De La Pierre). - (for developers) A script is available to check if source code complies plumed standard. Notice that this script is run together with cppcheck on travis-ci. - (for developers) Cppcheck on travis-ci has been updated to 1.75. Several small issues triggering errors on 1.75 were fixed (e.g. structures passed by value are now passed by const ref) and false positives marked as such. diff --git a/src/bias/MetaD.cpp b/src/bias/MetaD.cpp index 57913f983..71ac9e01c 100644 --- a/src/bias/MetaD.cpp +++ b/src/bias/MetaD.cpp @@ -887,6 +887,7 @@ last_step_warn_grid(0) if(r>0) ifilesnames[mw_id_]="/dev/null"; hillsOfile_.enforceSuffix(""); } + if(mw_n_>1) hillsOfile_.enforceSuffix(""); hillsOfile_.open(ifilesnames[mw_id_]); if(fmt.length()>0) hillsOfile_.fmtField(fmt); hillsOfile_.addConstantField("multivariate"); -- GitLab