Documentation for NewMadeleine-2025-03-18+b4ed7d07041aecd589e8d5bb9d281654cd4543a7 (build runner-7cspzrfxd-project-25853-concurrent-0 Thu Nov 13 12:04:24 UTC 2025)
NewMadeleine is a complete redesign and rewrite of the communication library Madeleine. The new architecture aims at enabling the use of a much wider range of communication flow optimization techniques. It is entirely modular: The request scheduler itself is interchangeable, allowing experimentations with multiple approaches or on multiple issues with regard to processing communication flows. We have implemented an optimizing scheduler called SchedOpt. SchedOpt targets applications with irregular, multi-flow communication schemes such as found in the increasingly common application conglomerates made of multiple programming environments and coupled pieces of code, for instance. SchedOpt itself is easily extensible through the concepts of optimization strategies (what to optimize for, what the optimization goal is) expressed in terms of tactics (how to optimize to reach the optimization goal). Tactics themselves are made of basic communication flows operations such as packet merging or reordering.
More information on NewMadeleine can be found at http://pm2.gitlabpages.inria.fr/newmadeleine/.
NewMadeleine files are hosted by the PM2 project on the Inria Gitlab at https:/gitlab.inria.fr/pm2/pm2/
The source code is managed by a GIT server hosted by the Inria Gitlab. Anonymous GIT access is available, so that you don't need to become a project member to access the repository with the latest source. Alternatively, you can download a released PM2 tarball.
For up to date installation details and various configuration parameters see NewMadeleine README
Alternatively, NewMadeleine may be installed through spack or Guix package.
Several APIs are provided to NewMadeleine users:
or the native NewMadeleine APIs:
users may use MPI and native interfaces at the same time. However, they must be initialized separately (MPI_Init for MPI, and Launcher interface for native interfaces).
See README in examples/ directory.
The most basic example to consider first is examples/sendrecv/nm_sr_hello2.c
NewMadeleine relies on other modules:
See Building for developpers for more details on build useful for developpers, so as not to rebuild everything everytime.
To debug and for tests, use gdb (see gdb), use valgrind (see valgrind), use ASAN (see AddressSanitizer (ASAN)). See Debug for other tools.
To check for available makefile rules, use the target help:
% cd $prefix/build/nmad % make help
NewMadeleine comes with a large collection of tests. They can be started using the tests make target for the full test suite, or the quicktests target for quick tests:
% cd $prefix/build/nmad % make tests
By default, tests are run on local host using tcp driver. The following variables are available for tuning:
NMAD_HOSTS: comma separated list of hosts where to run testsNMAD_DRIVER: driver to use (see Drivers)NMAD_EXTRA_ARGS: extra arguments given to launcherExample:
% make -C $prefix/build/nmad tests NMAD_DRIVER=ibverbs NMAD_HOSTS=henri0,henri1
Tests are run at the following places:
Benchmarks are performed automatically:
Benchmark and tests results are available here: https://pm2.gitlabpages.inria.fr/benchmark/nmad/
The internal interfaces not designed for end-users:
struct nm_strategy_iface_sstruct nm_launcher_driver_sWhen coding in NewMadeleine, most coding rules from PadicoTM apply.
In short, to ensure consistency and performance:
static visibility as much as possible. When inter-file, intra-lib visibility is wanted, use __PUK_SYM_INTERNAL.const whenever possible.--enable-docs is given for configure.nm_, then add the name of the submodule (e.g. collectives start with nm_coll_)_t, struct types end with _s, enum types end with _e, variable which are pointers start with p_.NMAD_..dir-locals.el at the root of the project enforces this style.int*p_foo = NULL;if, for, while, function name, etc., and the opening parenthesis.pm2-commits list: https://sympa.inria.fr/sympa/info/pm2-commitspull.ff=only in git config and rebase manually if neededwhitespace-mode to make sure commits are not polluted with spurious spaces.pm2 project to make sure your branch survives your account when you leave.git push on gitlab, continous integration (CI) performs automated tests driven by .gitlab-ci.yml. The CI build and run quick tests on a selection a config flavors, and on a selection of Linux distributions in docker containers.admin/docker/. These dockerfiles are designed for CI and tests only. They are not designed to be used by end-users.To debug an issue that happens only on some distribution, it is conveninent to run the same docker images locally, outside of gitlab CI. To do so, a script is provided: admin/docker/run.sh. See ./run.sh --help for an up-to-date documentation.
Example of usage:
This builds an image based on Alpine Linux, builds pm2 with madmpi-mini-debug.conf flavor, and gives a shell in the container.