Getting started with PM2

Runtime

LaBRI, INRIA Bordeaux - Sud-Ouest

High Performance Runtime Systems for Parallel Architectures

5. Mastering PM2

5.1 Mastering Marcel

Marcel has some functionalities which are disabled by default:

  • The support of the atexit function,
  • The support of blocking system calls,
  • The support of the cleanup functions,
  • The support of marcel exceptions,
  • The support of the keys/thread-specific data handling mechanisms,
  • The support of the once function,
  • The support of the postexit function,
  • The support of the signals mechanism,
  • The support of the suspend function,
  • The support of the userspace mechanism.
To enable them, you need to change your PM2 flavor by adding the options enable_atexit, enable_blocking, enable_cleanup, enable_exceptions, enable_keys, enable_once, enable_postexit, enable_signals, enable_suspend, or enable_userspace.

Marcel can be made to use part of the machine's processors: adding --marcel-nvp 4 to the command line will make it use only 4 processors. By default, Marcel tries to spread over the machine, i.e. when using 4 processors of a quad-quad core machine, it will use one core of each of the 4 dies. To use adjacent processors, append --marcel-cpustride 1 to the command line. Eventually, appending the --marcel-firstcpu 4 option makes Marcel use processors from the fifth processor. For instance, on a quad-quad core machine, one could run 4 Marcel applications this way:

  • appli1 --marcel-nvp 4 --marcel-cpustride 1 --marcel-firstcpu 0
  • appli2 --marcel-nvp 4 --marcel-cpustride 1 --marcel-firstcpu 4
  • appli3 --marcel-nvp 4 --marcel-cpustride 1 --marcel-firstcpu 8
  • appli4 --marcel-nvp 4 --marcel-cpustride 1 --marcel-firstcpu 12
Each application will get bound to a die.

Other Marcel options are available, append --marcel-help to the command line to get some help.


RETURN HOME | BACK: Customizing and debugging PM2 | NEXT: Additional PM2 material

Copyright © May 2009 Team Runtime