diff --git a/ci/config.yaml b/ci/config.yaml index 2a8e7346..f07ef432 100644 --- a/ci/config.yaml +++ b/ci/config.yaml @@ -47,6 +47,7 @@ defaults: CXX: ~ GCOV: gcov CMAKE_CXX_STANDARD: 17 + CMAKE_BUILD_TYPE: Release setup: macos-14-clang-14: @@ -68,29 +69,20 @@ setup: GCOV: llvm-gcov deps: packages: !extend [ *apk-packages, clang, clang-dev ] - mpich: ['3.3.2', '-j4', '', 'clang', 'clang++'] + mpich: ['3.3.2', '-j4'] # setup from vt - amd64-ubuntu-20.04-gcc-9-12.2.0-cpp: - label: vt, gcc-9, ubuntu, cuda 12.2, mpich, zoltan - env: - <<: *env - CC: gcc-9 - CXX: g++-9 - # deps and versions to find in vt + amd64-ubuntu-20.04-gcc-9-12.2.0-cpp: &amd64-ubuntu-20_04-gcc-9-12_2_0-cpp + label: vt, gcc-9, ubuntu, cuda 12.2, mpich + env: { <<: *env, CC: gcc-9, CXX: g++9 } deps: packages: !extend [ *apt-packages, gcc-9, g++-9 ] cmake: *cmake-args # 3.23.4 in vt but seems to be an error with vtk tiff build because error in Cmake CheckSize. - openmpi: *openmpi-args - zoltan: *zoltan-args - mpich: *mpich-args + mpich: ['3.3.2', '-j4'] + nvcc_wrapper: ~ amd64-ubuntu-20.04-gcc-9-11.2.2-cpp: - label: vt, gcc-9, ubuntu, cuda 11.2, mpich, zoltan - env: - <<: *env - CC: gcc-9 - CXX: g++-9 + <<: *amd64-ubuntu-20_04-gcc-9-12_2_0-cpp # TODO: add the following # : @@ -194,7 +186,7 @@ images: dockerfile: ubuntu-cpp-base.dockerfile arch: linux/amd64 base: nvidia/cuda:11.2.2-devel-ubuntu20.04 - setup: ubuntu-20.04-gcc-9-11.2.2-cpp + setup: amd64-ubuntu-20.04-gcc-9-11.2.2-cpp # TODO: add the following diff --git a/ci/docker/base.dockerfile b/ci/docker/base.dockerfile index fab10c5f..154d3570 100644 --- a/ci/docker/base.dockerfile +++ b/ci/docker/base.dockerfile @@ -18,18 +18,28 @@ ARG GCOV ARG MPICH_CC ARG MPICH_CXX +ARG CMAKE_BUILD_TYPE +ARG CMAKE_CXX_STANDARD + # Environment -ENV PATH=/opt/cmake/bin:$PATH -ENV CC=$CC -ENV CXX=$CXX -ENV MPICH_CC=$MPICH_CC -ENV MPICH_CXX=$MPICH_CXX -ENV GCOV=$GCOV -ENV CONDA_INSTALL_DIR=/opt/conda -ENV CONDA_AUTO_ACTIVATE_BASE=false -ENV VTK_DIR=/opt/vtk/build -ENV DOCKER_RUN=1 +ENV DOCKER_RUN=1 \ + CC=$CC \ + CXX=$CXX \ + MPICH_CC=$MPICH_CC \ + MPICH_CXX=$MPICH_CXX \ + GCOV=$GCOV \ + \ + CONDA_INSTALL_DIR=/opt/conda \ + CONDA_AUTO_ACTIVATE_BASE=false \ + \ + VTK_DIR=/opt/vtk/build \ + \ + LESSCHARSET=utf-8 \ + \ + PATH=/opt/cmake/bin:/opt/nvcc_wrapper/bin:/opt/vtk/bin:$PATH COPY ci/shared/scripts/setup-${SETUP_ID}.sh setup.sh RUN chmod +x setup.sh && ./setup.sh + +RUN echo "CXX=$CXX" diff --git a/ci/setup-template.sh b/ci/setup-template.sh index 881a2960..37a29501 100644 --- a/ci/setup-template.sh +++ b/ci/setup-template.sh @@ -43,6 +43,8 @@ echo "> Setup Id (SETUP_ID): $SETUP_ID" echo "> C Compiler (CC): $CC" echo "> C++ Compiler (CXX): $CXX" echo "> Fortran Compiler (FC): $FC" +echo "> Build type (CMAKE_BUILD_TYPE): $CMAKE_BUILD_TYPE" +echo "> C++ Standard (CMAKE_CXX_STANDARD): $CMAKE_CXX_STANDARD" echo "/////////////////////////////////////////////////" @@ -76,7 +78,7 @@ ls -l # Remove install scripts rm -rf $SCRIPTS_INSTALL_DIR -if [ DOCKER_RUN == "1" ]; then +if [ "DOCKER_RUN" == "1" ]; then rm -rf /var/lib/apt/lists/* fi @@ -93,3 +95,8 @@ then else echo "No cleanup instructions defined for OS=$OS." fi + +if [ -e "opt/nvcc_wrapper/bin/nvcc_wrapper" ] +then + export CXX=nvcc_wrapper +fi diff --git a/ci/shared/scripts/deps/mpich.sh b/ci/shared/scripts/deps/mpich.sh index c3c9da7d..5b849ed3 100644 --- a/ci/shared/scripts/deps/mpich.sh +++ b/ci/shared/scripts/deps/mpich.sh @@ -13,9 +13,6 @@ mpich_name="mpich-${mpich_version}" mpich_tar_name="${mpich_name}.tar.gz" make_flags="$2" installation_prefix="${3-}" -make_cc="${4:-$CC}" -make_cxx="${5:-$CXX}" -make_fc="${6:-$FC}" echo "${mpich_version}" echo "${mpich_name}" @@ -35,9 +32,9 @@ cd ${mpich_name} --enable-fast=all \ --enable-g=none \ --enable-timing=none \ - CC=$make_cc \ - CXX=$make_cxx \ - FC=$make_fc \ + CC=$CC \ + CXX=$CXX \ + FC=$FC \ ${installation_prefix:+ --prefix"=${installation_prefix}"} make ${make_flags} make install diff --git a/ci/shared/scripts/deps/nvcc_wrapper.sh b/ci/shared/scripts/deps/nvcc_wrapper.sh new file mode 100644 index 00000000..4f87a241 --- /dev/null +++ b/ci/shared/scripts/deps/nvcc_wrapper.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -exo pipefail + +mkdir -p /opt/nvcc_wrapper/bin + +wget https://raw.githubusercontent.com/kokkos/kokkos/master/bin/nvcc_wrapper -P /opt/nvcc_wrapper/bin +chmod +x /opt/nvcc_wrapper/bin/nvcc_wrapper + +which nvcc_wrapper \ No newline at end of file diff --git a/ci/shared/scripts/setup-amd64-alpine-clang-13-clang-13-cpp.sh b/ci/shared/scripts/setup-amd64-alpine-clang-13-clang-13-cpp.sh index 04a9feef..a0915b89 100644 --- a/ci/shared/scripts/setup-amd64-alpine-clang-13-clang-13-cpp.sh +++ b/ci/shared/scripts/setup-amd64-alpine-clang-13-clang-13-cpp.sh @@ -43,6 +43,8 @@ echo "> Setup Id (SETUP_ID): $SETUP_ID" echo "> C Compiler (CC): $CC" echo "> C++ Compiler (CXX): $CXX" echo "> Fortran Compiler (FC): $FC" +echo "> Build type (CMAKE_BUILD_TYPE): $CMAKE_BUILD_TYPE" +echo "> C++ Standard (CMAKE_CXX_STANDARD): $CMAKE_CXX_STANDARD" echo "/////////////////////////////////////////////////" @@ -74,11 +76,11 @@ wget $SCRIPTS_DEPS_URL/mpich.sh chmod u+x *.sh ls -l ./packages.sh "alpine-sdk" "autoconf" "automake" "binutils-dev" "ccache" "cmake" "dpkg" "libdwarf-dev" "libunwind-dev" "libtool" "linux-headers" "m4" "make" "ninja" "zlib" "zlib-dev" "clang" "clang-dev" -./mpich.sh "3.3.2" "-j4" "" "clang" "clang++" +./mpich.sh "3.3.2" "-j4" # Remove install scripts rm -rf $SCRIPTS_INSTALL_DIR -if [ DOCKER_RUN == "1" ]; then +if [ "DOCKER_RUN" == "1" ]; then rm -rf /var/lib/apt/lists/* fi @@ -95,3 +97,8 @@ then else echo "No cleanup instructions defined for OS=$OS." fi + +if [ -e "opt/nvcc_wrapper/bin/nvcc_wrapper" ] +then + export CXX=nvcc_wrapper +fi diff --git a/ci/shared/scripts/setup-amd64-ubuntu-20.04-gcc-9-11.2.2-cpp.sh b/ci/shared/scripts/setup-amd64-ubuntu-20.04-gcc-9-11.2.2-cpp.sh index d74a2892..9e5c5128 100644 --- a/ci/shared/scripts/setup-amd64-ubuntu-20.04-gcc-9-11.2.2-cpp.sh +++ b/ci/shared/scripts/setup-amd64-ubuntu-20.04-gcc-9-11.2.2-cpp.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh # -# vt, gcc-9, ubuntu, cuda 11.2, mpich, zoltan - Installation +# vt, gcc-9, ubuntu, cuda 12.2, mpich - Installation # Note: requires # - `git` and `wget` installed. # - run as root @@ -43,6 +43,8 @@ echo "> Setup Id (SETUP_ID): $SETUP_ID" echo "> C Compiler (CC): $CC" echo "> C++ Compiler (CXX): $CXX" echo "> Fortran Compiler (FC): $FC" +echo "> Build type (CMAKE_BUILD_TYPE): $CMAKE_BUILD_TYPE" +echo "> C++ Standard (CMAKE_CXX_STANDARD): $CMAKE_CXX_STANDARD" echo "/////////////////////////////////////////////////" @@ -68,15 +70,21 @@ mkdir -p $SCRIPTS_INSTALL_DIR mkdir -p $SCRIPTS_INSTALL_DIR/deps # 1. Download dependency installation script cd $SCRIPTS_INSTALL_DIR/deps - +wget $SCRIPTS_DEPS_URL/packages.sh +wget $SCRIPTS_DEPS_URL/cmake.sh +wget $SCRIPTS_DEPS_URL/mpich.sh +wget $SCRIPTS_DEPS_URL/nvcc_wrapper.sh # 2. Install dependency chmod u+x *.sh ls -l - +./packages.sh "curl" "jq" "less" "libomp5" "libunwind-dev make-guile" "ninja-build" "valgrind" "zlib1g" "zlib1g-dev" "ccache" "python3" "gcc-9" "g++-9" +./cmake.sh "3.30.3" +./mpich.sh "3.3.2" "-j4" +./nvcc_wrapper.sh "None" # Remove install scripts rm -rf $SCRIPTS_INSTALL_DIR -if [ DOCKER_RUN == "1" ]; then +if [ "DOCKER_RUN" == "1" ]; then rm -rf /var/lib/apt/lists/* fi @@ -93,3 +101,8 @@ then else echo "No cleanup instructions defined for OS=$OS." fi + +if [ -e "opt/nvcc_wrapper/bin/nvcc_wrapper" ] +then + export CXX=nvcc_wrapper +fi diff --git a/ci/shared/scripts/setup-amd64-ubuntu-20.04-gcc-9-12.2.0-cpp.sh b/ci/shared/scripts/setup-amd64-ubuntu-20.04-gcc-9-12.2.0-cpp.sh index 72817cea..9e5c5128 100644 --- a/ci/shared/scripts/setup-amd64-ubuntu-20.04-gcc-9-12.2.0-cpp.sh +++ b/ci/shared/scripts/setup-amd64-ubuntu-20.04-gcc-9-12.2.0-cpp.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh # -# vt, gcc-9, ubuntu, cuda 12.2, mpich, zoltan - Installation +# vt, gcc-9, ubuntu, cuda 12.2, mpich - Installation # Note: requires # - `git` and `wget` installed. # - run as root @@ -43,6 +43,8 @@ echo "> Setup Id (SETUP_ID): $SETUP_ID" echo "> C Compiler (CC): $CC" echo "> C++ Compiler (CXX): $CXX" echo "> Fortran Compiler (FC): $FC" +echo "> Build type (CMAKE_BUILD_TYPE): $CMAKE_BUILD_TYPE" +echo "> C++ Standard (CMAKE_CXX_STANDARD): $CMAKE_CXX_STANDARD" echo "/////////////////////////////////////////////////" @@ -70,21 +72,19 @@ mkdir -p $SCRIPTS_INSTALL_DIR/deps cd $SCRIPTS_INSTALL_DIR/deps wget $SCRIPTS_DEPS_URL/packages.sh wget $SCRIPTS_DEPS_URL/cmake.sh -wget $SCRIPTS_DEPS_URL/openmpi.sh -wget $SCRIPTS_DEPS_URL/zoltan.sh wget $SCRIPTS_DEPS_URL/mpich.sh +wget $SCRIPTS_DEPS_URL/nvcc_wrapper.sh # 2. Install dependency chmod u+x *.sh ls -l ./packages.sh "curl" "jq" "less" "libomp5" "libunwind-dev make-guile" "ninja-build" "valgrind" "zlib1g" "zlib1g-dev" "ccache" "python3" "gcc-9" "g++-9" ./cmake.sh "3.30.3" -./openmpi.sh "v5.0" "5.0.4" -./zoltan.sh "-j4'" "/trilinos-install" -./mpich.sh "4.0.2" "-j4" +./mpich.sh "3.3.2" "-j4" +./nvcc_wrapper.sh "None" # Remove install scripts rm -rf $SCRIPTS_INSTALL_DIR -if [ DOCKER_RUN == "1" ]; then +if [ "DOCKER_RUN" == "1" ]; then rm -rf /var/lib/apt/lists/* fi @@ -101,3 +101,8 @@ then else echo "No cleanup instructions defined for OS=$OS." fi + +if [ -e "opt/nvcc_wrapper/bin/nvcc_wrapper" ] +then + export CXX=nvcc_wrapper +fi diff --git a/ci/shared/scripts/setup-macos-14-clang-14.sh b/ci/shared/scripts/setup-macos-14-clang-14.sh index aa628b14..cbf1e96f 100644 --- a/ci/shared/scripts/setup-macos-14-clang-14.sh +++ b/ci/shared/scripts/setup-macos-14-clang-14.sh @@ -43,6 +43,8 @@ echo "> Setup Id (SETUP_ID): $SETUP_ID" echo "> C Compiler (CC): $CC" echo "> C++ Compiler (CXX): $CXX" echo "> Fortran Compiler (FC): $FC" +echo "> Build type (CMAKE_BUILD_TYPE): $CMAKE_BUILD_TYPE" +echo "> C++ Standard (CMAKE_CXX_STANDARD): $CMAKE_CXX_STANDARD" echo "/////////////////////////////////////////////////" @@ -76,7 +78,7 @@ ls -l # Remove install scripts rm -rf $SCRIPTS_INSTALL_DIR -if [ DOCKER_RUN == "1" ]; then +if [ "DOCKER_RUN" == "1" ]; then rm -rf /var/lib/apt/lists/* fi @@ -93,3 +95,8 @@ then else echo "No cleanup instructions defined for OS=$OS." fi + +if [ -e "opt/nvcc_wrapper/bin/nvcc_wrapper" ] +then + export CXX=nvcc_wrapper +fi diff --git a/ci/shared/scripts/setup-ubuntu-22.04-clang-11-vtk-9.2.2-py-3.all.sh b/ci/shared/scripts/setup-ubuntu-22.04-clang-11-vtk-9.2.2-py-3.all.sh index c0ef2a59..dd34abe3 100644 --- a/ci/shared/scripts/setup-ubuntu-22.04-clang-11-vtk-9.2.2-py-3.all.sh +++ b/ci/shared/scripts/setup-ubuntu-22.04-clang-11-vtk-9.2.2-py-3.all.sh @@ -43,6 +43,8 @@ echo "> Setup Id (SETUP_ID): $SETUP_ID" echo "> C Compiler (CC): $CC" echo "> C++ Compiler (CXX): $CXX" echo "> Fortran Compiler (FC): $FC" +echo "> Build type (CMAKE_BUILD_TYPE): $CMAKE_BUILD_TYPE" +echo "> C++ Standard (CMAKE_CXX_STANDARD): $CMAKE_CXX_STANDARD" echo "/////////////////////////////////////////////////" @@ -90,7 +92,7 @@ ls -l # Remove install scripts rm -rf $SCRIPTS_INSTALL_DIR -if [ DOCKER_RUN == "1" ]; then +if [ "DOCKER_RUN" == "1" ]; then rm -rf /var/lib/apt/lists/* fi @@ -107,3 +109,8 @@ then else echo "No cleanup instructions defined for OS=$OS." fi + +if [ -e "opt/nvcc_wrapper/bin/nvcc_wrapper" ] +then + export CXX=nvcc_wrapper +fi diff --git a/ci/shared/scripts/setup-ubuntu-22.04-gcc-11-vtk-9.2.2-py-3.all.sh b/ci/shared/scripts/setup-ubuntu-22.04-gcc-11-vtk-9.2.2-py-3.all.sh index 99da5f0f..93b31054 100644 --- a/ci/shared/scripts/setup-ubuntu-22.04-gcc-11-vtk-9.2.2-py-3.all.sh +++ b/ci/shared/scripts/setup-ubuntu-22.04-gcc-11-vtk-9.2.2-py-3.all.sh @@ -43,6 +43,8 @@ echo "> Setup Id (SETUP_ID): $SETUP_ID" echo "> C Compiler (CC): $CC" echo "> C++ Compiler (CXX): $CXX" echo "> Fortran Compiler (FC): $FC" +echo "> Build type (CMAKE_BUILD_TYPE): $CMAKE_BUILD_TYPE" +echo "> C++ Standard (CMAKE_CXX_STANDARD): $CMAKE_CXX_STANDARD" echo "/////////////////////////////////////////////////" @@ -90,7 +92,7 @@ ls -l # Remove install scripts rm -rf $SCRIPTS_INSTALL_DIR -if [ DOCKER_RUN == "1" ]; then +if [ "DOCKER_RUN" == "1" ]; then rm -rf /var/lib/apt/lists/* fi @@ -107,3 +109,8 @@ then else echo "No cleanup instructions defined for OS=$OS." fi + +if [ -e "opt/nvcc_wrapper/bin/nvcc_wrapper" ] +then + export CXX=nvcc_wrapper +fi diff --git a/ci/shared/scripts/setup-ubuntu-22.04-gcc-12-vtk-9.3.0-py-3.all.sh b/ci/shared/scripts/setup-ubuntu-22.04-gcc-12-vtk-9.3.0-py-3.all.sh index c7bc79d8..8a5e4c51 100644 --- a/ci/shared/scripts/setup-ubuntu-22.04-gcc-12-vtk-9.3.0-py-3.all.sh +++ b/ci/shared/scripts/setup-ubuntu-22.04-gcc-12-vtk-9.3.0-py-3.all.sh @@ -43,6 +43,8 @@ echo "> Setup Id (SETUP_ID): $SETUP_ID" echo "> C Compiler (CC): $CC" echo "> C++ Compiler (CXX): $CXX" echo "> Fortran Compiler (FC): $FC" +echo "> Build type (CMAKE_BUILD_TYPE): $CMAKE_BUILD_TYPE" +echo "> C++ Standard (CMAKE_CXX_STANDARD): $CMAKE_CXX_STANDARD" echo "/////////////////////////////////////////////////" @@ -90,7 +92,7 @@ ls -l # Remove install scripts rm -rf $SCRIPTS_INSTALL_DIR -if [ DOCKER_RUN == "1" ]; then +if [ "DOCKER_RUN" == "1" ]; then rm -rf /var/lib/apt/lists/* fi @@ -107,3 +109,8 @@ then else echo "No cleanup instructions defined for OS=$OS." fi + +if [ -e "opt/nvcc_wrapper/bin/nvcc_wrapper" ] +then + export CXX=nvcc_wrapper +fi diff --git a/ci/shared/scripts/setup-ubuntu-24.04-gcc-13-vtk-9.3.1-py-3.all.sh b/ci/shared/scripts/setup-ubuntu-24.04-gcc-13-vtk-9.3.1-py-3.all.sh index 2f3acab8..7e3de31d 100644 --- a/ci/shared/scripts/setup-ubuntu-24.04-gcc-13-vtk-9.3.1-py-3.all.sh +++ b/ci/shared/scripts/setup-ubuntu-24.04-gcc-13-vtk-9.3.1-py-3.all.sh @@ -43,6 +43,8 @@ echo "> Setup Id (SETUP_ID): $SETUP_ID" echo "> C Compiler (CC): $CC" echo "> C++ Compiler (CXX): $CXX" echo "> Fortran Compiler (FC): $FC" +echo "> Build type (CMAKE_BUILD_TYPE): $CMAKE_BUILD_TYPE" +echo "> C++ Standard (CMAKE_CXX_STANDARD): $CMAKE_CXX_STANDARD" echo "/////////////////////////////////////////////////" @@ -90,7 +92,7 @@ ls -l # Remove install scripts rm -rf $SCRIPTS_INSTALL_DIR -if [ DOCKER_RUN == "1" ]; then +if [ "DOCKER_RUN" == "1" ]; then rm -rf /var/lib/apt/lists/* fi @@ -107,3 +109,8 @@ then else echo "No cleanup instructions defined for OS=$OS." fi + +if [ -e "opt/nvcc_wrapper/bin/nvcc_wrapper" ] +then + export CXX=nvcc_wrapper +fi