Skip to content
This repository was archived by the owner on Jun 12, 2026. It is now read-only.

PRO-2684/UCAS-High-Performance-Computing-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UCAS-High-Performance-Computing-System

Environment, docs and exam problems for High Performance Computing System class in UCAS (180086081201P3004H).

See questions directory for problems and full code solutions.

To setup reproducible OpenMPI environment, we use devcontainers. Read on for instructions.

Requirements

  • Docker
  • VS Code Dev Containers

No sudo needed if current user can run Docker.

Dev Container

Open this repository in VS Code, then run:

  • Dev Containers: Reopen in Container
  • Terminal > Run Build Task (Ctrl+Shift+B)
  • Terminal > Run Task... > MPI: run hello

Expected output has one line per MPI process:

process 0 of 4 is running
process 1 of 4 is running
process 2 of 4 is running
process 3 of 4 is running

Line order may vary.

Add C MPI Code

To build and run:

mkdir -p build
mpicc -O2 -Wall -Wextra -std=c11 examples/hello.c -o build/hello
HWLOC_COMPONENTS=-gl mpirun --oversubscribe -np 4 build/hello

HWLOC_COMPONENTS=-gl avoids a harmless No protocol specified message from hwloc's GL/X11 device probe inside the dev container.

References

MPI Tutorial Quick Index

About

Environment, docs and exam problems for High Performance Computing System class in UCAS (180086081201P3004H)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors