#!/bin/sh THREADS= paramfile=$1 shift while getopts ":T:" flag do if [ "$flag" = "T" ]; then if [ -n "$OPTARG" ]; then THREADS=$OPTARG fi fi done if [ -n "$THREADS" ]; then export OMP_NUM_THREADS=$THREADS fi mb_hybrid_openmpi < $paramfile