Commit 8c133e46 authored by Junchao Zhang's avatar Junchao Zhang Committed by Pavan Balaji
Browse files

Spread out cvar info into source files



Fixes #1963
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@mcs.anl.gov>
parent 6f0cdcc8
......@@ -6,6 +6,26 @@
#if !defined(MPIUTIL_H_INCLUDED)
#define MPIUTIL_H_INCLUDED
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
cvars:
- name : MPIR_CVAR_NEMESIS_POLLS_BEFORE_YIELD
category : NEMESIS
type : int
default : 1000
class : none
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
When MPICH is in a busy waiting loop, it will periodically
call a function to yield the processor. This cvar sets
the number of loops before the yield function is called. A
value of 0 disables yielding.
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
#ifndef HAS_MPID_ABORT_DECL
/* FIXME: 4th arg is undocumented and bogus */
struct MPID_Comm;
......
......@@ -7,6 +7,35 @@
#include "mpiimpl.h"
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
cvars:
- name : MPIR_CVAR_ALLGATHER_SHORT_MSG_SIZE
category : COLLECTIVE
type : int
default : 81920
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
For MPI_Allgather and MPI_Allgatherv, the short message algorithm will
be used if the send buffer size is < this value (in bytes).
- name : MPIR_CVAR_ALLGATHER_LONG_MSG_SIZE
category : COLLECTIVE
type : int
default : 524288
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
For MPI_Allgather and MPI_Allgatherv, the long message algorithm will be
used if the send buffer size is >= this value (in bytes)
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
/* -- Begin Profiling Symbol Block for routine MPI_Allgather */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPI_Allgather = PMPI_Allgather
......
......@@ -7,6 +7,24 @@
#include "mpiimpl.h"
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
cvars:
- name : MPIR_CVAR_ALLGATHERV_PIPELINE_MSG_SIZE
category : COLLECTIVE
type : int
default : 32768
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
The smallest message size that will be used for the pipelined, large-message,
ring algorithm in the MPI_Allgatherv implementation.
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
/* -- Begin Profiling Symbol Block for routine MPI_Allgatherv */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPI_Allgatherv = PMPI_Allgatherv
......
......@@ -7,6 +7,55 @@
#include "mpiimpl.h"
#include "collutil.h"
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
cvars:
- name : MPIR_CVAR_ALLREDUCE_SHORT_MSG_SIZE
category : COLLECTIVE
type : int
default : 2048
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
the short message algorithm will be used if the send buffer size is <=
this value (in bytes)
- name : MPIR_CVAR_ENABLE_SMP_COLLECTIVES
category : COLLECTIVE
type : boolean
default : true
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
Enable SMP aware collective communication.
- name : MPIR_CVAR_ENABLE_SMP_ALLREDUCE
category : COLLECTIVE
type : boolean
default : true
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
Enable SMP aware allreduce.
- name : MPIR_CVAR_MAX_SMP_ALLREDUCE_MSG_SIZE
category : COLLECTIVE
type : int
default : 0
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
Maximum message size for which SMP-aware allreduce is used. A
value of '0' uses SMP-aware allreduce for all message sizes.
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
/* -- Begin Profiling Symbol Block for routine MPI_Allreduce */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPI_Allreduce = PMPI_Allreduce
......
......@@ -7,6 +7,52 @@
#include "mpiimpl.h"
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
categories :
- name : COLLECTIVE
description : A category for collective communication variables.
cvars:
- name : MPIR_CVAR_ALLTOALL_SHORT_MSG_SIZE
category : COLLECTIVE
type : int
default : 256
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
the short message algorithm will be used if the per-destination
message size (sendcount*size(sendtype)) is <= this value
- name : MPIR_CVAR_ALLTOALL_MEDIUM_MSG_SIZE
category : COLLECTIVE
type : int
default : 32768
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
the medium message algorithm will be used if the per-destination
message size (sendcount*size(sendtype)) is <= this value and
larger than ALLTOALL_SHORT_MSG_SIZE
- name : MPIR_CVAR_ALLTOALL_THROTTLE
category : COLLECTIVE
type : int
default : 32
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
max no. of irecvs/isends posted at a time in some alltoall
algorithms. Setting it to 0 causes all irecvs/isends to be
posted at once
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
/* -- Begin Profiling Symbol Block for routine MPI_Alltoall */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPI_Alltoall = PMPI_Alltoall
......
......@@ -7,6 +7,22 @@
#include "mpiimpl.h"
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
cvars:
- name : MPIR_CVAR_ENABLE_SMP_BARRIER
category : COLLECTIVE
type : boolean
default : true
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : Enable SMP aware barrier.
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
/* -- Begin Profiling Symbol Block for routine MPI_Barrier */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPI_Barrier = PMPI_Barrier
......
......@@ -8,6 +8,66 @@
#include "mpiimpl.h"
#include "collutil.h"
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
cvars:
- name : MPIR_CVAR_BCAST_MIN_PROCS
category : COLLECTIVE
type : int
default : 8
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
the minimum number of processes in a communicator to use a non-binomial
broadcast algorithm
- name : MPIR_CVAR_BCAST_SHORT_MSG_SIZE
category : COLLECTIVE
type : int
default : 12288
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
the short message algorithm will be used if the send buffer size is <
this value (in bytes)
- name : MPIR_CVAR_BCAST_LONG_MSG_SIZE
category : COLLECTIVE
type : int
default : 524288
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
the long message algorithm will be used if the send buffer size is >=
this value (in bytes)
- name : MPIR_CVAR_ENABLE_SMP_BCAST
category : COLLECTIVE
type : boolean
default : true
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : Enable SMP aware broadcast.
- name : MPIR_CVAR_MAX_SMP_BCAST_MSG_SIZE
category : COLLECTIVE
type : int
default : 0
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
Maximum message size for which SMP-aware broadcast is used. A
value of '0' uses SMP-aware broadcast for all message sizes.
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
/* -- Begin Profiling Symbol Block for routine MPI_Bcast */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPI_Bcast = PMPI_Bcast
......
......@@ -7,6 +7,35 @@
#include "mpiimpl.h"
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
cvars:
- name : MPIR_CVAR_GATHER_VSMALL_MSG_SIZE
category : COLLECTIVE
type : int
default : 1024
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
use a temporary buffer for intracommunicator MPI_Gather if the send
buffer size is < this value (in bytes)
- name : MPIR_CVAR_GATHER_INTER_SHORT_MSG_SIZE
category : COLLECTIVE
type : int
default : 2048
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
use the short message algorithm for intercommunicator MPI_Gather if the
send buffer size is < this value (in bytes)
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
/* -- Begin Profiling Symbol Block for routine MPI_Gather */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPI_Gather = PMPI_Gather
......
......@@ -7,6 +7,26 @@
#include "mpiimpl.h"
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
cvars:
- name : MPIR_CVAR_GATHERV_INTER_SSEND_MIN_PROCS
category : COLLECTIVE
type : int
default : 32
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
Use Ssend (synchronous send) for intercommunicator MPI_Gatherv if the
"group B" size is >= this value. Specifying "-1" always avoids using
Ssend. For backwards compatibility, specifying "0" uses the default
value.
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
/* -- Begin Profiling Symbol Block for routine MPI_Gatherv */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPI_Gatherv = PMPI_Gatherv
......
......@@ -8,6 +8,32 @@
#include "mpiimpl.h"
#include "datatype.h"
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
categories:
- name : FAULT_TOLERANCE
description : cvars that control fault tolerance behavior
cvars:
- name : MPIR_CVAR_ENABLE_COLL_FT_RET
category : FAULT_TOLERANCE
type : boolean
default : true
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
DEPRECATED! Will be removed in MPICH-3.2
Collectives called on a communicator with a failed process
should not hang, however the result of the operation may be
invalid even though the function returns MPI_SUCCESS. This
option enables an experimental feature that will return an error
if the result of the collective is invalid.
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
#define COPY_BUFFER_SZ 16384
/* These functions are used in the implementation of collective
......
......@@ -8,6 +8,24 @@
#include "mpiimpl.h"
#include "collutil.h"
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
cvars:
- name : MPIR_CVAR_REDSCAT_COMMUTATIVE_LONG_MSG_SIZE
category : COLLECTIVE
type : int
default : 524288
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
the long message algorithm will be used if the operation is commutative
and the send buffer size is >= this value (in bytes)
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
/* -- Begin Profiling Symbol Block for routine MPI_Reduce_scatter */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPI_Reduce_scatter = PMPI_Reduce_scatter
......
......@@ -8,6 +8,46 @@
#include "mpiimpl.h"
#include "collutil.h"
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
cvars:
- name : MPIR_CVAR_REDUCE_SHORT_MSG_SIZE
category : COLLECTIVE
type : int
default : 2048
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
the short message algorithm will be used if the send buffer size is <=
this value (in bytes)
- name : MPIR_CVAR_ENABLE_SMP_REDUCE
category : COLLECTIVE
type : boolean
default : true
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
Enable SMP aware reduce.
- name : MPIR_CVAR_MAX_SMP_REDUCE_MSG_SIZE
category : COLLECTIVE
type : int
default : 0
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
Maximum message size for which SMP-aware reduce is used. A
value of '0' uses SMP-aware reduce for all message sizes.
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
/* -- Begin Profiling Symbol Block for routine MPI_Reduce */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPI_Reduce = PMPI_Reduce
......
......@@ -7,6 +7,24 @@
#include "mpiimpl.h"
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
cvars:
- name : MPIR_CVAR_SCATTER_INTER_SHORT_MSG_SIZE
category : COLLECTIVE
type : int
default : 2048
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
use the short message algorithm for intercommunicator MPI_Scatter if the
send buffer size is < this value (in bytes)
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
/* -- Begin Profiling Symbol Block for routine MPI_Scatter */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPI_Scatter = PMPI_Scatter
......
......@@ -8,6 +8,27 @@
#include "mpiimpl.h"
#include "mpicomm.h"
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
categories:
- name : COMMUNICATOR
description : cvars that control communicator construction and operation
cvars:
- name : MPIR_CVAR_COMM_SPLIT_USE_QSORT
category : COMMUNICATOR
type : boolean
default : true
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
Use qsort(3) in the implementation of MPI_Comm_split instead of bubble sort.
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
/* -- Begin Profiling Symbol Block for routine MPI_Comm_split */
#if defined(HAVE_PRAGMA_WEAK)
#pragma weak MPI_Comm_split = PMPI_Comm_split
......
......@@ -17,6 +17,27 @@
#define MPID_COMM_PREALLOC 8
#endif
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
cvars:
- name : MPIR_CVAR_CTXID_EAGER_SIZE
category : THREADS
type : int
default : 2
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
The MPIR_CVAR_CTXID_EAGER_SIZE environment variable allows you to
specify how many words in the context ID mask will be set aside
for the eager allocation protocol. If the application is running
out of context IDs, reducing this value may help.
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
/* Preallocated comm objects */
/* initialized in initthread.c */
MPID_Comm MPID_Comm_builtin[MPID_COMM_N_BUILTIN] = { {0} };
......
......@@ -11,6 +11,33 @@
#include <unistd.h>
#endif
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
cvars:
- name : MPIR_CVAR_PROCTABLE_SIZE
category : DEBUGGER
type : int
default : 64
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
Size of the "MPIR" debugger interface proctable (process table).
- name : MPIR_CVAR_PROCTABLE_PRINT
category : DEBUGGER
type : boolean
default : false
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
If true, dump the proctable entries at MPIR_WaitForDebugger-time.
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
/* There are two versions of the debugger startup:
1. The debugger starts mpiexec - then mpiexec provides the MPIR_proctable
information
......
......@@ -32,6 +32,38 @@
/* stdio is needed for vsprintf and vsnprintf */
#include <stdio.h>
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
categories:
- name : ERROR_HANDLING
description : cvars that control error handling behavior (stack traces, aborts, etc)
cvars:
- name : MPIR_CVAR_PRINT_ERROR_STACK
category : ERROR_HANDLING
type : boolean
default : true
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_LOCAL
description : >-
If true, print an error stack trace at error handling time.
- name : MPIR_CVAR_CHOP_ERROR_STACK
category : ERROR_HANDLING
type : int
default : 0
class : device
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_LOCAL
description : >-
If >0, truncate error stack output lines this many characters
wide. If 0, do not truncate, and if <0 use a sensible default.
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/
/*
* Structure of this file
*
......
......@@ -8,6 +8,28 @@
#include "mpiimpl.h"
#include "mpi_init.h"
/*
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
categories:
- name : DEVELOPER
description : useful for developers working on MPICH itself
cvars:
- name : MPIR_CVAR_MEMDUMP
category : DEVELOPER
type : boolean
default : true
class : device
verbosity : MPI_T_VERBOSITY_MPIDEV_DETAIL
scope : MPI_T_SCOPE_LOCAL
description : >-
If true, list any memory that was allocated by MPICH and that
remains allocated when MPI_Finalize completes.
=== END_MPI_T_CVAR_INFO_BLOCK ===
*/