Skip to content

Commit e1d3012

Browse files
author
sandeepmittal
committed
Adding Appendix section
1 parent 41303f2 commit e1d3012

8 files changed

Lines changed: 127 additions & 87 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
This is dedicated to Installation and Usage section. Description of various parameters used during Chimbuko's Install and Usage are described here.
3+
4+
.. include:: appendix_install.rst
5+
.. include:: appendix_instrument_with_tau.rst
6+
.. include:: appendix_usage.rst
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
*************
2+
Installation
3+
*************
4+
5+
Gtest Installation
6+
~~~~~~~~~~~~~~~~~~
7+
8+
.. code:: bash
9+
10+
apt-get install libgtest-dev
11+
cd /usr/src/gtest
12+
cmake CMakelists.txt
13+
make
14+
cp *.a /usr/lib
15+
16+
ADIOS2 Build Location
17+
~~~~~~~~~~~~~~~~~~~~~
18+
19+
.. code:: bash
20+
21+
ADIOS2_INSTALL_DIR=/gpfs/alpine/world-shared/csc143/jyc/summit/sw/adios2/devel/gcc
22+
23+
GoogleTest on Summit
24+
~~~~~~~~~~~~~~~~~~~~
25+
26+
.. code:: bash
27+
28+
cd ${GTEST_SOURCE_DIR}
29+
wget https://github.com/google/googletest/archive/release-1.10.0.tar.gz
30+
tar -xvzf release-1.10.0.tar.gz
31+
cd ${GTEST_BUILD_DIR}
32+
CC=gcc CXX=g++ cmake -DCMAKE_INSTALL_PREFIX=${GTEST_INSTALL_DIR} ${GTEST_SOURCE_DIR}/googletest-release-1.10.0
33+
make install
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*************************
2+
Instrumentation with TAU
3+
*************************
4+
5+
Environment Variables TAU
6+
~~~~~~~~~~~~~~~~~~~~~~~~~~
7+
8+
- **TAU_MAKEFILE=${PATH_TO_TAU_MAKEFILE}** : Ensure the Makefile is one that supports ADIOS2; these contain "adios2" in the filename
9+
- **TAU_ADIOS2_PERIODIC=1** : This tells Tau to use stepped IO
10+
- **TAU_ADIOS2_PERIOD=${PERIOD}** : This is the period in microseconds(?) between IO steps. A value of **PERIOD=100000** is a common choice, but a larger value may be necessary if Chimbuko is not able to keep pace with the data flow.
11+
- **TAU_ADIOS2_ENGINE=SST** : The engine should be SST for an online analysis in which Chimbuko and the application are running simultaneously. Chimbuko also supports offline analysis whereby an application is run without Chimbuko and the engine is set to **BPfile**.
12+
- **TAU_ADIOS2_FILENAME=${STUB}** : Here ${STUB} becomes the first component of the ADIOS2 filename, eg for "${STUB}=tau-metrics" and an application "main", the filename will be "tau-metrics-main". This filename is needed to start Chimbuko; in online mode the file exists only temporarily and is used to instantiate the communication, whereas for offline mode the filename becomes the location where the trace dump is written.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
*********
2+
Usage
3+
*********
4+
5+
Visualization Variables
6+
~~~~~~~~~~~~~~~~~~~~~~~
7+
8+
- **${VIZ_PORT}** : The port to assign to the visualization module
9+
- **${VIZ_DATA_DIR}**: A directory for storing logs and temporary data (assumed to exist)
10+
- **${VIZ_INSTALL_DIR}**: The directory where the visualization module is installed
11+
12+
Parameter Server Variables
13+
~~~~~~~~~~~~~~~~~~~~~~~~~~
14+
15+
- **PSERVER_NT** : The number of threads used to handle incoming communications from the AD modules
16+
- **PSERVER_LOGDIR** : A directory for logging output
17+
- **VIZ_ADDRESS** : Address of the visualization module (see above).
18+
- **PROVDB_ADDR**: The address of the provenance database (see above). This option enables the storing of the final globally-aggregated function profile information into the provenance database.
19+
- **PSERVER_ALG** : Set AD algorithm to use for online analysis: "sstd" or "hbos". Default value is "hbos".
20+
21+
Note that all the above are optional arguments, although if the **VIZ_ADDRESS** is not provided, no information will be sent to the webserver.
22+
23+
AD Variables
24+
~~~~~~~~~~~~
25+
26+
- **RANKS** : The number of MPI ranks that the application will be run on
27+
- **ADIOS2_ENGINE** : The ADIOS2 communications engine. For online analysis this should be **SST** by default (an alternative, **BP4** is discussed below)
28+
- **ADIOS2_FILE_DIR** : The directory in which the ADIOS2 file is written (see below)
29+
- **ADIOS2_FILE_PREFIX** : The ADIOS2 file prefix (see below)
30+
- **PSERVER_ADDR**: The address of the parameter server from above.
31+
- **PROVDB_ADDR**: The address of the provenance database from above.
32+
- **NSHARDS**: The number of provenance database shards
33+
34+
Additional AD Variables
35+
~~~~~~~~~~~~~~~~~~~~~~~
36+
37+
- **-prov_outputpath** : The directory in which the provenance data will be output. This can be used in place of or in conjunction with the provenance database. An empty string (default) disables this output.
38+
- **-outlier_sigma** : The number of standard deviations from the mean function execution time outside which the execution is considered anomalous (default 6)
39+
- **-anom_win_size** : The number of events around an anomalous function execution that are captured as contextual information and placed in the provenance database and displayed in the visualization (default 10)
40+
- **-program_idx** : For workflows with multiple component programs, a "program index" must be supplied to the AD instances attached to those processes.
41+
- **-rank** : By default the data rank assigned to an AD instance is taken from its MPI rank in MPI_COMM_WORLD. This rank is used to verify the incoming trace data. This option allows the user to manually set the rank index.
42+
- **-override_rank** : This option disables the data rank verification and instead overwrites the data rank of the incoming trace data with the data rank stored in the AD instance. The value supplied must be the original data rank (this is used to generate the correct trace filename).
43+
- **-ad_algorithm** : This is an option which sets AD algorithm to use for online analysis: "sstd" or "hbos". Default value is "hbos".
44+
- **-hbos_threshold** : This is the threshold to control density of detected anomalies used by HBOS algorithm. Its value ranges between 0 and 1. Default value is 0.99

sphinx/source/index.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Chimbuko: Performance Analysis
1010
- This library is a part of `Chimbuko <https://codarcode.github.io/Chimbuko>`_, a workflow-level scalable performance trace analysis tool.
1111
- Funded by the `Exascale Computing Project (ECP) <https://www.exascaleproject.org/>`_, U.S. Department of Energy
1212

13-
Related Github repositories
13+
Related Github repositories
1414

1515
- `Chimbuko <https://github.com/CODARcode/Chimbuko>`_
1616
- `Performance Analysis <https://github.com/CODARcode/PerformanceAnalysis>`_
@@ -24,20 +24,24 @@ Related Github repositories
2424

2525
.. toctree::
2626
:caption: Installation and Usage
27-
27+
2828
install_usage/install_usage
2929

3030
.. toctree::
3131
:caption: IO Schema
32-
32+
3333
io_schema/schema
34-
34+
35+
.. toctree::
36+
:caption: Appendix
37+
38+
appendix/appendix
39+
3540
.. toctree::
3641
:caption: API For Developers
3742

3843
api/api
3944

40-
4145
Indices and tables
4246
==================
4347

sphinx/source/install_usage/install.rst

Lines changed: 14 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
Installation
33
************
44

5-
For x86 systems we provide pre-built docker images users can quickly start
6-
with thier own TAU instrumented applications (See `Chimbuko docker <https://codarcode.github.io/Chimbuko/installation/docker.html>`_) .
7-
8-
Otherwise, first, download (or clone) **Chimbuko** AD module.
5+
For x86 systems we provide pre-built docker images users can quickly start with their own TAU instrumented applications (See `Chimbuko docker <https://codarcode.github.io/Chimbuko/installation/docker.html>`_). Otherwise, first, download (or clone) **Chimbuko** AD module.
96

107
.. code:: bash
118
@@ -42,20 +39,12 @@ If libfabric is pre-installed on the user's system it should be indicated to Spa
4239
4340
spack load mochi-sonata
4441
45-
To build test cases, users need to install gtest.
46-
47-
.. code:: bash
48-
49-
apt-get install libgtest-dev
50-
cd /usr/src/gtest
51-
cmake CMakelists.txt
52-
make
53-
cp *.a /usr/lib
42+
To build test cases, users need to install gtest. See Instructions to installs gtest `here <../appendix/appendix_install.html>`_.
5443

5544
Finally, to build the AD module
5645

5746
.. code:: bash
58-
47+
5948
cd ${AD_SOURCE_DIR}
6049
./autogen.sh
6150
cd ${AD_BUILD_DIR}
@@ -64,10 +53,10 @@ Finally, to build the AD module
6453
6554
Here **--with-perf-metric** is an optional flag that enables generation of performance information of Chimbuko. The ZMQ network is the only one presently supported; an MPI network is maintained for legacy purposes and is not recommended for use. Assuming Sonata is installed and the mochi-sonata spack module loaded, the configure script will automatically detect the installation and will build the provenance database.
6655

67-
Once installed the unit and integration tests can be run as:
56+
Once installed the unit and integration tests can be run as:
6857

6958
.. code:: bash
70-
59+
7160
cd ${AD_INSTALL_DIR}/test
7261
./run_all.sh
7362
@@ -79,18 +68,14 @@ Summit
7968
Prior to building anything the user should ensure to load the required modules:
8069

8170
.. code:: bash
82-
71+
8372
source ${AD_SOURCE_DIR}/env.summit.sh
8473
8574
..
86-
We provide :download:`an installation script<files/install_adios2.sh>` for ADIOS2_,
87-
if the latest version is not availale on Summit.
88-
89-
A build of ADIOS2 that has been tested as compatible with Chimbuko can be found here
75+
We provide :download:`an installation script<files/install_adios2.sh>` for ADIOS2_,
76+
if the latest version is not availale on Summit.
9077
91-
.. code:: bash
92-
93-
ADIOS2_INSTALL_DIR=/gpfs/alpine/world-shared/csc143/jyc/summit/sw/adios2/devel/gcc
78+
A build of ADIOS2 that has been tested as compatible with Chimbuko can be found `here <../appendix/appendix_install.html#ADIOS2-build>`_.
9479

9580
The process for building Sonata_ is somewhat more complicated on Summit. The Mochi developers recommend using a Spack environment that can be setup as follows:
9681

@@ -109,29 +94,20 @@ Then:
10994
spack env create mochi summit_spack.yaml
11095
spack env activate mochi
11196
spack install
112-
97+
11398
The user must henceforth ensure to activate the **mochi** environment prior to building and using Chimbuko as follows:
11499

115100
.. code:: bash
116101
117102
spack env activate mochi
118103
spack load mochi-sonata
119104
120-
GoogleTest_ is not installed by default on Summit, hence we must install it as follows:
121-
122-
.. code:: bash
123-
124-
cd ${GTEST_SOURCE_DIR}
125-
wget https://github.com/google/googletest/archive/release-1.10.0.tar.gz
126-
tar -xvzf release-1.10.0.tar.gz
127-
cd ${GTEST_BUILD_DIR}
128-
CC=gcc CXX=g++ cmake -DCMAKE_INSTALL_PREFIX=${GTEST_INSTALL_DIR} ${GTEST_SOURCE_DIR}/googletest-release-1.10.0
129-
make install
105+
GoogleTest_ is not installed by default on Summit, hence we must install it as described `here <../appendix/appendix_install.html#googletest-on-summit>`_.
130106

131107
To build the AD:
132108

133109
.. code:: bash
134-
110+
135111
cd ${AD_SOURCE_DIR}
136112
./autogen.sh
137113
cd ${AD_BUILD_DIR}
@@ -140,10 +116,10 @@ To build the AD:
140116
LDFLAGS_IN="-L${GTEST_INSTALL_DIR}/lib64"
141117
142118
CC=mpicc CXX=mpicxx LDFLAGS=${LDFLAGS_IN} CXXFLAGS=${CXXFLAGS_IN} \
143-
/path/to/ad/source/configure --with-adios2=${ADIOS2_INSTALL_DIR} --with-network=ZMQ --with-perf-metric --prefix=${AD_INSTALL_DIR}
119+
/path/to/ad/source/configure --with-adios2=${ADIOS2_INSTALL_DIR} --with-network=ZMQ --with-perf-metric --prefix=${AD_INSTALL_DIR}
144120
make install
145121
146-
122+
147123
.. _ADIOS2: https://github.com/ornladios/ADIOS2
148124
.. _ZeroMQ: https://zeromq.org/
149125
.. _CURL: https://curl.haxx.se/

sphinx/source/install_usage/instrumenting.rst

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@ In this section we briefly describe how to instrument an application with Tau. F
66

77
The communication between Tau and Chimbuko's AD module is performed using Tau's ADIOS2 plugin. The communication is performed in batches known as *IO steps* or *IO frames*. During an IO step Tau collects data which is communicated to Chimbuko at the end of the step.
88

9-
In order to enable the ADIOS2 plugin Tau must be compiled with the **-adios** compile option, pointing to the ADIOS2 install directory. The user must set the following environment variables:
10-
11-
- **TAU_MAKEFILE=${PATH_TO_TAU_MAKEFILE}** : Ensure the Makefile is one that supports ADIOS2; these contain "adios2" in the filename
12-
- **TAU_ADIOS2_PERIODIC=1** : This tells Tau to use stepped IO
13-
- **TAU_ADIOS2_PERIOD=${PERIOD}** : This is the period in microseconds(?) between IO steps. A value of **PERIOD=100000** is a common choice, but a larger value may be necessary if Chimbuko is not able to keep pace with the data flow.
14-
- **TAU_ADIOS2_ENGINE=SST** : The engine should be SST for an online analysis in which Chimbuko and the application are running simultaneously. Chimbuko also supports offline analysis whereby an application is run without Chimbuko and the engine is set to **BPfile**.
15-
- **TAU_ADIOS2_FILENAME=${STUB}** : Here ${STUB} becomes the first component of the ADIOS2 filename, eg for "${STUB}=tau-metrics" and an application "main", the filename will be "tau-metrics-main". This filename is needed to start Chimbuko; in online mode the file exists only temporarily and is used to instantiate the communication, whereas for offline mode the filename becomes the location where the trace dump is written.
9+
In order to enable the ADIOS2 plugin Tau must be compiled with the **-adios** compile option, pointing to the ADIOS2 install directory. The user must set a few environment variables as `described here <../appendix/appendix_instrument_with_tau.html#environment-variables-tau>`_.
1610

1711
How Tau is used depends on the language in which the application is written. Below we describe how to instrument applications written in several common languages.
1812

@@ -40,7 +34,7 @@ Calls to the GPU via CUDA are instrumented through CUDA's CUPTI performance API
4034
For example
4135

4236
.. code:: bash
43-
37+
4438
tau_exec -cupti -env -um -T papi,mpi,pthread,cupti,pdt,adios2 ${APPLICATION} ${APPLICATION_OPTS}
4539
4640
The C++ components of the application should be compiled as in the previous section. In the special case of mixed C++/CUDA code, for which the user desires to instrument also the C++ component, the CUDA compiler first separates the CUDA and C++ code and passes the components to their corresponding compilers. We must therefore specify to the CUDA compiler that it should use the **tau_cxx.sh** compiler wrapper as its C++ compiler, thus:
@@ -51,9 +45,9 @@ For example
5145
5246
nvcc -ccbin tau_cxx.sh -x cu code.cc
5347
54-
Here the **-x cu** option ensures that the compiler treats the file as CUDA/C++ and ignores the extension. Note that options passed to the C++ compiler should be prefixed with **-Xcompiler** (for more information see the CUDA compiler documentation).
48+
Here the **-x cu** option ensures that the compiler treats the file as CUDA/C++ and ignores the extension. Note that options passed to the C++ compiler should be prefixed with **-Xcompiler** (for more information see the CUDA compiler documentation).
49+
5550

56-
5751
Python
5852
~~~~~~
5953

@@ -62,7 +56,7 @@ As an interpreted language, Python applications must be wrapped by Tau's Python
6256
For example, for a python3 application:
6357

6458
.. code:: bash
65-
59+
6660
tau_python -vv -tau-python-interpreter=python3 -adios2_trace ${APPLICATION}.py
6761
6862
Note that the ADIOS2 filename required by Chimbuko will be set not to the application name but to the name of the python interpreter, e.g. for **TAU_ADIOS2_FILENAME=tau-metrics** and using python3.6, the filename will be "tau-metrics-python3.6".

0 commit comments

Comments
 (0)