#!/bin/bash for i in {1..16}; do printf "runing with $i cores...\n" mpirun -np $i python yt-test.py >& core_$i wait $! done