From: Mark Abraham Date: Tue, 7 Feb 2017 13:27:05 +0000 (+0100) Subject: Merge branch release-2016 X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=f8ea0d9b568d94d1b6984478227ac15f738e7252;p=alexxy%2Fgromacs.git Merge branch release-2016 Minor clashes mostly from nullptr and logger introduction in master branch. Resolved all in favour of release-2016 logic implemented with in master-branch functionality. Change-Id: Ic30ce3b3aadaab6e74f6d9606ca00fb275a6ccb3 --- f8ea0d9b568d94d1b6984478227ac15f738e7252 diff --cc src/gromacs/gmxana/gmx_rmsf.cpp index 9c3989a279,8b5118003e..6c78ce2165 --- a/src/gromacs/gmxana/gmx_rmsf.cpp +++ b/src/gromacs/gmxana/gmx_rmsf.cpp @@@ -321,10 -316,12 +321,12 @@@ int gmx_rmsf(int argc, char *argv[] t_topology *top_pdb; snew(top_pdb, 1); /* Read coordinates twice */ - read_tps_conf(opt2fn("-q", NFILE, fnm), top_pdb, NULL, NULL, NULL, pdbbox, FALSE); + read_tps_conf(opt2fn("-q", NFILE, fnm), top_pdb, nullptr, nullptr, nullptr, pdbbox, FALSE); snew(pdbatoms, 1); *pdbatoms = top_pdb->atoms; - read_tps_conf(opt2fn("-q", NFILE, fnm), top_pdb, NULL, &pdbx, NULL, pdbbox, FALSE); + read_tps_conf(opt2fn("-q", NFILE, fnm), top_pdb, nullptr, &pdbx, nullptr, pdbbox, FALSE); + /* TODO Should this assert that top_pdb->atoms.nr == top.atoms.nr? + * See discussion at https://gerrit.gromacs.org/#/c/6430/1 */ title = *top_pdb->name; snew(refatoms, 1); *refatoms = top_pdb->atoms; @@@ -554,10 -550,10 +556,10 @@@ /* Write a .pdb file with B-factors and optionally anisou records */ for (i = 0; i < isize; i++) { - rvec_inc(xref[index[i]], xcm); + rvec_inc(pdbx[index[i]], xcm); } write_sto_conf_indexed(opt2fn("-oq", NFILE, fnm), title, pdbatoms, pdbx, - NULL, ePBC, pdbbox, isize, index); + nullptr, ePBC, pdbbox, isize, index); } if (opt2bSet("-ox", NFILE, fnm)) { @@@ -570,8 -567,9 +573,9 @@@ } } /* Write a .pdb file with B-factors and optionally anisou records */ - write_sto_conf_indexed(opt2fn("-ox", NFILE, fnm), title, pdbatoms, xref, nullptr, - write_sto_conf_indexed(opt2fn("-ox", NFILE, fnm), title, pdbatoms, bFactorX, NULL, ++ write_sto_conf_indexed(opt2fn("-ox", NFILE, fnm), title, pdbatoms, bFactorX, nullptr, ePBC, pdbbox, isize, index); + sfree(bFactorX); } if (bAniso) { diff --cc src/gromacs/gmxpreprocess/grompp.cpp index 250a159717,be33e421c5..3f0ca7d84d --- a/src/gromacs/gmxpreprocess/grompp.cpp +++ b/src/gromacs/gmxpreprocess/grompp.cpp @@@ -74,9 -73,9 +74,10 @@@ #include "gromacs/math/vec.h" #include "gromacs/mdlib/calc_verletbuf.h" #include "gromacs/mdlib/compute_io.h" + #include "gromacs/mdlib/constr.h" #include "gromacs/mdlib/genborn.h" #include "gromacs/mdlib/perf_est.h" +#include "gromacs/mdrunutility/mdmodules.h" #include "gromacs/mdtypes/inputrec.h" #include "gromacs/mdtypes/md_enums.h" #include "gromacs/mdtypes/nblist.h" diff --cc src/gromacs/mdlib/md_support.h index f2f904b2bd,b2b8b25b8c..0ad1879c35 --- a/src/gromacs/mdlib/md_support.h +++ b/src/gromacs/mdlib/md_support.h @@@ -102,8 -110,12 +102,8 @@@ bool multisim_int_all_are_equal(const g gmx_int64_t value); void rerun_parallel_comm(t_commrec *cr, t_trxframe *fr, - gmx_bool *bNotLastFrame); + gmx_bool *bLastStep); -/* get the conserved energy associated with the ensemble type*/ -real compute_conserved_from_auxiliary(t_inputrec *ir, t_state *state, - t_extmass *MassQ); - /* set the lambda values at each step of mdrun when they change */ void set_current_lambdas(gmx_int64_t step, t_lambda *fepvals, gmx_bool bRerunMD, t_trxframe *rerun_fr, t_state *state_global, t_state *state, double lam0[]); diff --cc src/gromacs/mdlib/sim_util.cpp index 555678cd89,11a2f4faca..d58b58a894 --- a/src/gromacs/mdlib/sim_util.cpp +++ b/src/gromacs/mdlib/sim_util.cpp @@@ -106,6 -103,6 +106,7 @@@ #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/gmxassert.h" #include "gromacs/utility/gmxmpi.h" ++#include "gromacs/utility/logger.h" #include "gromacs/utility/pleasecite.h" #include "gromacs/utility/smalloc.h" #include "gromacs/utility/sysinfo.h" @@@ -2481,6 -2575,13 +2482,12 @@@ void finish_run(FILE *fplog, const gmx: elapsed_time_over_all_threads, elapsed_time_over_all_threads_over_all_ranks; + if (!walltime_accounting_get_valid_finish(walltime_accounting)) + { - md_print_warn(cr, fplog, - "Simulation ended prematurely, no performance report will be written."); ++ GMX_LOG(mdlog.warning).asParagraph().appendText("Simulation ended prematurely, no performance report will be written."); + return; + } + if (cr->nnodes > 1) { snew(nrnb_tot, 1);