From 812f5ada4e82b018ae354b0526efcc18dd89508a Mon Sep 17 00:00:00 2001 From: junxiW Date: Thu, 19 Oct 2023 15:34:04 +0200 Subject: [PATCH] save grid for debugging parallel computing at all processes. --- ugbase/lib_grid/file_io/file_io.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ugbase/lib_grid/file_io/file_io.cpp b/ugbase/lib_grid/file_io/file_io.cpp index 46880a354..5d2c8f852 100644 --- a/ugbase/lib_grid/file_io/file_io.cpp +++ b/ugbase/lib_grid/file_io/file_io.cpp @@ -425,6 +425,7 @@ static bool SaveGrid(Grid& grid, ISubsetHandler* psh, std::size_t found=strName.find(".ugx"); strName=strName.replace(found, 4, ""); int procRank=pcl::ProcRank(); + strName=strName.append("_p"); strName=strName.append(std::to_string(procRank)); strName.append(".ugx"); #endif @@ -440,6 +441,7 @@ static bool SaveGrid(Grid& grid, ISubsetHandler* psh, #if (defined UG_PARALLEL && defined UG_DEBUG) std::size_t found=strName.find(".vtu"); strName=strName.replace(found, 4, ""); + strName=strName.append("_p"); strName=strName.append(std::to_string(pcl::ProcRank())); strName.append(".vtu"); #endif