MADNESS 0.10.1
test_rmi_huge.h File Reference

Messages too large for an MPI count of bytes, sent as the argument of a remote task. More...

#include <cstdint>
#include <cstdlib>
#include <iostream>
#include <limits>
#include <string>
#include <vector>
#include <madness/world/MADworld.h>
#include <madness/world/safempi.h>
Include dependency graph for test_rmi_huge.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Detailed Description

Messages too large for an MPI count of bytes, sent as the argument of a remote task.

A message longer than MAD_BUFFER_SIZE takes RMI's huge-message protocol, and one of more than INT_MAX bytes must further be given to MPI either by its large-count functions (MPI 4) or, where MPI has none, described by a derived datatype ( SafeMPI::ByteCount ). This is the body of two tests, each a source file that includes it:

  • test_rmi_huge.cc lowers the size above which a plain count of bytes is not used, so that messages of a few MiB cover the other paths: one that leaves a remainder after whole chunks of the derived datatype, one that does not, one that stays a plain count, and several at once. Where MPI has large counts these are sent that way, then by the derived datatype, then with the two ends disagreeing. It also checks the datatypes ByteCount builds for sizes beyond INT_MAX , which takes no memory.
  • test_rmi_huge_large.cc defines MADNESS_TEST_RMI_HUGE_LARGE and sends one message of more than INT_MAX bytes at the default setting (and, where MPI has large counts, once more by the derived datatype); that takes about 9 GiB, so it carries the "large" label.

Needs at least 2 ranks to send anything; with 1 the tasks are local.

Function Documentation

◆ main()