Skip to content

Commit

Permalink
Prepare next version (#16)
Browse files Browse the repository at this point in the history
* hp2p_util.c: update help

* configure.ac: update help

* NEWS: update

* AUTHORS: update

* README.md: update

* README.md: correction CUDA usage
  • Loading branch information
laurent-nguyen authored Jun 9, 2022
1 parent 162b299 commit ed5ccd0
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 42 deletions.
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Laurent Nguyen <[email protected]> (Main developer)
Benoit Mathieu <-> CEA (Original developer)
Vincent Ducrot <[email protected]>
Marie Cadennes <[email protected]>
Benoit Da Mota <[email protected]>
Benoit Mathieu <-> CEA (Original developer)
Matthieu Hautreux <[email protected]>
Tony Delforge <[email protected]>
Alexis Couture <[email protected]>
Marc Joos <[email protected]>
11 changes: 11 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
* Changes in hp2p-4.0 - 08/06/2022
=====================

-- Rewrite hp2p in C
-- Plotly visualisation is directly generated by hp2p. Python
is not required anymore
-- CUDA version to test bandwidth between NVIDIA GPU
-- hp2p can generate binary output again
-- Signals can be use during an hp2p run for generating output
-- Print a warning during the run if communication is slow

* Changes in hp2p-3.2 - 09/03/2017
=====================

Expand Down
97 changes: 64 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# HP2P

[![Build Status](https://travis-ci.org/cea-hpc/hp2p.svg?branch=master)](https://travis-ci.org/cea-hpc/hp2p)

**HP2P** (Heavy Peer To Peer) benchmark is a test which performs MPI Point-to-Point non-blocking communications between all MPI processes. Its goal is to measure the bandwidths and the latencies in a situation where the network is loaded. The benchmark can help to detect problems in a network like contentions or problems with switchs or links.

The benchmark comes with a interactive GUI tool written in Python 2 with Matplotlib for post-processing the result.
The benchmark generates an HTML output with interactive visualisation with Plotly.

![alt tag](examples/gui-plotly.png)

Expand All @@ -19,14 +17,6 @@ Main program:
* C++ compiler
* MPI

Visualization:

* Python 2.x.x
* Python plugins:
* Numpy
* Matplotlib
* mpldatacursor

## Getting started

```
Expand All @@ -40,39 +30,80 @@ The program **hp2p.exe** is generated.

```
$ hp2p.exe -h
Usage: ./hp2p.exe [-h] [-n nit] [-k freq] [-m nb_msg]
[-s msg_size] [-o output] [-r hostfile]
[-b bin_timer] [-i conf_file]
Options:
-i conf_file Configuration file
-n nit Number of iterations
-k freq Iterations between snapshot
-s msg_size Message size
-m nb_msg Number of msg per comm
-b bin_timer Generate Bin timer (false = 0 (default), true = 1)
-t max_time Max duration
-c build Algorithm to build couple (random = 0 (default), mirroring shift = 1)
-r hostfile Hostfile
-o output Output file
Usage: ./hp2p.exe [-h] [-n nit] [-k freq] [-m nb_msg]
[-s msg_size] [-o output] [-a align] [-y]
[-p file] [-i conf_file]
[-f bin|html] [-M max_comm_time] [-X mult_time]
Options:
-i conf_file Configuration file
-n nit Number of iterations
-k freq Iterations between snapshot
-s msg_size Message size
-m nb_msg Number of msg per comm
-a align Alignment size for MPI buffer (default=8)
-t max_time Max duration
-c build Algorithm to build couple
(random = 0 (default), mirroring shift = 1)
-y anon 1 = hide hostname, 0 = write hostname (default)
-p jsfile Path to a plotly.min.js file to include into HTML
Use get_plotlyjs.py script if plotly is installed
in your Python distribution
-o output Output file
-f format Output format (binary format = bin, plotly
format = html) [default: html]
-M max_comm_time If set, print a warning each time a
communication pair is slower than
max_comm_time
-X mult_time If set, print a warning each time a
communication pair is slower than
mult_time * mean of previous
communication times
```
The program is written in MPI:
```
$ mpirun -n 32 ./hp2p.exe -n 1000 -s 1024 -m 10 -b 1 -o first_test
$ mpirun -n 32 ./hp2p.exe -n 1000 -s 1024 -m 10 -b 1 -o first_test -o output.html
```
This command will launch the benchmark on 32 MPI processes and will run 1000 iterations. An iteration consists on a draw of random couples of MPI processes and then a phase where 10 successive communications of 1024 bytes will be performed.
The benchmark aims to test the network, so it is better to launch the benchmark with 1 MPI process per node.
At the end of the execution, a *hostfile.txt* file and files prefixed with *first_test* are created.
At the end of the execution, the output.html file wan be viewed with a web browser.

## Using CUDA

### Compilation

```
$ ./configure --enable-cuda --with-cuda=${CUDA_ROOT}
$ make
$ make install
```

### Running

hp2p should be launched with one MPI process for one GPU. If you have 4 GPUs on one node, you should launch 4 MPI processes on the node.

## Using UNIX signals

Signals can be sent to one of hp2p processes to make the program generate an output:

### Compilation

## Visualization
### Matplotlib GUI
```
$ vizhp2p -H hostfile.txt first_test
$ ./configure --enable-signal
$ make
$ make install
```
### Plotly HTML

### Running

```
$ ./vizhp2p_html -H hostfile.txt -c "Unamed cluster" -o first_test.html first_test.bin
$ mpirun -n 32 ./hp2p.exe -n 1000 -s 1024 -m 10 -b 1 -o first_test -o output.html
$ kill -s SIGUSR1 <hp2p process PID> # make hp2p generate an output
$ kill -s SIGTERM <hp2p process PID> # make hp2p generate an output and exit
```


## Contributing
## Authors
See the list of [AUTHORS](AUTHORS) who participated in this project.
Expand All @@ -86,7 +117,7 @@ Laurent Nguyen - <[email protected]>

## License

Copyright 2010-2017 CEA/DAM/DIF<br />
Copyright 2010-2022 CEA/DAM/DIF<br />
<br />
HP2P is distributed under the CeCILL-C. See the included files <br />
Licence_CeCILL-C_V1-en.txt (English version) and <br />
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ AC_CHECK_FUNCS([MPI_Init MPI_Finalize])
#check if signal has been asked
AC_ARG_ENABLE([signal],
[AS_HELP_STRING([--enable-signal],
[enable signal handling in output management (default is no).])
[enable signal handling in output management (default is no). SIGUSR1 makes the process generate an output. SIGTERM makes the process generate an output and exit.])
],
[],
[enable_signal=no])
Expand Down
18 changes: 11 additions & 7 deletions src/hp2p_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ void hp2p_util_display_help(char command[])
printf(" [-s msg_size] [-o output] [-a align] [-y]\n");
printf(" [-p file]");
printf(" [-i conf_file]\n");
printf(" [-f bin|html] [-M max_comm_time] [-X mult_time]\n");
printf("Options:\n");
printf(" -i conf_file Configuration file\n");
printf(" -n nit Number of iterations\n");
Expand All @@ -124,14 +125,17 @@ void hp2p_util_display_help(char command[])
"HTML\n");
printf(" Use get_plotlyjs.py script if plotly is "
"installed\n");
printf(" in your Python\n");
printf(" in your Python distribution\n");
printf(" -o output Output file\n");
printf(" -f format Output Format\n");
printf(" -M max_comm_time Maximum time of a communication step\n");
printf(" -X mult_time multiplier of mean time, to use as maximum "
"communication time\n");
printf("The -X and -M option print a warning each time a communication pair "
"is slower than either max_comm_time or mult_time*avg_time\n");
printf(" -f format Output format (binary format = bin, plotly\n");
printf(" format = html) [default: html]\n");
printf(" -M max_comm_time If set, print a warning each time a\n");
printf(" communication pair is slower than \n");
printf(" max_comm_time\n");
printf(" -X mult_time If set, print a warning each time a\n");
printf(" communication pair is slower than \n");
printf(" mult_time * mean of previous\n");
printf(" communication times\n");
printf("\n");
}
/**
Expand Down

0 comments on commit ed5ccd0

Please sign in to comment.