#!./common/bats/bin/bats
# -*-sh-*-

load ./common/test_helper_functions
source ./common/functions || exit 1

if [ -s ./common/TEST_ENV ];then
    source ./common/TEST_ENV
fi

check_rms
rm=$RESOURCE_MANAGER

NODES=2
TASKS=8
ARGS=8

module load mpi4py

@test "[dev-tools/mpi4py] python hello world ($rm/$LMOD_FAMILY_COMPILER/$LMOD_FAMILY_MPI)" {
    if [ ! -s helloworld.py ];then
    flunk "helloworld.py does not exist"
    fi

    run_mpi_binary "python helloworld.py" $ARGS $NODES $TASKS
    assert_success
}
