Loading 7_composite_system/new_pardiso/main_mpipardiso.cpp +17 −1 Original line number Diff line number Diff line #include <cstdint> #include <ctime> #include <fstream> #include <iostream> #include <sstream> #include <mpi.h> Loading Loading @@ -49,9 +51,21 @@ void export_sel(const char* filename, vector<uint32_t> &sel, vector<double> &ths f.close(); } void writeElapsedTime(clock_t start_time, clock_t end_time) { double elapsed_time = (end_time - start_time) / CLOCKS_PER_SEC; ofstream outfile("elapsed_time.txt"); if (outfile.is_open()) { outfile << "delta t: " << elapsed_time << "\n"; outfile.close(); } cout << "\nelapsed time " << elapsed_time; } int main(int argc, char **argv) { clock_t start_time = clock(); MPI_Init(NULL,NULL); // Get the number of processes int comm_size = 1; Loading Loading @@ -113,6 +127,8 @@ int main(int argc, char **argv) bs_stream << "brokenlist_sorted_seed" << seed << "_" << r; rfm.export_sbl(bs_stream.str().c_str()); } clock_t end_time = clock(); writeElapsedTime(start_time, end_time); MPI_Finalize(); } Loading
7_composite_system/new_pardiso/main_mpipardiso.cpp +17 −1 Original line number Diff line number Diff line #include <cstdint> #include <ctime> #include <fstream> #include <iostream> #include <sstream> #include <mpi.h> Loading Loading @@ -49,9 +51,21 @@ void export_sel(const char* filename, vector<uint32_t> &sel, vector<double> &ths f.close(); } void writeElapsedTime(clock_t start_time, clock_t end_time) { double elapsed_time = (end_time - start_time) / CLOCKS_PER_SEC; ofstream outfile("elapsed_time.txt"); if (outfile.is_open()) { outfile << "delta t: " << elapsed_time << "\n"; outfile.close(); } cout << "\nelapsed time " << elapsed_time; } int main(int argc, char **argv) { clock_t start_time = clock(); MPI_Init(NULL,NULL); // Get the number of processes int comm_size = 1; Loading Loading @@ -113,6 +127,8 @@ int main(int argc, char **argv) bs_stream << "brokenlist_sorted_seed" << seed << "_" << r; rfm.export_sbl(bs_stream.str().c_str()); } clock_t end_time = clock(); writeElapsedTime(start_time, end_time); MPI_Finalize(); }