}
}
- if (ir->nstfout && DOMAINDECOMP(cr))
+ if (ir->nstfout && haveDDAtomOrdering(*cr))
{
snew(of->f_global, top_global.natoms);
}
char buf[1024], suffix[5 + STEPSTRSIZE], sbuf[STEPSTRSIZE];
t_fileio* ret;
- if (DOMAINDECOMP(cr))
+ if (haveDDAtomOrdering(*cr))
{
npmenodes = cr->npmenodes;
}
swaphistory_t* swaphist = observablesHistory->swapHistory.get();
SwapType eSwapCoords = (swaphist ? swaphist->eSwapCoords : SwapType::No);
- CheckpointHeaderContents headerContents = { 0,
+ CheckpointHeaderContents headerContents = { CheckPointVersion::UnknownVersion0,
{ 0 },
{ 0 },
{ 0 },
std::strcpy(headerContents.version, gmx_version());
std::strcpy(headerContents.fprog, gmx::getProgramContext().fullBinaryPath());
std::strcpy(headerContents.ftime, timebuf.c_str());
- if (DOMAINDECOMP(cr))
+ if (haveDDAtomOrdering(*cr))
{
copy_ivec(domdecCells, headerContents.dd_nc);
}
/* Rename the checkpoint file from the temporary to the final name */
mpiBarrierBeforeRename(applyMpiBarrierBeforeRename, mpiBarrierCommunicator);
- if (gmx_file_rename(fntemp, fn) != 0)
+ try
{
- gmx_file("Cannot rename checkpoint file; maybe you are out of disk space?");
+ gmx_file_rename(fntemp, fn);
+ }
+ catch (gmx::FileIOError const&)
+ {
+ // In this case we can be more helpful than the generic message from gmx_file_rename
+ GMX_THROW(gmx::FileIOError(
+ "Cannot rename checkpoint file; maybe you are out of disk space?"));
}
}
#endif /* GMX_NO_RENAME */
of->bKeepAndNumCPT,
fplog,
cr,
- DOMAINDECOMP(cr) ? cr->dd->numCells : one_ivec,
- DOMAINDECOMP(cr) ? cr->dd->nnodes : cr->nnodes,
+ haveDDAtomOrdering(*cr) ? cr->dd->numCells : one_ivec,
+ haveDDAtomOrdering(*cr) ? cr->dd->nnodes : cr->nnodes,
of->eIntegrator,
of->simulation_part,
of->bExpanded,
{
const rvec* f_global;
- if (DOMAINDECOMP(cr))
+ if (haveDDAtomOrdering(*cr))
{
if (mdof_flags & MDOF_CPT)
{