Skip to content

MADNESS environment variables

Eduard Valeyev edited this page May 23, 2015 · 8 revisions

Table of Contents

Introduction

MADNESS has several runtime environment variables that affect the behavior of the program. You should set these runtime variables in the same way you would set other environment variables such as PATH (i.e. with export or setenvfor Bash and Csh, respectively).

Environment Variables

The environment variables are classified according to which layer of MADNESS they control, the runtime, multirsolution numerical representation, or the end-user applications. An end-user application like moldft will be affected by all three classes of environment variables, whereas applications that only use MADNESS runtime will be affected by the first class only.

MADNESS runtime

MAD_NUM_THREADS

Default = The number of CPU cores (or hardware threads)
Minimum = 1 without TBB, or 2 with TBB

This variable is responsible for controlling the number of threads in the MADNESS thread pool. The number of threads in the thread pool is equal to MAD_NUM_THREADS - 1. The "- 1" is for the main thread. For example, if MAD_NUM_THREADS is equal to 8, there will be 7 threads in the thread pool. If MAD_NUM_THREADS is less than the minimum (given above), then the number of threads will be set to the minimum.

NOTE: MADNESS will spawn an additional communication thread in each process if the number of MPI processes is greater than 1. The communication thread is not included in the number given by MAD_NUM_THREADS.

MAD_SEND_BUFFERS

Default = 128
Default on Cray XT = 512
Minimum = 32

This variable controls the number of send buffers used by MADNESS's active messaging system.

MAD_RECV_BUFFERS

Default = 128
Minimum = 32

This variable controls the number of receive buffers used by MADNESS's active messaging system.

MAD_WAIT_TIMEOUT

Default = 900 seconds (15 minutes)
Disabled < 1 second

This variable controls the thread pool wait timeout, and is given in units of seconds. If no task is run by the waiting thread for a period of time greater than equal to the timeout, the application will throw an exception and exit. A value less than 1 second disables the timeout mechanism.

MAD_BUFFER_SIZE

Default = 1572864 bytes (= 1.5 MB)
Minimum = 1 kB

This variable controls the size of send and receive buffers used by MADNESS's active messaging system. The value is assumed to be bytes unless a unit is specified (kB (or KB), MB, or GB).

MAD_BACKOFF_US

Default = 5 us
Minimum = 0 us
Maximum = 100 us

This variable controls the polling frequency in the Remote Message Invocation (RMI) loop.

MAD_TASKPROFILER_NAME

This variable specifies the output file name for MADNESS's task profiler. This name can include the full path.

NOTE: It is only used if MADNESS was configured with the task profiler enabled.

MADNESS numerical layer

MRA_DATA_DIR

This variable specifies the MRA data directory. A default value for this directory is set at compile time.

MADNESS chemistry applications

MRA_CHEMDATA_DIR

This variable specifies the MRA chemistry data directory (e.g. Gaussian atomic densities). A default value for this directory is set at compile time.