job-1-check.sh 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. #!/bin/sh
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2013-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  5. #
  6. # StarPU is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU Lesser General Public License as published by
  8. # the Free Software Foundation; either version 2.1 of the License, or (at
  9. # your option) any later version.
  10. #
  11. # StarPU is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. #
  15. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. #
  17. set -e
  18. set -x
  19. ulimit -c unlimited
  20. export PKG_CONFIG_PATH=/home/ci/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
  21. export LD_LIBRARY_PATH=/home/ci/usr/local/lib:$LD_LIBRARY_PATH
  22. tarball=$(ls -tr starpu-*.tar.gz | tail -1)
  23. if test -z "$tarball"
  24. then
  25. echo Error. No tar.gz file
  26. ls
  27. pwd
  28. exit 1
  29. fi
  30. basename=$(basename $tarball .tar.gz)
  31. export STARPU_HOME=$PWD/$basename/home
  32. mkdir -p $basename
  33. cd $basename
  34. (
  35. echo "oldPWD=\${PWD}"
  36. env|grep -v LS_COLORS | grep '^[A-Z]'|grep -v BASH_FUNC | grep '=' | sed 's/=/=\"/'| sed 's/$/\"/' | sed 's/^/export /'
  37. echo "cd \$oldPWD"
  38. ) > ${PWD}/env
  39. test -d $basename && chmod -R u+rwX $basename && rm -rf $basename
  40. tar xfz ../$tarball
  41. touch --date="last hour" $(find $basename) || true
  42. cd $basename
  43. mkdir build
  44. cd build
  45. STARPU_CONFIGURE_OPTIONS=""
  46. suname=$(uname)
  47. if test "$suname" = "Darwin"
  48. then
  49. STARPU_CONFIGURE_OPTIONS="--without-hwloc"
  50. fi
  51. if test "$suname" = "OpenBSD"
  52. then
  53. STARPU_CONFIGURE_OPTIONS="--without-hwloc --disable-mlr"
  54. fi
  55. if test "$suname" = "FreeBSD"
  56. then
  57. STARPU_CONFIGURE_OPTIONS="--disable-fortran"
  58. fi
  59. export CC=gcc
  60. set +e
  61. mpiexec -oversubscribe pwd 2>/dev/null
  62. ret=$?
  63. set -e
  64. ARGS=""
  65. if test "$ret" = "0"
  66. then
  67. ARGS="--with-mpiexec-args=-oversubscribe"
  68. fi
  69. CONFIGURE_OPTIONS="--enable-debug --enable-verbose --enable-mpi-check --disable-build-doc $ARGS"
  70. CONFIGURE_CHECK=""
  71. day=$(date +%u)
  72. if test $day -le 5
  73. then
  74. CONFIGURE_CHECK="--enable-quick-check"
  75. #else
  76. # we do a normal check, a long check takes too long on VM nodes
  77. fi
  78. ../configure $CONFIGURE_OPTIONS $CONFIGURE_CHECK $STARPU_CONFIGURE_OPTIONS $STARPU_USER_CONFIGURE_OPTIONS
  79. export STARPU_TIMEOUT_ENV=1800
  80. export MPIEXEC_TIMEOUT=1800
  81. make -j4
  82. (make -k check || true) 2>&1 | tee ../check_$$
  83. make showsuite
  84. #grep "^FAIL:" ../check_$$ || true
  85. make clean
  86. grep "^FAIL:" ../check_$$ || true
  87. echo "Running on $(uname -a)"
  88. exit $(grep "^FAIL:" ../check_$$ | wc -l)