
# The following script builds each executable independently,
# and then runs both simultaneously in parallel

## Cleanup current directory (optional)
rm -r plt* Backtrace.*

## Refresh/remove old executable files (optional)
rm ../Exec_01/main*.ex
rm ../Exec_02/main*.ex

## Build 3D executable
cd ../Exec_01
make -j DIM=3

## Build 2D executable
cd ../Exec_02
make -j DIM=2

## Run both executables together
cd ../Exec_coupled
mpirun -np 8 ../Exec_01/main3d.gnu.MPI.ex inputs : -np 16 ../Exec_02/main2d.gnu.MPI.ex inputs
