Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2082: Allow for custom compiler version in NVCC builds #2103

Merged
merged 7 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ARCH=amd64
UBUNTU=22.04
ULIMIT_CORE=0
COMPILER=gcc-12
HOST_COMPILER=gcc-12
COMPILER_TYPE=gnu
PROXY=
CACHE=
Expand Down
1 change: 1 addition & 0 deletions ci/azure/azure-clang-10-ubuntu-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ variables:
UBUNTU: 20.04
COMPILER_TYPE: clang
COMPILER: clang-10

BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 0
Expand Down
1 change: 1 addition & 0 deletions ci/azure/azure-clang-11-ubuntu-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ variables:
UBUNTU: 22.04
COMPILER_TYPE: clang
COMPILER: clang-11

BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 0
Expand Down
1 change: 1 addition & 0 deletions ci/azure/azure-clang-12-ubuntu-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ variables:
UBUNTU: 22.04
COMPILER_TYPE: clang
COMPILER: clang-12

BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 0
Expand Down
1 change: 1 addition & 0 deletions ci/azure/azure-clang-13-ubuntu-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ variables:
UBUNTU: 22.04
COMPILER_TYPE: clang
COMPILER: clang-13

BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 0
Expand Down
1 change: 1 addition & 0 deletions ci/azure/azure-clang-14-ubuntu-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ variables:
UBUNTU: 22.04
COMPILER_TYPE: clang
COMPILER: clang-14

BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 0
Expand Down
1 change: 1 addition & 0 deletions ci/azure/azure-clang-9-ubuntu-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ variables:
UBUNTU: 20.04
COMPILER_TYPE: clang
COMPILER: clang-9

BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 0
Expand Down
1 change: 1 addition & 0 deletions ci/azure/azure-clang-alpine-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ variables:

COMPILER_TYPE: clang
COMPILER: clang-13

BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 0
Expand Down
1 change: 1 addition & 0 deletions ci/azure/azure-gcc-10-ubuntu-openmpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ variables:
UBUNTU: 20.04
COMPILER_TYPE: gnu
COMPILER: gcc-10

BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 0
Expand Down
1 change: 1 addition & 0 deletions ci/azure/azure-gcc-11-ubuntu-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ variables:
UBUNTU: 22.04
COMPILER_TYPE: gnu
COMPILER: gcc-11

BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 1
Expand Down
1 change: 1 addition & 0 deletions ci/azure/azure-gcc-12-ubuntu-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ variables:
UBUNTU: 22.04
COMPILER_TYPE: gnu
COMPILER: gcc-12

BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 0
Expand Down
1 change: 1 addition & 0 deletions ci/azure/azure-gcc-8-ubuntu-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ variables:
UBUNTU: 18.04
COMPILER_TYPE: gnu
COMPILER: gcc-8

BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 0
Expand Down
1 change: 1 addition & 0 deletions ci/azure/azure-gcc-9-ubuntu-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ variables:
UBUNTU: 20.04
COMPILER_TYPE: gnu
COMPILER: gcc-9

BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 0
Expand Down
1 change: 1 addition & 0 deletions ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ variables:
UBUNTU: 20.04
COMPILER_TYPE: intel-oneapi
COMPILER: icpc

BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 0
Expand Down
1 change: 1 addition & 0 deletions ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ variables:
UBUNTU: 20.04
COMPILER_TYPE: intel-oneapi
COMPILER: icpx

BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 0
Expand Down
3 changes: 2 additions & 1 deletion ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
############## Warning this is a generated file---do not modify ###############
###############################################################################

name: PR tests (nvidia cuda 11.2, ubuntu, mpich)
name: PR tests (nvidia cuda 11.2, gcc-9, ubuntu, mpich)

trigger:
branches:
Expand All @@ -28,6 +28,7 @@ variables:
UBUNTU: 20.04
COMPILER_TYPE: nvidia
COMPILER: 11.2.0
HOST_COMPILER: gcc-9
BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 0
Expand Down
3 changes: 2 additions & 1 deletion ci/azure/azure-nvidia-12-ubuntu-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
############## Warning this is a generated file---do not modify ###############
###############################################################################

name: PR tests (nvidia cuda 12.1.0, ubuntu, mpich)
name: PR tests (nvidia cuda 12.1.0, gcc-9, ubuntu, mpich)

trigger:
branches:
Expand All @@ -28,6 +28,7 @@ variables:
UBUNTU: 20.04
COMPILER_TYPE: nvidia
COMPILER: 12.1.0
HOST_COMPILER: gcc-9
BUILD_TYPE: release
ULIMIT_CORE: 0
CODE_COVERAGE: 0
Expand Down
7 changes: 7 additions & 0 deletions ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ fi
mkdir -p "${build_dir}"
pushd "${build_dir}"

# Match `nvcc_wrapper` and also a path ending with 'nvcc_wrapper'
case $CXX in
*nvcc_wrapper)
NVCC_WRAPPER_DEFAULT_COMPILER="$(which g++-"$(echo "${HOST_COMPILER}" | cut -d- -f2)")" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work with Clang or Intel as the host compiler, but I don't think we care right now. Just noting it.

&& export NVCC_WRAPPER_DEFAULT_COMPILER;;
esac

if test -d "checkpoint"
then
rm -Rf checkpoint
Expand Down
9 changes: 8 additions & 1 deletion ci/docker/ubuntu-nvidia-cpp.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@ ARG arch=amd64
ARG ubuntu=20.04
FROM --platform=${arch} nvidia/cuda:${compiler}-devel-ubuntu${ubuntu} as base

ARG host_compiler=gcc-9
ARG proxy=""

ENV https_proxy=${proxy} \
http_proxy=${proxy}

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y -q && \
RUN apt-get update -y && \
apt-get install -y software-properties-common --no-install-recommends && \
add-apt-repository -y ppa:ubuntu-toolchain-r/test && \
apt remove -y software-properties-common && \
apt-get install -y --no-install-recommends \
ca-certificates \
g++-$(echo ${host_compiler} | cut -d- -f2) \
curl \
less \
git \
Expand All @@ -28,6 +33,7 @@ RUN apt-get update -y -q && \
libunwind-dev \
valgrind \
ccache && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand All @@ -48,6 +54,7 @@ RUN mkdir -p /nvcc_wrapper/build && \
chmod +x /nvcc_wrapper/build/nvcc_wrapper

ENV MPI_EXTRA_FLAGS="" \
HOST_COMPILER=${host_compiler} \
PATH=/usr/lib/ccache/:/nvcc_wrapper/build:$PATH \
CXX=nvcc_wrapper

Expand Down
Loading