25 #include <graphlab/rpc/dc.hpp>
26 using namespace graphlab;
30 std::cout << val << std::endl;
33 int add_one(
int val) {
38 int main(
int argc,
char ** argv) {
40 mpi_tools::init(argc, argv);
44 std::cout<<
"RPC Example 1: Basic Synchronous RPC\n";
45 std::cout <<
"Run with exactly 2 MPI nodes.\n";
50 dc.control_call(1, print, 10);
51 std::cout <<
"5 plus 1 is : " << dc.
remote_request(1, add_one, 5) << std::endl;
52 std::cout <<
"11 plus 1 is : " << dc.
remote_request(1, add_one, 11) << std::endl;
56 mpi_tools::finalize();