From 5f45ef68b63073619e2b925eb05c169edea0053b Mon Sep 17 00:00:00 2001 From: Giovanni La Mura <giovanni.lamura@inaf.it> Date: Fri, 14 Feb 2025 11:09:33 +0100 Subject: [PATCH] Update parallel description comments --- src/cluster/cluster.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cluster/cluster.cpp b/src/cluster/cluster.cpp index baef86e4..ba832a4f 100644 --- a/src/cluster/cluster.cpp +++ b/src/cluster/cluster.cpp @@ -326,6 +326,9 @@ void cluster(const string& config_file, const string& data_file, const string& o return; } + //================================================== + // do the first outputs here, so that I open here the new files, afterwards I only append + //================================================== vtppoanp->write_to_disk(output_path + "/c_TPPOAN"); delete vtppoanp; @@ -420,8 +423,8 @@ void cluster(const string& config_file, const string& data_file, const string& o // the parallel loop over MPI processes covers a different set of indices for each thread #pragma omp barrier int myjxi488 = ixi488+myompthread; - vtppoanp_2 = new VirtualBinaryFile(); // each thread opens new virtual files and stores their pointers in the shared array + vtppoanp_2 = new VirtualBinaryFile(); // each thread puts a copy of the pointers to its virtual files in the shared arrays vtppoanarray[myompthread] = vtppoanp_2; #pragma omp barrier @@ -521,8 +524,8 @@ void cluster(const string& config_file, const string& data_file, const string& o else { // NSPH mismatch between geometry and scatterer configurations. throw UnrecognizedConfigurationException( - "Inconsistent geometry and scatterer configurations." - ); + "Inconsistent geometry and scatterer configurations." + ); } delete sconf; -- GitLab