<commit_before>#include <cstdlib>
#include <iostream>
#include <mpl/mpl.hpp>

int main() {
  try {
    const mpl::communicator &comm_world=mpl::environment::comm_world();
    // run the program with two ore more processes
    if (comm_world.size()<2)
      return EXIT_FAILURE;
    // process 0 sends
    if (comm_world.rank()==0) {
      // see MPI Standard for the semantics of standard send, buffered send,
      // synchronous send and ready send
      double x=1.23456;
      comm_world.send(x, 1);  // send x to rank 1 via standard send
      ++x;
      {
	// create a buffer for buffered send,
	// memory will be freed on leaving the scope
	int size={ comm_world.bsend_size<decltype(x)>() };
	mpl::bsend_buffer<> buff(size);
	// send x to rank 1 via buffered send
	comm_world.bsend(x, 1);
      }
      ++x;
      comm_world.ssend(x, 1);  // send x to rank 1 via synchronous send
      ++x;
      comm_world.rsend(x, 1);  // send x to rank 1 via ready send
    }
    // process 1 recieves
    if (comm_world.rank()==1) {
      double x;
      comm_world.recv(x, 0);  // receive x from rank 0
      std::cout << "x = " << x << '\n';
      comm_world.recv(x, 0);  // receive x from rank 0
      std::cout << "x = " << x << '\n';
      comm_world.recv(x, 0);  // receive x from rank 0
      std::cout << "x = " << x << '\n';
      comm_world.recv(x, 0);  // receive x from rank 0
      std::cout << "x = " << x << '\n';
    }
  }
  catch (std::exception &err) {
    std::cerr << err.what() << std::endl;
  }
  return EXIT_SUCCESS;
}<commit_msg>simplfy blocking exmaple<commit_after>#include <cstdlib>
#include <iostream>
#include <mpl/mpl.hpp>

int main() {
  const mpl::communicator &comm_world=mpl::environment::comm_world();
  // run the program with two ore more processes
  if (comm_world.size()<2)
    return EXIT_FAILURE;
  // process 0 sends
  if (comm_world.rank()==0) {
    // see MPI Standard for the semantics of standard send, buffered send,
    // synchronous send and ready send
    double x=1.23456;
    comm_world.send(x, 1);  // send x to rank 1 via standard send
    ++x;
    {
      // create a buffer for buffered send,
      // memory will be freed on leaving the scope
      int size={ comm_world.bsend_size<decltype(x)>() };
      mpl::bsend_buffer<> buff(size);
      // send x to rank 1 via buffered send
      comm_world.bsend(x, 1);
    }
    ++x;
    comm_world.ssend(x, 1);  // send x to rank 1 via synchronous send
    ++x;
    comm_world.rsend(x, 1);  // send x to rank 1 via ready send
  }
  // process 1 recieves
  if (comm_world.rank()==1) {
    double x;
    comm_world.recv(x, 0);  // receive x from rank 0
    std::cout << "x = " << x << '\n';
    comm_world.recv(x, 0);  // receive x from rank 0
    std::cout << "x = " << x << '\n';
    comm_world.recv(x, 0);  // receive x from rank 0
    std::cout << "x = " << x << '\n';
    comm_world.recv(x, 0);  // receive x from rank 0
    std::cout << "x = " << x << '\n';
  }
  return EXIT_SUCCESS;
}
{'fraction_non_alphanumeric': 0.15500502176096417, 'fraction_numerical': 0.018078339471041177, 'mean_word_length': 2.470383275261324, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1736477', 'n_tokens_mistral': 1104, 'n_tokens_neox': 1031, 'n_words': 331}