Hari Sundar, MEB 3454
hari@cs.utah.edu
WEB L120 - MW 3-4:20pm
Classifies architectures based on the relationship between the data and instruction steams:
SISD : single instruction stream, single data stream → standard sequential machine
SIMD : single instruction stream, multiple data streams → vectorized, SSE, AVX etc
MISD : multiple instruction streams, single data stream
MIMD : multiple instruction streams, multiple data streams → modern multicore machines
developer writes a single program that runs on all processes, but computes a subset of the total work
memory is shared locally within SMP (symmetric multiprocessor) nodes but distributed globally across nodes
has accelerators (e.g. GPU) in additional to SMP within a node
send(data, to_proc_i)
recv(data, from_proc_j)
Network | Nodes | Nodes | C | Cost | Di | Diameter | Bisec. Width | |
---|---|---|---|---|
1-D mesh | $k | \(k\) | | \(k-1\) | | \(k-1\) | | \(1\) |
2-D mesh | $k^ | \(k^2\) | | \(2k(k-1)\) | $2(k | \(2(k-1)\) | | \(k\) | |
3-D mesh | $k^ | \(k^3\) | | \(3k^2(k-1)\) | $3 | \(3(k-1)\) | | \(k^2\) | |
n-D mesh | $k^ | \(k^n\) | | \(nk^{n-1}k\) | $n(k- | \(n(k-1)\) | | \(k^{n-1}\) | |
1-D torus | $k | \(k\) | | \(k\) | | \(k/2\) | | \(2\) |
2-D torus | $k^ | \(k^2\) | | \(2k^2\) | | \(k\) | | \(2k\) | |
3-D torus | \(k^3\) | | \(k^3\) | | \(3k^3\) | | \(3k/2\) | | \(2k^2\) |
n-D torus | \(k^n\) | | \(k^n\) | | \(nk^n\) | $ | \(nk/2\) | | \(2k^{n-1}\) | |
hypercube | \(2^k\) | | \(2^k\) | | \(2^k k/2\) | \(k\) | | \(2^{k-1}\) | |
#include <stdio.h>
#include <mpi.h>
int main(int argc, char *argv[]) {
MPI_Init(&argc, &argv);
int rank, size;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
printf ("Hello from process % of %d\n", rank, size);
MPI_Finalize();
return 0;
}
$ mpicc -o hello hello_mpi.c
$ mpirun -np 8 ./hello
$
$ sbatch batch.sh
#!/bin/bash
#SBATCH -J hello # Job name
#SBATCH -o hello.o%j # name of output file (%j expands to jobID)
#SBATCH -N 1 -n 16 # total number of mpi tasks requested
#SBATCH -p normal # Queue name --- normal, development, etc.
#SBATCH -t 00:30:00 # run time (hh:mm:ss)
#SBATCH -A TG-CDA150001 # account
set -x # echo commands
cd $HOME/hello
ibrun tacc_affinity ./hello