build_all_variants 560 Bytes
Newer Older
gsell's avatar
gsell committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#!/bin/bash

declare -r basedir=$(dirname $0)
source '../../config/Pmodules.conf'

declare -r recipe="${basedir}/$1/build"
shift

if [[ ! -x "${recipe}" ]]; then
	echo "Error: no recipe to build '$1'!"
	exit 1
fi

for cc in "${COMPILER_VERSIONS[@]}"; do
	for mpi in "${MPI_VERSIONS[@]}"; do
		for hdf5 in "${HDF5_VERSIONS[@]}"; do
			"${recipe}" "$@" --with=$cc --with=$mpi --with=$hdf5 || {
				echo "Oops: build failed for:"
				echo "        compile: $cc"
				echo "        mpi:     $mpi"
				echo "        hdf5:    $hdf5"
22
				exit 1
gsell's avatar
gsell committed
23 24 25 26
			}
		done
	done
done