GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Adding readme for mpi4py example · amd/HPCTrainingExamples@2d9d083

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Python/mpi4py
    • README.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Python/mpi4py/README.md‎

Copy file name to clipboard
+37Lines changed: 37 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## MPI4PY examples
2+
3+
First set up the environment
4+
5+
```
6+
module load mpi4py cupy
7+
```
8+
9+
Add `print("Rank is:", rank)` right after the rank is set at line 10.
10+
11+
Then run the python program
12+
13+
```
14+
mpirun -n 4 python mpi4py_cupy.py
15+
```
16+
17+
You should see the following output, but it might be in a different order
18+
19+
```
20+
Rank is: 3
21+
Rank is: 1
22+
Rank is: 2
23+
Rank is: 0
24+
Starting allreduce test...
25+
Starting bcast test...
26+
Starting send-recv test...
27+
Success
28+
```
29+
30+
To verify if the program is running on the GPU
31+
32+
```
33+
export AMD_LOG_LEVEL=3
34+
mpirun -n 4 python mpi4py_cupy.py
35+
```
36+
37+
You will get a lot of output including whole programs.

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.