#include <time.h>
#include <fstream>
#include <sstream>
#include <iostream>
#include <havoqgt/mpi.hpp>
#include <sys/mman.h>
Go to the source code of this file.
|
void | execute_command (int backup, std::string fname_input, std::string fname_output) |
|
int | main (int argc, char **argv) |
|
void execute_command |
( |
int |
backup, |
|
|
std::string |
fname_input, |
|
|
std::string |
fname_output |
|
) |
| |
Definition at line 91 of file transfer_graph.cpp.
96 std::cout <<
"Restoring File:";
98 tar_str =
"cp " + fname_input +
" " + fname_output;
101 std::cout <<
"Source = '" << fname_input.c_str() <<
"' "
102 <<
"Destination = '" << fname_output.c_str() <<
"'" << std::endl
103 <<
"Command = '" << tar_str.c_str() <<
"'" << std::endl;
105 system(tar_str.c_str());
106 std::cout << std::flush;
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 17 of file transfer_graph.cpp.
18 int mpi_rank(0), mpi_size(0);
19 CHK_MPI(MPI_Init(&argc, &argv));
20 CHK_MPI( MPI_Comm_rank( MPI_COMM_WORLD, &mpi_rank) );
21 CHK_MPI( MPI_Comm_size( MPI_COMM_WORLD, &mpi_size) );
24 std::string fname_input;
25 std::string fname_output;
29 fname_input = argv[pos++];
30 fname_output = argv[pos++];
34 std::cout <<
"Parameter Error: <input_file> <output_file>" << std::endl;
40 std::cout <<
"Restoring File:";
41 std::cout <<
"Source = '" << fname_input.c_str() << std::endl;
42 std::cout <<
"Dest = '" << fname_output.c_str() << std::endl;
45 fname_input +=
"_" + std::to_string(mpi_rank);
47 std::ifstream fin(fname_input);
48 bool is_good = fin.good();
51 std::cout <<
"[" << mpi_rank <<
"] File not found: " << fname_input
63 std::cout <<
"***(" << i <<
"/" << node_partions <<
") Processes: "
64 << lower_bound <<
" - " << upper_bound
65 <<
" executing on each node." << std::endl;
69 std::cout <<
"[" << mpi_rank
70 <<
"] error: attempting to backup/restor twice." << std::endl;
75 std::cout <<
"[" << mpi_rank <<
"]";
80 MPI_Barrier(MPI_COMM_WORLD);
83 MPI_Barrier(MPI_COMM_WORLD);
85 std::cout <<
"Transfer Graph Fin." << std::endl;
void execute_command(int backup, std::string fname_input, std::string fname_output)
const int processes_per_node
const int node_partions = 8 |
const int processes_per_node = 24 |
const bool verbose = false |