Loading src/cluster/cluster.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -324,7 +324,7 @@ void cluster(const string& config_file, const string& data_file, const string& o delete[] chunk_buffer; MPI_Recv(&chunk_buffer_size, 1, MPI_INT, rr, 1, MPI_COMM_WORLD, MPI_STATUS_IGNORE); } fputc(10, output); fprintf(output, "\n"); // now get the binary local file long buffer_size = 0; Loading Loading @@ -454,7 +454,7 @@ void cluster(const string& config_file, const string& data_file, const string& o // If EOF is reached, do not send EOF character. long ptr_position = partial_output.tellg(); if (ptr_position == partial_output_size) { chunk_buffer_size--; chunk_buffer[chunk_buffer_size - 1] = '\0'; } // Send the size of the buffer that is being transmitted (Node-0 does not know whether it is full or not) MPI_Send(&chunk_buffer_size, 1, MPI_INT, 0, 1, MPI_COMM_WORLD); Loading @@ -464,8 +464,11 @@ void cluster(const string& config_file, const string& data_file, const string& o long ptr_position = partial_output.tellg(); if (ptr_position < partial_output_size) { // Send the last partial buffer chunk_buffer_size = partial_output_size - ptr_position - 1; chunk_buffer_size = partial_output_size - ptr_position; delete[] chunk_buffer; chunk_buffer = new char[chunk_buffer_size]; partial_output.read(chunk_buffer, chunk_buffer_size); chunk_buffer[chunk_buffer_size - 1] = '\0'; // Send the size of the buffer that is being transmitted (Node-0 does not know whether it is full or not) MPI_Send(&chunk_buffer_size, 1, MPI_INT, 0, 1, MPI_COMM_WORLD); // Actually send the file contents to Node-0 Loading Loading
src/cluster/cluster.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -324,7 +324,7 @@ void cluster(const string& config_file, const string& data_file, const string& o delete[] chunk_buffer; MPI_Recv(&chunk_buffer_size, 1, MPI_INT, rr, 1, MPI_COMM_WORLD, MPI_STATUS_IGNORE); } fputc(10, output); fprintf(output, "\n"); // now get the binary local file long buffer_size = 0; Loading Loading @@ -454,7 +454,7 @@ void cluster(const string& config_file, const string& data_file, const string& o // If EOF is reached, do not send EOF character. long ptr_position = partial_output.tellg(); if (ptr_position == partial_output_size) { chunk_buffer_size--; chunk_buffer[chunk_buffer_size - 1] = '\0'; } // Send the size of the buffer that is being transmitted (Node-0 does not know whether it is full or not) MPI_Send(&chunk_buffer_size, 1, MPI_INT, 0, 1, MPI_COMM_WORLD); Loading @@ -464,8 +464,11 @@ void cluster(const string& config_file, const string& data_file, const string& o long ptr_position = partial_output.tellg(); if (ptr_position < partial_output_size) { // Send the last partial buffer chunk_buffer_size = partial_output_size - ptr_position - 1; chunk_buffer_size = partial_output_size - ptr_position; delete[] chunk_buffer; chunk_buffer = new char[chunk_buffer_size]; partial_output.read(chunk_buffer, chunk_buffer_size); chunk_buffer[chunk_buffer_size - 1] = '\0'; // Send the size of the buffer that is being transmitted (Node-0 does not know whether it is full or not) MPI_Send(&chunk_buffer_size, 1, MPI_INT, 0, 1, MPI_COMM_WORLD); // Actually send the file contents to Node-0 Loading