Loading src/cluster/cluster.cpp +32 −26 Original line number Diff line number Diff line Loading @@ -258,8 +258,12 @@ void cluster(const string& config_file, const string& data_file, const string& o #pragma omp barrier { // thread 0 already wrote on global files, skip it and take care of appending the others for (int ri = 1; ri < ompnumthreads; ri++) { for (int ri = 0; ri < ompnumthreads; ri++) { // still, we need to remove all c_OCLU_RANK_0 files string partial_file_name = output_path + "/c_OCLU_" + to_string(mpidata->rank) + "_" + to_string(ri); if (ri == 0) { remove(partial_file_name.c_str()); } else { string message = "Copying ASCII output in MPI process " + to_string(mpidata->rank) + " of thread " + to_string(ri) + " of " + to_string(ompnumthreads - 1) + "... "; logger->log(message, LOG_DEBG); FILE *partial_output = fopen(partial_file_name.c_str(), "r"); Loading Loading @@ -288,6 +292,7 @@ void cluster(const string& config_file, const string& data_file, const string& o logger->log("done.\n", LOG_DEBG); } } } #endif // here go the code to append the files written in MPI processes > 0 to the ones on MPI process 0 #ifdef MPI_VERSION Loading Loading @@ -453,6 +458,7 @@ void cluster(const string& config_file, const string& data_file, const string& o MPI_Send(&chunk_buffer_size, 1, MPI_INT, 0, 1, MPI_COMM_WORLD); partial_output.close(); delete[] chunk_buffer; remove(partial_file_name.c_str()); partial_file_name = output_path + "/c_TPPOAN_" + to_string(mpidata->rank) + "_" + to_string(ri); message = "Copying binary output in MPI process " + to_string(mpidata->rank) + " of thread " + to_string(ri) + " of " + to_string(ompnumthreads - 1) + "... "; Loading Loading
src/cluster/cluster.cpp +32 −26 Original line number Diff line number Diff line Loading @@ -258,8 +258,12 @@ void cluster(const string& config_file, const string& data_file, const string& o #pragma omp barrier { // thread 0 already wrote on global files, skip it and take care of appending the others for (int ri = 1; ri < ompnumthreads; ri++) { for (int ri = 0; ri < ompnumthreads; ri++) { // still, we need to remove all c_OCLU_RANK_0 files string partial_file_name = output_path + "/c_OCLU_" + to_string(mpidata->rank) + "_" + to_string(ri); if (ri == 0) { remove(partial_file_name.c_str()); } else { string message = "Copying ASCII output in MPI process " + to_string(mpidata->rank) + " of thread " + to_string(ri) + " of " + to_string(ompnumthreads - 1) + "... "; logger->log(message, LOG_DEBG); FILE *partial_output = fopen(partial_file_name.c_str(), "r"); Loading Loading @@ -288,6 +292,7 @@ void cluster(const string& config_file, const string& data_file, const string& o logger->log("done.\n", LOG_DEBG); } } } #endif // here go the code to append the files written in MPI processes > 0 to the ones on MPI process 0 #ifdef MPI_VERSION Loading Loading @@ -453,6 +458,7 @@ void cluster(const string& config_file, const string& data_file, const string& o MPI_Send(&chunk_buffer_size, 1, MPI_INT, 0, 1, MPI_COMM_WORLD); partial_output.close(); delete[] chunk_buffer; remove(partial_file_name.c_str()); partial_file_name = output_path + "/c_TPPOAN_" + to_string(mpidata->rank) + "_" + to_string(ri); message = "Copying binary output in MPI process " + to_string(mpidata->rank) + " of thread " + to_string(ri) + " of " + to_string(ompnumthreads - 1) + "... "; Loading