Commit f50d742e authored by Dave Moxey's avatar Dave Moxey Committed by Spencer Sherwin

Address Douglas' and Spencer's comments

parent 12c0a0fd
......@@ -1146,17 +1146,10 @@ namespace Nektar
int nprocs = m_comm->GetSize();
int rank = m_comm->GetRank();
// Directory name if in parallel, regular filename if in serial
// Path to output: will be directory if parallel, normal file if
// serial.
fs::path specPath (outname);
// Pad rank to 8char filenames, e.g. P0000000.fld
boost::format pad("P%1$07d.fld");
pad % m_comm->GetRank();
// Generate full path name
fs::path poutfile(pad.str());
fs::path fulloutname = specPath / poutfile;
if (nprocs == 1)
{
fulloutname = specPath;
......@@ -1235,7 +1228,7 @@ namespace Nektar
// Create the destination directory
try
{
if ((m_sharedFilesystem && rank == 0) || !m_sharedFilesystem)
if (rank == 0 || !m_sharedFilesystem)
{
fs::create_directory(specPath);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment