Using The Noise Injection Infrastructure
Building your Application
Applications that use this infrastructure must be recompiled with my modified toolchain. These modifications insert a small amount of code that now starts the noise generation shortly before the application jumps to main() as prints a statistics LOG after the application has entered exit().
Compilers
On rsc-c3:
- MPI bin dir:
/usr/local5/kbferre/${RELEASE_VER}/install/mpich2-64/P2/bin - cc :
/usr/local5/kbferre/${RELEASE_VER}/install/bin/snos64/qk-gcc
Passing Noise Parameters
Noise injection in Catamount can be done in one of two ways, we can pass the noise parameters on the yod commandline or we can define the NOISE parameters in the processes environment.
Passing Noise Parameters Through YOD
To pass the the noise frequency and duration parameters we use the undocumented instrum option to yod. This option allows for up to 10 integers to be passed to both the PCT and qk. The first two instrum options are debug flag fields for the PCT and qk respectively. There values set the _cat_dbg_flag variable in the PCT and qk individually. All instrum flags can be accessed from _debug_inst[] as well as from the user_saves field in the applications control block (pcb). We use the third and forth instrum parameters to pass the noise frequency and duration respectively. Note: unless NOISE_TYPE is defined this will generate nodes on all nodes in the job.
Example
An example usage is as follows (note instrum parameters must be in quotes so shell interprets as a string and parameters must be space separated):
yod -sz n -instrum "0 0 f d" application
The meaning of the -instrum parameters are :
0are parameters that are ignored as they are used for debug levelprintfs in thePCTandqkrespectively.fspecifies the frequency in Hz to run a noise generating functiondis the duration in microseconds of the noise generating function.
Therefore, if we wanted to inject noise with a period of 100Hz and duration of 80us:
yod -sz n -instrum "0 0 100 80" application
Passing Noise Parameters Through Environment Variables
An alternative method of injecting noise is through a set of environment variables in the applications environment.
Variables
NOISE_FREQ
This environment variable defines the frequency in HZ in which noise is generated. Note: this value will trump any noise frequency parameters passed to yod.
NOISE_DELTA
This environment variable defines the duration in microseconds of each noise instances. Note: this value will trump any noise delta parameters passed to yod.
NOISE_TYPE
This defines the NOISE_TYPE. The legal values for NOISE_TYPE are “all” and “few”. “all” specifies that all nodes in the job generate noise. “few” means that all nodes whose pnids are located in the environment variable NOISE_NODE_LIST will generate noise. If NOISE_TYPE is not defined behavior is assumed to be NOISE_TYPE=all.
NOISE_NODE_LIST
This environment variable specifies the pnids of the nodes in the job that inject noise. NOISE_NODE_LIST must be of the following strict form:
NOISE_NODE_LIST="<space>pnid<space>pnid<space> ... <space>pnid<space>"
NOISE_DIST (NOT IMPLEMENTED)
This environment variable specifies the random variable distribution noise is generated from. Acceptable values are:
- “possion”: generate noise from a possion random variable distribution.
NOISE_DIST_SIZE (NOT IMPLEMENTED)
This environment variable specifies the number of distinct random variable values generated internally to generate noise. The default is 1000 and it is not recommended to change.
Example
Inject noise with a period of 100Hz and duration of 80us on all nodes in the application
NOISE_FREQ=100 NOISE_DELTA=80 NOISE_TYPE=all yod -list n..m application
Inject noise with a period 100Hz and duration 80us on nodes 10 through 15:
NOISE_FREQ=100 NOISE_DELTA=80 NOISE_TYPE=few NOISE_NODE_LIST=" 10 11 12 13 14 15 " yod -list 10..20 application
Inject noise with a possion distribution with frequency mean 100Hz and mean duration 80us on all nodes
NOISE_FREQ=100 NOISE_DELTA=80 NOISE_DIST=poisson --list n..m ./application