#!/bin/sh #/* # * Parallel implementation of 2d heat conduction # * finite difference over a rectangular domain using: # * - Jacobi # * - Gauss-Seidel # * - SOS # * # * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # T_SRC0 @ X - (W/2,H) # | # *******X******* # *.............* # *.............* # *.............* # *.............* # *.............* ~ 0.0 @ all bdy by "X" (W/2,H) # *.............* # *.............* # *.............* # *.............* # *.............* # *************** # # 2D domain - WIDTH x HEIGHT # "X" = T_SRC0 # "*" = 0.0 # "." = internal node suceptible to heating # * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # */ if [ ! -d output ]; then mkdir output else rm output/* fi mpicc -lm bde_2dheat.c -o a.out mpirun -np ${1} -machinefile machinefile a.out echo globalizing output to $$.${1}p.out cat output/* > $$.${1}p.out exit 0