if (numColumns < numColumnsMin)
{
std::string mesg =
- gmx::formatString("The number of columns in %s (%s) should be at least %d."
+ gmx::formatString("The number of columns in %s should be at least %d."
"\n\n%s",
- filename.c_str(), correctFormatMessage.c_str());
+ filename.c_str(), numColumnsMin, correctFormatMessage.c_str());
GMX_THROW(InvalidInputError(mesg));
}
awhBiasParams->errorInitial = get_ereal(inp, opt, 10, wi);
if (awhBiasParams->errorInitial <= 0)
{
- gmx_fatal(FARGS, "%s (%d) needs to be > 0.", opt);
+ gmx_fatal(FARGS, "%s needs to be > 0.", opt);
}
if (bComment)
if ((period == 0) && (origin > end))
{
- gmx_fatal(FARGS, "For the non-periodic pull coordinates awh%d-dim%d-start cannot be larger than awh%f-dim%d-end",
+ gmx_fatal(FARGS, "For the non-periodic pull coordinates awh%d-dim%d-start (%f) cannot be larger than awh%d-dim%d-end (%f)",
k + 1, d + 1, origin, k + 1, d + 1, end);
}
}
if (*bOK && *file_version > enx_version)
{
- gmx_fatal(FARGS, "reading tpx file (%s) version %d with version %d program", gmx_fio_getname(ef->fio), file_version, enx_version);
+ gmx_fatal(FARGS, "reading tpx file (%s) version %d with version %d program", gmx_fio_getname(ef->fio), *file_version, enx_version);
}
if (!gmx_fio_do_double(ef->fio, fr->t))
{
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
{
gmx_fatal(FARGS, "Unknown residue %s when searching for residue type.\n"
"Maybe you need to add a custom residue in residuetypes.dat.",
- thisres, __FILE__, __LINE__);
+ thisres);
}
sprintf(dl[nl].name, "%s%d", thisres, ires+r0);
if (!lambda_vec_same(&start_lambda, native_lambda) )
{
gmx_fatal(FARGS, "Native lambda not constant in file %s: started at %f, and becomes %f at time %f",
- fn, native_lambda->val, start_lambda.val, start_time);
+ fn, native_lambda->val[0], start_lambda.val[0], start_time);
}
/* check the number of samples against the previous number */
if ( ((nblocks_raw+nblocks_hist) != nsamples) || (nlam != 1 ) )
gmx::ArrayRef<const std::string> graphFiles = opt2fns("-og", NFILE, fnm);
if (graphFiles.size() != 2)
{
- gmx_fatal(FARGS, "No or not correct number (2) of output-files: %zu", graphFiles.size());
+ gmx_fatal(FARGS, "No or not correct number (2) of output-files: %td", graphFiles.size());
}
writesurftoxpms(surf1, surf2, tblock, xslices, yslices, zslices, binw, binwz, graphFiles, zslices);
}
gmx::ArrayRef<const std::string> rawFiles = opt2fns("-or", NFILE, fnm);
if (rawFiles.size() != 2)
{
- gmx_fatal(FARGS, "No or not correct number (2) of output-files: %zu", rawFiles.size());
+ gmx_fatal(FARGS, "No or not correct number (2) of output-files: %td", rawFiles.size());
}
writeraw(surf1, surf2, tblock, xslices, yslices, rawFiles, oenv);
}
gmx::ArrayRef<const std::string> spectra = opt2fns("-Spect", NFILE, fnm);
if (spectra.size() != 2)
{
- gmx_fatal(FARGS, "No or not correct number (2) of output-file-series: %zu",
+ gmx_fatal(FARGS, "No or not correct number (2) of output-file-series: %td",
spectra.size());
}
powerspectavg_intf(surf1, surf2, tblock, xslices, yslices, spectra);
if (0 != system(dssp))
{
- gmx_fatal(FARGS, "Failed to execute command: %s\n",
+ gmx_fatal(FARGS, "Failed to execute command: %s\n"
"Try specifying your dssp version with the -ver option.", dssp);
}
if (blk->sub[0].nr != nor)
{
- gmx_fatal(FARGS, "Number of orientation restraints in energy file (%d) does not match with the topology (%d)", blk->sub[0].nr);
+ gmx_fatal(FARGS, "Number of orientation restraints in energy file (%d) does not match with the topology (%d)", blk->sub[0].nr, nor);
}
if (bORA || bODA)
{
if (bDeMux && static_cast<int>(inFiles.size()) != nset)
{
- gmx_fatal(FARGS, "You have specified %zu files and %d entries in the demux table", inFiles.size(), nset);
+ gmx_fatal(FARGS, "You have specified %td files and %d entries in the demux table", inFiles.size(), nset);
}
ftpin = fn2ftp(inFiles[0].c_str());
}
else if (bDeMux && static_cast<int>(outFiles.size()) != nset && outFiles.size() != 1)
{
- gmx_fatal(FARGS, "Number of output files should be 1 or %d (#input files), not %zu", nset, outFiles.size());
+ gmx_fatal(FARGS, "Number of output files should be 1 or %d (#input files), not %td", nset, outFiles.size());
}
if (bDeMux)
{
{
if (index[i][j] > natoms)
{
- gmx_fatal(FARGS, "An atom number in group %s is larger than the number of atoms in the trajectory");
+ gmx_fatal(FARGS, "An atom number in group %s is larger than the number of atoms in the trajectory", grpname[i]);
}
}
}
{
if (std::abs(y[0][i+1]-y[0][i]-opt->tabDz) > opt->tabDz/1e6)
{
- gmx_fatal(FARGS, "z-values in %d are not equally spaced.\n", ny, fn);
+ gmx_fatal(FARGS, "z-values in %s are not equally spaced.\n", fn);
}
}
snew(opt->tabY, nl);
{
gmx_fatal(FARGS, "Cannot find executable gunzip in /bin or /usr/bin.\n"
"You may want to define the path to gunzip "
- "with the environment variable GMX_PATH_GZIP.", gunzip);
+ "with the environment variable GMX_PATH_GZIP.");
}
}
else
}
if (header->pcrd[i].k <= 0.0)
{
- gmx_fatal(FARGS, "%s: Pull coordinate %d has force constant of of %g in %s.\n"
+ gmx_fatal(FARGS, "%s: Pull coordinate %d has force constant of of %g.\n"
"That doesn't seem to be an Umbrella tpr.\n",
fn, i+1, header->pcrd[i].k);
}
{
if (nc != 2 && nc != 5)
{
- gmx_fatal(FARGS, "Residue renaming database '%s' has %d columns instead of %d, %d or %d", fname, ncol, 2, 5);
+ gmx_fatal(FARGS, "Residue renaming database '%s' has %d columns instead of %d or %d", fname, ncol, 2, 5);
}
ncol = nc;
}
bVsiteAromatics = TRUE;
break;
default:
- gmx_fatal(FARGS, "DEATH HORROR in $s (%s): vsitestr[0]='%d'",
- __FILE__, __LINE__, vsitestr[0]);
+ gmx_fatal(FARGS, "Internal inconsistency: vsitestr[0]='%s'", vsitestr[0]);
} /* end switch */
/* Open the symbol table */
{
GMX_LOG(mdlog.info).asParagraph().appendTextFormatted(
"NOTE: Detection of GPUs failed. The API reported:\n"
- " %s\n",
+ " %s\n"
" GROMACS cannot run tasks on a GPU.",
errorMessage.c_str());
}
if (imdsock_getport(IMDsetup->socket, &IMDsetup->port))
{
- gmx_fatal(FARGS, "%s Could not determine port number.\n", IMDstr, ret);
+ gmx_fatal(FARGS, "%s Could not determine port number.\n", IMDstr);
}
fprintf(stderr, "%s Listening for IMD connection on port %d.\n", IMDstr, IMDsetup->port);
if ((enerhist->nsum > 0 && nener != enerhist->ener_sum.size()) ||
(enerhist->nsum_sim > 0 && nener != enerhist->ener_sum_sim.size()))
{
- gmx_fatal(FARGS, "Mismatch between number of energies in run input (%d) and checkpoint file (%zu or %zu).",
+ gmx_fatal(FARGS, "Mismatch between number of energies in run input (%u) and checkpoint file (%zu or %zu).",
nener, enerhist->ener_sum.size(), enerhist->ener_sum_sim.size());
}
const rvec *f)
{
real force2Tolerance = gmx::square(forceTolerance);
- std::uintmax_t numNonFinite = 0;
+ gmx::index numNonFinite = 0;
for (int i = 0; i < md->homenr; i++)
{
real force2 = norm2(f[i]);
* the printing on other ranks. But we can only avoid that with
* an expensive MPI barrier that we would need at each step.
*/
- gmx_fatal(FARGS, "At step %" PRId64 " detected non-finite forces on %ju atoms", step, numNonFinite);
+ gmx_fatal(FARGS, "At step %" PRId64 " detected non-finite forces on %td atoms", step, numNonFinite);
}
}
gmx_fatal(FARGS,
"The -dd or -npme option request a parallel simulation, "
#if !GMX_MPI
- "but %s was compiled without threads or MPI enabled"
+ "but %s was compiled without threads or MPI enabled", output_env_get_program_display_name(oenv));
#else
#if GMX_THREAD_MPI
- "but the number of MPI-threads (option -ntmpi) is not set or is 1"
+ "but the number of MPI-threads (option -ntmpi) is not set or is 1");
#else
- "but %s was not started through mpirun/mpiexec or only one rank was requested through mpirun/mpiexec"
+ "but %s was not started through mpirun/mpiexec or only one rank was requested through mpirun/mpiexec", output_env_get_program_display_name(oenv));
#endif
#endif
- , output_env_get_program_display_name(oenv)
- );
}
if (doRerun &&
}
if (min_gaussian <= 0)
{
- gmx_fatal(FARGS, "Cutoff value for Gaussian must be > 0. (You requested %f)");
+ gmx_fatal(FARGS, "Cutoff value for Gaussian must be > 0. (You requested %f)", min_gaussian);
}
/* Define the sigma value */
if (p == nullptr)
{
gmx_fatal(errno, __FILE__, __LINE__,
- "Not enough memory. Failed to realloc %" PRId64 " bytes for %s, %s=%x\n"
+ "Not enough memory. Failed to realloc %zu bytes for %s, %s=%p\n"
"(called from file %s, line %d)",
- static_cast<int64_t>(size), name, name, ptr, file, line);
+ size, name, name, ptr, file, line);
}
}
return p;