diff --git a/src/cluster/cluster.cpp b/src/cluster/cluster.cpp index baef86e4412c43ef677d15edc043ad56021bef0a..ba832a4f0dbe8f141d215eb6b6049f3ee719971c 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;