Tuning libmboard using environment variables

The behaviour and configuration parameters of libmboard can be modified by setting the relevant environment variables.

Table of Contents

  1. Environment variables to tune memory usage
  2. Environmen variables to tune communication between boards

Environment variables to tune memory usage

The following environment variables can be used to influence the memory usage of boards.

MBOARD_MEMPOOL_RECYCLE (default: OFF)

Use this variable to recycle memory used by the message board. When this is enabled MB_Clear() will reset the internal cursors but leave the used memory unallocated.

Enabling this feature will reduce the time taken to deallocate (and reallocate) memory used to store messages in boards. It will however lead to higher memory usage.

MBOARD_MEMPOOL_RECYCLE can be set to "1", "ON", "YES", or "TRUE" to enable this feature.

MBOARD_MEMPOOL_RECYCLE can be set to "0", "OFF", "NO", or "FALSE" to disable this feature.

MBOARD_MEMPOOL_BLOCKSIZE (default: 512)

Use this variable to specify the size of each memory block allocated.

Messages boards allocate memory in large chunks to avoid having to allocate small fragments of memory for each message. This variable controls the size of each allocation. For example, if MBOARD_MEMPOOL_BLOCKSIZE=1024 memory is allocated such that 1024 messages can be added to the board before more memory needs to be allocated.

The value assigned to MBOARD_MEMPOOL_BLOCKSIZE must be between 10 to 1,000,000. If an invalid value is set to the environment variable, or if the variable is not defined, the default value will be used.

Environmen variables to tune communication between boards

The following environment variables can be used to influence the communication strategies adopted when synchronising message boards.

MBOARD_COMM_PROTOCOL (default: "HANDSHAKE")

Use this variable to switch to a communication protocol that will suit your hardware setup and underlying MPI implementation.

MBOARD_COMM_PROTOCOL can be set to one of the following protocols:


Generated on 1 Oct 2009 for libmboard by  doxygen 1.6.1