#!/bin/sh

exec 2>&1
set -e

cd regressiontests

echo "========================================================"
echo "Starting regression tests: basic build, single precision"
echo "========================================================"
perl gmxtest.pl all

echo "========================================================"
echo "Starting regression tests: basic build, double precision"
echo "========================================================"
perl gmxtest.pl all -double

echo "==============================================================="
echo "Starting regression tests: MPICH build, single precision (only)"
echo "==============================================================="
perl gmxtest.pl all -np 4 -nosuffix -mdrun mdrun_mpi.mpich -mpirun mpirun.mpich

echo "================================================================="
echo "Starting regression tests: OpenMPI build, single precision (only)"
echo "================================================================="
export OMPI_MCA_rmaps_base_oversubscribe=1
perl gmxtest.pl all -np 4 -nosuffix -mdrun mdrun_mpi.openmpi -mpirun mpirun.openmpi

perl gmxtest.pl clean
