diff --git a/CHANGES/v2.4.md b/CHANGES/v2.4.md index f787d96445862e1525181f4db38002e9235f72ca..3ed71de25af5f15b8b0e6b925185370b13e9ff60 100644 --- a/CHANGES/v2.4.md +++ b/CHANGES/v2.4.md @@ -186,6 +186,8 @@ For users: are expected to work correctly. See \issue{254}. - GROMACS patch for gromacs-2018.1. - \ref VimSyntax now highlights `__FILL__` strings. + - \ref METAD and \ref PBMETAD give a warning when one restarts a simulation and the old hills file is not found. See \issue{366}. For developers: + - `LDSHARED` is now correctly taken into account when launching `./configure`. - Cppcheck upgraded to 1.84. diff --git a/configure b/configure index 74e7c4aacbb17a72fe24bd1087dffe8ce3351938..e452391b59ffe0d9b9fee45bd585fdd14c165cde 100755 --- a/configure +++ b/configure @@ -4371,7 +4371,11 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # log the initial flags LD="$CXX" -LDSHARED="$CXX" + +if test -z "$LDSHARED" ; then + LDSHARED="$CXX" +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: Initial CXX: $CXX" >&5 $as_echo "$as_me: Initial CXX: $CXX" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Initial CXXFLAGS: $CXXFLAGS" >&5 diff --git a/configure.ac b/configure.ac index 3851937aedaec929a39714c95073642d0f50854e..8fbb041bb8833a47aebd700b4ee3318f9617baf9 100644 --- a/configure.ac +++ b/configure.ac @@ -310,7 +310,11 @@ AC_LANG(C++) # log the initial flags LD="$CXX" -LDSHARED="$CXX" + +if test -z "$LDSHARED" ; then + LDSHARED="$CXX" +fi + AC_MSG_NOTICE([Initial CXX: $CXX]) AC_MSG_NOTICE([Initial CXXFLAGS: $CXXFLAGS]) AC_MSG_NOTICE([Initial CPPFLAGS: $CPPFLAGS]) diff --git a/src/bias/MetaD.cpp b/src/bias/MetaD.cpp index 95f843fdb4dde582803abd7e6c2c519fdfcd8db8..a27c38859e17c6b438fe4fb480fc0132fa13acaf 100644 --- a/src/bias/MetaD.cpp +++ b/src/bias/MetaD.cpp @@ -1070,6 +1070,9 @@ MetaD::MetaD(const ActionOptions& ao): ifiles[i]->reset(false); // close only the walker own hills file for later writing if(i==mw_id_) ifiles[i]->close(); + } else { + // in case a file does not exist and we are restarting, complain that the file was not found + if(getRestart()) log<<" WARNING: restart file "<<fname<<" not found\n"; } } diff --git a/src/bias/PBMetaD.cpp b/src/bias/PBMetaD.cpp index 6761be58a255995a827a2f1fc41aee10fe9a8581..bade31c3bf771c2eb1b89ced2a1a1ace0d2bf47e 100644 --- a/src/bias/PBMetaD.cpp +++ b/src/bias/PBMetaD.cpp @@ -701,6 +701,9 @@ PBMetaD::PBMetaD(const ActionOptions& ao): ifiles[k]->reset(false); // close only the walker own hills file for later writing if(j==mw_id_) ifiles[k]->close(); + } else { + // in case a file does not exist and we are restarting, complain that the file was not found + if(getRestart()) log<<" WARNING: restart file "<<fname<<" not found\n"; } } }