Skip to content

Commit be8b0b2

Browse files
committed
chimbuko_config.sh now defines variable chimbuko_services containing the path of the services script
Updated non-GPU benchmark_suite apps to use launch scripts
1 parent 24534fb commit be8b0b2

15 files changed

Lines changed: 676 additions & 605 deletions

File tree

benchmark_suite/c_from_python/chimbuko_config.sh

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ service_node_iface=eth0 #network interface upon which communication to the servi
88
####################################
99
#Options for visualization module
1010
####################################
11-
use_viz=1 #enable or disable the visualization
11+
use_viz=0 #enable or disable the visualization
1212
viz_root=/opt/chimbuko/viz #the root directory of the visualization module <------------ ***SET ME (if using viz)***
1313
viz_worker_port=6379 #the port on which to run the redis server for the visualization backend
1414
viz_port=5002 #the port on which to run the webserver
@@ -18,14 +18,19 @@ export C_FORCE_ROOT=1 #required only for docker runs, allows celery to execute p
1818
#General options for Chimbuko backend (pserver, ad, provdb)
1919
############################################################
2020
backend_root="infer" #The root install directory of the PerformanceAnalysis libraries. If set to "infer" it will be inferred from the path of the executables
21+
chimbuko_services="infer" #The location of the Chimbuko service script. If set to "infer" it will be inferred from backend_root
2122

2223
####################################
2324
#Options for the provenance database
2425
####################################
26+
use_provdb=1 #enable or disable the provDB. If disabled the provenance data will be written as JSON ASCII into the ${provdb_writedir} set below
27+
provdb_extra_args="" #any extra command line arguments to pass
2528
provdb_nshards=4 #number of database shards
2629
provdb_engine="ofi+tcp;ofi_rxm" #the OFI libfabric provider used for the Mochi stack
2730
provdb_port=5000 #the port of the provenance database
2831
provdb_nthreads=4 #number of worker threads; should be >= the number of shards
32+
provdb_writedir=chimbuko/provdb #the directory in which the provenance database is written. Chimbuko creates chimbuko/provdb which can be used as a default
33+
provdb_commit_freq=10000 #frequency ms at which the provenance database is committed to disk. If set to 0 it will commit only at the end
2934

3035
#With "verbs" provider (used for infiniband, iWarp, etc) we need to also specify the domain, which can be found by running fi_info (on a compute node)
3136
provdb_domain=mlx5_0 #only needed for verbs provider <------------ ***SET ME (if using verbs)***
@@ -34,16 +39,19 @@ provdb_domain=mlx5_0 #only needed for verbs provider <------------ ***SET ME (
3439
####################################
3540
#Options for the parameter server
3641
####################################
42+
use_pserver=1 #enable or disable the pserver
3743
pserver_extra_args="" #any extra command line arguments to pass
3844
pserver_port=5559 #port for parameter server
3945
pserver_nt=2 #number of worker threads
4046

4147
####################################
4248
#Options for the AD module
4349
####################################
44-
ad_extra_args="-perf_outputpath chimbuko/logs -perf_step 1" #any extra command line arguments to pass. chimbuko/logs is automatically created by services script
45-
ad_outlier_sigma=6 #number of standard deviations that defines an outlier
46-
ad_win_size=5 #number of events around an anomaly to store; provDB entry size is proportional to this
50+
ad_extra_args="-perf_outputpath chimbuko/logs -perf_step 1" #any extra command line arguments to pass. Note: chimbuko/logs is automatically created by services script
51+
ad_win_size=5 #number of events around an anomaly to store; provDB entry size is proportional to this so keep it small!
52+
ad_alg="sstd" #the anomaly detection algorithm. Valid values are "hbos" and "sstd"
53+
ad_outlier_hbos_threshold=0.99 #the percentile of events outside of which are considered anomalies by the HBOS algorithm
54+
ad_outlier_sstd_sigma=12 #number of standard deviations that defines an outlier in the SSTD algorithm
4755

4856
####################################
4957
#Options for TAU
@@ -84,11 +92,12 @@ export TAU_ADIOS2_FILENAME="${TAU_ADIOS2_PATH}/${TAU_ADIOS2_FILE_PREFIX}"
8492

8593
if [[ ${backend_root} == "infer" ]]; then
8694
backend_root=$( readlink -f $(which provdb_admin | sed 's/provdb_admin//')/../ )
95+
fi
8796

88-
#Check run script exists
89-
if [ ! -f "${backend_root}/scripts/launch/run_services.sh" ]; then
90-
echo "Could not infer backend root directory: service script does not exist!"
97+
if [[ ${chimbuko_services} == "infer" ]]; then
98+
chimbuko_services="${backend_root}/scripts/launch/run_services.sh"
99+
if [ ! -f "${chimbuko_services}" ]; then
100+
echo "Could not infer service script location: service script does not exist at ${chimbuko_services}!"
91101
exit 1
92102
fi
93103
fi
94-

benchmark_suite/c_from_python/run.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ source ${CHIMBUKO_CONFIG}
66

77
if (( 1 )); then
88
echo "Running services"
9-
${backend_root}/scripts/launch/run_services.sh 2>&1 | tee services.log &
9+
${chimbuko_services} 2>&1 | tee services.log &
1010
echo "Waiting"
11-
while [ ! -f chimbuko/vars/chimbuko_ad_cmd.var ]; do sleep 1; done
12-
ad_cmd=$(cat chimbuko/vars/chimbuko_ad_cmd.var)
11+
while [ ! -f chimbuko/vars/chimbuko_ad_cmdline.var ]; do sleep 1; done
12+
ad_cmd=$(cat chimbuko/vars/chimbuko_ad_cmdline.var)
1313
fi
1414

1515
if (( 1 )); then

benchmark_suite/func_multimodal/chimbuko_config.sh

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ service_node_iface=eth0 #network interface upon which communication to the servi
88
####################################
99
#Options for visualization module
1010
####################################
11-
use_viz=1 #enable or disable the visualization
11+
use_viz=0 #enable or disable the visualization
1212
viz_root=/opt/chimbuko/viz #the root directory of the visualization module <------------ ***SET ME (if using viz)***
1313
viz_worker_port=6379 #the port on which to run the redis server for the visualization backend
1414
viz_port=5002 #the port on which to run the webserver
@@ -18,14 +18,19 @@ export C_FORCE_ROOT=1 #required only for docker runs, allows celery to execute p
1818
#General options for Chimbuko backend (pserver, ad, provdb)
1919
############################################################
2020
backend_root="infer" #The root install directory of the PerformanceAnalysis libraries. If set to "infer" it will be inferred from the path of the executables
21+
chimbuko_services="infer" #The location of the Chimbuko service script. If set to "infer" it will be inferred from backend_root
2122

2223
####################################
2324
#Options for the provenance database
2425
####################################
26+
use_provdb=1 #enable or disable the provDB. If disabled the provenance data will be written as JSON ASCII into the ${provdb_writedir} set below
27+
provdb_extra_args="" #any extra command line arguments to pass
2528
provdb_nshards=4 #number of database shards
2629
provdb_engine="ofi+tcp;ofi_rxm" #the OFI libfabric provider used for the Mochi stack
2730
provdb_port=5000 #the port of the provenance database
2831
provdb_nthreads=4 #number of worker threads; should be >= the number of shards
32+
provdb_writedir=chimbuko/provdb #the directory in which the provenance database is written. Chimbuko creates chimbuko/provdb which can be used as a default
33+
provdb_commit_freq=10000 #frequency ms at which the provenance database is committed to disk. If set to 0 it will commit only at the end
2934

3035
#With "verbs" provider (used for infiniband, iWarp, etc) we need to also specify the domain, which can be found by running fi_info (on a compute node)
3136
provdb_domain=mlx5_0 #only needed for verbs provider <------------ ***SET ME (if using verbs)***
@@ -34,34 +39,45 @@ provdb_domain=mlx5_0 #only needed for verbs provider <------------ ***SET ME (
3439
####################################
3540
#Options for the parameter server
3641
####################################
42+
use_pserver=1 #enable or disable the pserver
3743
pserver_extra_args="" #any extra command line arguments to pass
3844
pserver_port=5559 #port for parameter server
3945
pserver_nt=2 #number of worker threads
40-
4146
####################################
4247
#Options for the AD module
4348
####################################
44-
ad_extra_args="-perf_outputpath chimbuko/logs -perf_step 1" #any extra command line arguments to pass. chimbuko/logs is automatically created by services script
45-
ad_outlier_sigma=12 #number of standard deviations that defines an outlier
46-
ad_win_size=5 #number of events around an anomaly to store; provDB entry size is proportional to this
47-
49+
ad_extra_args="-perf_outputpath chimbuko/logs -perf_step 1" #any extra command line arguments to pass. Note: chimbuko/logs is automatically created by services script
50+
ad_win_size=5 #number of events around an anomaly to store; provDB entry size is proportional to this so keep it small!
51+
ad_alg="hbos" #the anomaly detection algorithm. Valid values are "hbos" and "sstd"
52+
ad_outlier_hbos_threshold=0.99 #the percentile of events outside of which are considered anomalies by the HBOS algorithm
53+
ad_outlier_sstd_sigma=12 #number of standard deviations that defines an outlier in the SSTD algorithm
4854
####################################
4955
#Options for TAU
56+
#Note: Only the TAU_ADIOS2_PATH, TAU_ADIOS2_FILE_PREFIX, EXE_NAME and TAU_ADIOS2_ENGINE variables are used by the Chimbuko services script and there only to generate the suggested
57+
# command to launch the AD (output to chimbuko/vars/chimbuko_ad_cmdline.var); they can be overridden by the run script if desired providing the appropriate modifications
58+
# are made to the AD launch command. The remainder of the variables are used only by TAU and can be freely overridden.
5059
####################################
5160
export TAU_ADIOS2_ENGINE=SST #online communication engine (alternative BP4 although this goes through the disk system and may be slower unless the BPfiles are stored on a burst disk)
52-
export TAU_ADIOS2_ONE_FILE=FALSE #a different connetion file for each rank
61+
export TAU_ADIOS2_ONE_FILE=FALSE #a different connection file for each rank
5362
export TAU_ADIOS2_PERIODIC=1 #enable/disable ADIOS2 periodic output
5463
export TAU_ADIOS2_PERIOD=1000000 #period in us between ADIOS2 io steps
5564
export TAU_THREAD_PER_GPU_STREAM=1 #force GPU streams to appear as different TAU virtual threads
5665
export TAU_THROTTLE=0 #enable/disable throttling of short-running functions
5766

5867
export TAU_MAKEFILE=/opt/tau2/x86_64/lib/Makefile.tau-papi-mpi-pthread-pdt-adios2 #The TAU makefile to use <------------ ***SET ME***
68+
69+
#Note: the following 2 variables are not used by the service script but are included here for use from the user's run script allowing the application to be launched with either "${TAU_EXEC} <app>" or "${TAU_PYTHON} <app>"
70+
#Note: the "binding" -T ... is used by Tau to find the appropriate configuration. It can typically be inferred from the name of the Makefile. If using a non-MPI job the 'mpi' should be changed to 'serial' and a non-MPI build of
71+
# ADIOS2/TAU must exist
72+
#Suggestion: It is useful to test the command without Chimbuko first to ensure TAU picks up the correct binding; this can be done by 'export TAU_ADIOS2_ENGINE=BPFile' and then running the application with Tau but without Chimbuko.
5973
TAU_EXEC="tau_exec -T papi,mpi,pthread,pdt,adios2 -adios2_trace" #how to execute tau_exec; the -T arguments should mirror the makefile name <------------ ***SET ME***
74+
TAU_PYTHON="tau_python -T papi,mpi,pthread,pdt,adios2 -tau-python-interpreter=python3 -adios2_trace -tau-python-args=-u" #how to execute tau_python. Note that passing -u to python forces it to not buffer stdout so we can pipe it
75+
#to tee in realtime <--- SET ME (if !python3)
6076

6177
export EXE_NAME=main #the name of the executable (without path) <------------ ***SET ME***
6278

6379
TAU_ADIOS2_PATH=chimbuko/adios2 #path where the adios2 files are to be stored. Chimbuko services creates the directory chimbuko/adios2 in the working directory and this should be used by default
64-
TAU_ADIOS2_FILE_PREFIX=tau-metrics #the prefix of tau adios2 files; full filename is ${TAU_ADIOS2_PREFIX}-${EXE_NAME}-${RANK}.bp
80+
TAU_ADIOS2_FILE_PREFIX=tau-metrics #the prefix of tau adios2 files; full filename is ${TAU_ADIOS2_PREFIX}-${EXE_NAME}-${RANK}.bp
6581

6682

6783

@@ -83,11 +99,13 @@ export TAU_ADIOS2_FILENAME="${TAU_ADIOS2_PATH}/${TAU_ADIOS2_FILE_PREFIX}"
8399

84100
if [[ ${backend_root} == "infer" ]]; then
85101
backend_root=$( readlink -f $(which provdb_admin | sed 's/provdb_admin//')/../ )
102+
fi
86103

87-
#Check run script exists
88-
if [ ! -f "${backend_root}/scripts/launch/run_services.sh" ]; then
89-
echo "Could not infer backend root directory: service script does not exist!"
104+
if [[ ${chimbuko_services} == "infer" ]]; then
105+
chimbuko_services="${backend_root}/scripts/launch/run_services.sh"
106+
if [ ! -f "${chimbuko_services}" ]; then
107+
echo "Could not infer service script location: service script does not exist at ${chimbuko_services}!"
90108
exit 1
91109
fi
92110
fi
93-
111+

benchmark_suite/func_multimodal/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ source ${CHIMBUKO_CONFIG}
1515

1616
if (( 1 )); then
1717
echo "Running services"
18-
${backend_root}/scripts/launch/run_services.sh 2>&1 | tee services.log &
18+
${chimbuko_services} 2>&1 | tee services.log &
1919
echo "Waiting"
2020
while [ ! -f chimbuko/vars/chimbuko_ad_cmdline.var ]; do sleep 1; done
2121
ad_cmd=$(cat chimbuko/vars/chimbuko_ad_cmdline.var)
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
#Note: This configuration file is sourced into the bash environment for Chimbuko startup scripts, thus the user must follow correct shell conventions
2+
#Please do not remove any of the variables!
3+
4+
#IMPORTANT NOTE: Variables that cannot be left as default are marked as <------------ ***SET ME***
5+
6+
service_node_iface=eth0 #network interface upon which communication to the service node is performed <------------ ***SET ME***
7+
8+
####################################
9+
#Options for visualization module
10+
####################################
11+
use_viz=1 #enable or disable the visualization
12+
viz_root=/opt/chimbuko/viz #the root directory of the visualization module <------------ ***SET ME (if using viz)***
13+
viz_worker_port=6379 #the port on which to run the redis server for the visualization backend
14+
viz_port=5002 #the port on which to run the webserver
15+
export C_FORCE_ROOT=1 #required only for docker runs, allows celery to execute properly as root user <----------------- *** SET ME (if using Docker)
16+
17+
############################################################
18+
#General options for Chimbuko backend (pserver, ad, provdb)
19+
############################################################
20+
backend_root="infer" #The root install directory of the PerformanceAnalysis libraries. If set to "infer" it will be inferred from the path of the executables
21+
chimbuko_services="infer" #The location of the Chimbuko service script. If set to "infer" it will be inferred from backend_root
22+
23+
####################################
24+
#Options for the provenance database
25+
####################################
26+
use_provdb=1 #enable or disable the provDB. If disabled the provenance data will be written as JSON ASCII into the ${provdb_writedir} set below
27+
provdb_extra_args="" #any extra command line arguments to pass
28+
provdb_nshards=4 #number of database shards
29+
provdb_engine="ofi+tcp;ofi_rxm" #the OFI libfabric provider used for the Mochi stack
30+
provdb_port=5000 #the port of the provenance database
31+
provdb_nthreads=4 #number of worker threads; should be >= the number of shards
32+
provdb_writedir=chimbuko/provdb #the directory in which the provenance database is written. Chimbuko creates chimbuko/provdb which can be used as a default
33+
provdb_commit_freq=10000 #frequency ms at which the provenance database is committed to disk. If set to 0 it will commit only at the end
34+
35+
#With "verbs" provider (used for infiniband, iWarp, etc) we need to also specify the domain, which can be found by running fi_info (on a compute node)
36+
provdb_domain=mlx5_0 #only needed for verbs provider <------------ ***SET ME (if using verbs)***
37+
38+
39+
####################################
40+
#Options for the parameter server
41+
####################################
42+
use_pserver=1 #enable or disable the pserver
43+
pserver_extra_args="" #any extra command line arguments to pass
44+
pserver_port=5559 #port for parameter server
45+
pserver_nt=2 #number of worker threads
46+
####################################
47+
#Options for the AD module
48+
####################################
49+
ad_extra_args="-perf_outputpath chimbuko/logs -perf_step 1" #any extra command line arguments to pass. Note: chimbuko/logs is automatically created by services script
50+
ad_win_size=5 #number of events around an anomaly to store; provDB entry size is proportional to this so keep it small!
51+
ad_alg="hbos" #the anomaly detection algorithm. Valid values are "hbos" and "sstd"
52+
ad_outlier_hbos_threshold=0.99 #the percentile of events outside of which are considered anomalies by the HBOS algorithm
53+
ad_outlier_sstd_sigma=12 #number of standard deviations that defines an outlier in the SSTD algorithm
54+
####################################
55+
#Options for TAU
56+
#Note: Only the TAU_ADIOS2_PATH, TAU_ADIOS2_FILE_PREFIX, EXE_NAME and TAU_ADIOS2_ENGINE variables are used by the Chimbuko services script and there only to generate the suggested
57+
# command to launch the AD (output to chimbuko/vars/chimbuko_ad_cmdline.var); they can be overridden by the run script if desired providing the appropriate modifications
58+
# are made to the AD launch command. The remainder of the variables are used only by TAU and can be freely overridden.
59+
####################################
60+
export TAU_ADIOS2_ENGINE=SST #online communication engine (alternative BP4 although this goes through the disk system and may be slower unless the BPfiles are stored on a burst disk)
61+
export TAU_ADIOS2_ONE_FILE=FALSE #a different connection file for each rank
62+
export TAU_ADIOS2_PERIODIC=1 #enable/disable ADIOS2 periodic output
63+
export TAU_ADIOS2_PERIOD=1000000 #period in us between ADIOS2 io steps
64+
export TAU_THREAD_PER_GPU_STREAM=1 #force GPU streams to appear as different TAU virtual threads
65+
export TAU_THROTTLE=0 #enable/disable throttling of short-running functions
66+
67+
export TAU_MAKEFILE=/opt/tau2/x86_64/lib/Makefile.tau-papi-mpi-pthread-pdt-adios2 #The TAU makefile to use <------------ ***SET ME***
68+
69+
#Note: the following 2 variables are not used by the service script but are included here for use from the user's run script allowing the application to be launched with either "${TAU_EXEC} <app>" or "${TAU_PYTHON} <app>"
70+
#Note: the "binding" -T ... is used by Tau to find the appropriate configuration. It can typically be inferred from the name of the Makefile. If using a non-MPI job the 'mpi' should be changed to 'serial' and a non-MPI build of
71+
# ADIOS2/TAU must exist
72+
#Suggestion: It is useful to test the command without Chimbuko first to ensure TAU picks up the correct binding; this can be done by 'export TAU_ADIOS2_ENGINE=BPFile' and then running the application with Tau but without Chimbuko.
73+
TAU_EXEC="tau_exec -T papi,mpi,pthread,pdt,adios2 -adios2_trace" #how to execute tau_exec; the -T arguments should mirror the makefile name <------------ ***SET ME***
74+
TAU_PYTHON="tau_python -T papi,mpi,pthread,pdt,adios2 -tau-python-interpreter=python3 -adios2_trace -tau-python-args=-u" #how to execute tau_python. Note that passing -u to python forces it to not buffer stdout so we can pipe it
75+
#to tee in realtime <--- SET ME (if !python3)
76+
77+
export EXE_NAME=main #the name of the executable (without path) <------------ ***SET ME***
78+
79+
TAU_ADIOS2_PATH=chimbuko/adios2 #path where the adios2 files are to be stored. Chimbuko services creates the directory chimbuko/adios2 in the working directory and this should be used by default
80+
TAU_ADIOS2_FILE_PREFIX=tau-metrics #the prefix of tau adios2 files; full filename is ${TAU_ADIOS2_PREFIX}-${EXE_NAME}-${RANK}.bp
81+
82+
83+
84+
85+
86+
87+
88+
89+
90+
91+
92+
93+
94+
###########################################################################
95+
# NON-USER VARIABLES BELOW = DON'T MODIFY THESE!!
96+
###########################################################################
97+
#Extra processing
98+
export TAU_ADIOS2_FILENAME="${TAU_ADIOS2_PATH}/${TAU_ADIOS2_FILE_PREFIX}"
99+
100+
if [[ ${backend_root} == "infer" ]]; then
101+
backend_root=$( readlink -f $(which provdb_admin | sed 's/provdb_admin//')/../ )
102+
fi
103+
104+
if [[ ${chimbuko_services} == "infer" ]]; then
105+
chimbuko_services="${backend_root}/scripts/launch/run_services.sh"
106+
if [ ! -f "${chimbuko_services}" ]; then
107+
echo "Could not infer service script location: service script does not exist at ${chimbuko_services}!"
108+
exit 1
109+
fi
110+
fi
111+

0 commit comments

Comments
 (0)