diff --git a/travis/build_env.sh b/travis/build_env.sh index 325c2a6a54..e4776dc2c1 100755 --- a/travis/build_env.sh +++ b/travis/build_env.sh @@ -148,7 +148,7 @@ if [[ "$os" == "Linux" ]]; then if [[ "$MPI_IMPL" != "intel" ]]; then sudo apt-get -y install "$mpi_libdev" "$mpi_bin" fi - # check for mpif90 command and exit if not present + if [[ "$FC" == "gfortran-11" ]] || [[ "$CC" == "gcc-11" ]]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test sudo apt-get -y install gcc-11 gfortran-11 g++-11 @@ -237,4 +237,8 @@ if [[ "$os" == "Linux" ]]; then which nvfortran fi fi + # check for mpif90 command and exit if not present + if [[ ! $(command -v mpif90) ]]; then echo "mpif90 not present"; exit 1; fi + echo "mpif90 -show output is " `mpif90 -show` || true + echo "which mpif90 output is " `which mpif90` || true fi