User Tools

Site Tools


unite_python_mpi_4_py

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
unite_python_mpi_4_py [2026/04/10 13:40] nshegunovunite_python_mpi_4_py [2026/04/10 13:49] (current) nshegunov
Line 1: Line 1:
-==== MPI4py Ping-Pong Example for Cluster ====+====== MPI4py Ping-Pong Example for Cluster ======
  
 This example shows a NumPy-based ping-pong benchmark using the ''mpi4py'' library on a cluster. Two MPI ranks exchange a NumPy array for several message sizes and measure round-trip time, one-way latency, and effective bandwidth. This example shows a NumPy-based ping-pong benchmark using the ''mpi4py'' library on a cluster. Two MPI ranks exchange a NumPy array for several message sizes and measure round-trip time, one-way latency, and effective bandwidth.
 +
 +=====  Instructions =====
 +
 +To run this example, create the Python script and Slurm batch script provided below.
 +
 +The Python script uses the mpi4py library to measure MPI communication performance with the classic ping-pong benchmark. The Slurm script loads the required modules and submits the job across 2 nodes.
 +
 +Optional interactive testing:
 +<code bash>
 +srun --partition=short --ntasks=2 --gres=gpu:1 --time=02:00:00 --pty bash
 +</code>
 +
 +Use this command to request an interactive session on a single node for experimentation.
  
 ===  Python Script (pingpong_mpi4py.py) ==== ===  Python Script (pingpong_mpi4py.py) ====
unite_python_mpi_4_py.1775817614.txt.gz · Last modified: 2026/04/10 13:40 by nshegunov

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki