Skip to content

Commit

Permalink
Adding the python script to plot metric table and graph (#10)
Browse files Browse the repository at this point in the history
* Adding the python script to plot metric table and graph

* Add example data and update documentation
  • Loading branch information
jprotze authored Oct 1, 2024
1 parent 1d70a38 commit 9c7f09a
Show file tree
Hide file tree
Showing 9 changed files with 620 additions and 95 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,5 @@ install(TARGETS
OTFCPT_omp
OTFCPT_static
)

install (PROGRAMS script/CPT-plot.py DESTINATION bin)
82 changes: 0 additions & 82 deletions Makefile

This file was deleted.

36 changes: 23 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,6 @@ CC=mpicc.openmpi CXX=mpicxx.openmpi cmake ../
make -j8
```

## Build using the Makefile
The Makefile accepts several configuration variables to be overwritten:
- MPI defaults to `openmpi`. This will be used as infix in most generated files
- MPICC defaults to `mpicc.$(MPI)`. In combination with the MPI variable this allows easy switching of MPI on Ubuntu
- MPICXX defaults to `mpicxx.$(MPI)`. In combination with the MPI variable this allows easy switching of MPI on Ubuntu
- MPIRUN defaults to `mpirun.$(MPI)`. In combination with the MPI variable this allows easy switching of MPI on Ubuntu

### Run targets in the Makefile
- `run-test` - runs 4 tests loading the shared library tool implementation
- `run-test-static` - runs 4 tests that have the tool implementation statically built into the test

## Using the tool with an application
Depending on the system and how libomp.so is built, LD_PRELOAD and OMP_TOOL_LIBRARIES might both be necessary. Assuming a cmake build as described above, an application with OTF-CPT is executed like:
```
Expand All @@ -79,11 +68,11 @@ In both cases the runtime option `stopped=1` should be used, see below.
### Runtime options
The behavior of OTF-CPT can be changed with different runtime options. All
runtime options are exported as a space separated string assigned to
`OTFCPT_OPTIONS`.
`OTFCPT_OPTIONS`. For a full list of runtime options refer to the `help` option.

E.g.:
```
export OTFCPT_OPTIONS="verbose=1 start_stopped=1"
export OTFCPT_OPTIONS="verbose=1 start_stopped=1 help=1"
```

<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
Expand Down Expand Up @@ -146,6 +135,27 @@ encountered.</td>
</tbody>
</table>

## Plotting results of a scaling experiment

The script `CPT-plot.py` expects all OTF-CPT output files for a scaling experiment in a single directory.
The script expects the relative or absolute path of this directory as an argument. The directory name
will be used as experiment name when generating the output.
The individual output files should follow the naming convention `<prefix>-<nprocs>x<nthreads>.<suffix>`.
Prefix and suffix can be chosen freely, the script will only open and parse files with names containing
`-<nprocs>x<nthreads>.`.

In the following example we have five output files, execute the script which renders four graphic files
with color coded metric table and scaling plots:
```
$ ls script/data
data-128x12.txt data-16x12.txt data-32x12.txt data-64x12.txt data-8x12.txt
$ python3 script/CPT-plot.py script/data
$ ls data_*
data_graph.pdf data_graph.png data_metrics.pdf data_metrics.png
```



## Files
### MPI Function Wrappers
- completion-wrappers.cpp - Request completion calls
Expand Down
Loading

0 comments on commit 9c7f09a

Please sign in to comment.