diff --git a/.gitignore b/.gitignore index 319d66928..9f36e853c 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ src/exp src/user/CylindricalDisk.cc src/user/EllipsoidForce.cc src/user/SLSphere.cc +_codeql_detected_source_root diff --git a/src/OutHDF5.cc b/src/OutHDF5.cc index 3d3e9a74a..7259adcaa 100644 --- a/src/OutHDF5.cc +++ b/src/OutHDF5.cc @@ -193,13 +193,15 @@ void OutHDF5::initialize() else { std::ostringstream fname; - if (chkpt) + if (chkpt) { fname << outdir - << "checkpoint_" << runtag << ".1"; - else + << "checkpoint_" << runtag; + if (numprocs>1) fname << ".1"; + } else { fname << outdir << filename << "_" << setw(5) << setfill('0') << nbeg << ".1"; + } std::filesystem::path file_path = fname.str();