From 639e59646d3263ce2abd8cf0ae3ce115614b4bd3 Mon Sep 17 00:00:00 2001 From: Carsten Kutzner Date: Tue, 22 Nov 2011 15:14:48 +0100 Subject: [PATCH] Actually -cpi and -bcpo must not be identical Change-Id: Iac44c2dc7d7add1f951ff6018bbfaabe8160af25 --- src/tools/gmx_tune_pme.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/tools/gmx_tune_pme.c b/src/tools/gmx_tune_pme.c index 318738757d..5e00f8351d 100644 --- a/src/tools/gmx_tune_pme.c +++ b/src/tools/gmx_tune_pme.c @@ -1578,10 +1578,11 @@ static void check_input( if (!gmx_fexist(opt2fn("-s",nfile,fnm))) gmx_fatal(FARGS, "File %s not found.", opt2fn("-s",nfile,fnm)); - /* Make sure that the checkpoint file is not overwritten by the benchmark runs */ - if ( (0 == strcmp(opt2fn("-cpi",nfile,fnm), opt2fn("-cpo",nfile,fnm)) ) && (sim_part > 1) ) - gmx_fatal(FARGS, "Checkpoint input and output file must not be identical,\nbecause then the input file might change during the benchmarks."); - + /* Make sure that the checkpoint file is not overwritten during benchmarking */ + if ( (0 == strcmp(opt2fn("-cpi",nfile,fnm), opt2fn("-bcpo",nfile,fnm)) ) && (sim_part > 1) ) + gmx_fatal(FARGS, "Checkpoint input (-cpi) and benchmark checkpoint output (-bcpo) files must not be identical.\n" + "The checkpoint input file must not be overwritten during the benchmarks.\n"); + /* Make sure that repeats is >= 0 (if == 0, only write tpr files) */ if (repeats < 0) gmx_fatal(FARGS, "Number of repeats < 0!"); -- 2.22.0