Skip to content

Instantly share code, notes, and snippets.

@rk4bir
Created November 7, 2019 06:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rk4bir/b03b2e387464207295c9803f49dc1a43 to your computer and use it in GitHub Desktop.
Save rk4bir/b03b2e387464207295c9803f49dc1a43 to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
# run mpi_pi.c with np from 1 to 8
mpicc -o pi mpi_pi.c
for i in $(seq 1 8); do
mpirun -np $i ./pi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment