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

CI: Newer CCache for CUDA #2927

Merged
merged 3 commits into from
Mar 4, 2022
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
4 changes: 3 additions & 1 deletion .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ jobs:
- name: install openPMD-api
run: |
export CEI_SUDO="sudo"
export CEI_TMP="/tmp/cei"
cmake-easyinstall --prefix=/usr/local \
git+https://github.com/openPMD/[email protected] \
-DopenPMD_USE_PYTHON=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_CLI_TOOLS=OFF \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
-DCMAKE_VERBOSE_MAKEFILE=ON
- name: build WarpX
run: |
Expand Down Expand Up @@ -91,7 +93,7 @@ jobs:

git clone https://github.com/AMReX-Codes/amrex.git ../amrex
cd amrex && git checkout --detach 22.03 && cd -
make COMP=gcc QED=FALSE USE_MPI=TRUE USE_GPU=TRUE USE_OMP=FALSE USE_PSATD=TRUE -j 2
make COMP=gcc QED=FALSE USE_MPI=TRUE USE_GPU=TRUE USE_OMP=FALSE USE_PSATD=TRUE USE_CCACHE=TRUE -j 2

build_nvhpc21-9-nvcc:
name: [email protected] NVCC/NVC++ Release [tests]
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/dependencies/icc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ set -eu
sudo curl -L -o /usr/local/bin/cmake-easyinstall https://git.io/JvLxY
sudo chmod a+x /usr/local/bin/cmake-easyinstall
export CEI_SUDO="sudo"
export CEI_TMP="/tmp/cei"

# openPMD-api
CXX=$(which icpc) CC=$(which icc) \
Expand All @@ -44,4 +45,5 @@ CXX=$(which icpc) CC=$(which icc) \
-DopenPMD_USE_PYTHON=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_CLI_TOOLS=OFF
-DBUILD_CLI_TOOLS=OFF \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache)
22 changes: 21 additions & 1 deletion .github/workflows/dependencies/nvcc11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ sudo apt-get -qqq update
sudo apt-get install -y \
build-essential \
ca-certificates \
ccache \
cmake \
gnupg \
libhiredis-dev \
libopenmpi-dev \
libzstd-dev \
ninja-build \
openmpi-bin \
pkg-config \
Expand All @@ -37,7 +38,26 @@ sudo apt-get install -y \
libcurand-dev-11-0
sudo ln -s cuda-11.0 /usr/local/cuda

# if we run out of temporary storage in CI:
#du -sh /usr/local/cuda-11.0
#echo "+++ REDUCING CUDA Toolkit install size +++"
#sudo rm -rf /usr/local/cuda-11.0/targets/x86_64-linux/lib/libcu{fft,pti,rand}_static.a
#sudo rm -rf /usr/local/cuda-11.0/targets/x86_64-linux/lib/libnvperf_host_static.a
#du -sh /usr/local/cuda-11.0/
#df -h

# cmake-easyinstall
#
sudo curl -L -o /usr/local/bin/cmake-easyinstall https://git.io/JvLxY
sudo chmod a+x /usr/local/bin/cmake-easyinstall
export CEI_SUDO="sudo"
export CEI_TMP="/tmp/cei"

# ccache 4.2+
#
cmake-easyinstall --prefix=/usr/local \
git+https://github.com/ccache/[email protected] \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_DOCUMENTATION=OFF \
-DENABLE_TESTING=OFF \
-DWARNINGS_AS_ERRORS=OFF
19 changes: 18 additions & 1 deletion .github/workflows/dependencies/nvhpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ sudo apt-get -qqq update
sudo apt-get install -y \
build-essential \
ca-certificates \
ccache \
cmake \
environment-modules \
gnupg \
libhiredis-dev \
libzstd-dev \
ninja-build \
pkg-config \
wget
Expand All @@ -29,3 +30,19 @@ rm -rf ./nvhpc-21-9_21.9_amd64.deb ./nvhpc-2021_21.9_amd64.deb
# activation via:
# source /etc/profile.d/modules.sh
# module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/21.9

# cmake-easyinstall
#
sudo curl -L -o /usr/local/bin/cmake-easyinstall https://git.io/JvLxY
sudo chmod a+x /usr/local/bin/cmake-easyinstall
export CEI_SUDO="sudo"
export CEI_TMP="/tmp/cei"

# ccache 4.2+
#
cmake-easyinstall --prefix=/usr/local \
git+https://github.com/ccache/[email protected] \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_DOCUMENTATION=OFF \
-DENABLE_TESTING=OFF \
-DWARNINGS_AS_ERRORS=OFF
3 changes: 3 additions & 0 deletions .github/workflows/dependencies/pyfull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,21 @@ sudo apt-get install -y \
sudo curl -L -o /usr/local/bin/cmake-easyinstall https://git.io/JvLxY
sudo chmod a+x /usr/local/bin/cmake-easyinstall
export CEI_SUDO="sudo"
export CEI_TMP="/tmp/cei"

# BLAS++ & LAPACK++
cmake-easyinstall \
--prefix=/usr/local \
git+https://bitbucket.org/icl/blaspp.git \
-Duse_openmp=OFF \
-Dbuild_tests=OFF \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
-DCMAKE_VERBOSE_MAKEFILE=ON

cmake-easyinstall \
--prefix=/usr/local \
git+https://bitbucket.org/icl/lapackpp.git \
-Duse_cmake_find_lapack=ON \
-Dbuild_tests=OFF \
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \
-DCMAKE_VERBOSE_MAKEFILE=ON
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: ~/.ccache
path: /Users/runner/Library/Caches/ccache
key: ccache-macos-appleclang-${{ hashFiles('.github/workflows/macos.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}
restore-keys: |
ccache-macos-appleclang-${{ hashFiles('.github/workflows/macos.yml') }}-
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ jobs:
- name: install dependencies
run: |
.github/workflows/dependencies/pyfull.sh
- name: CCache Cache
uses: actions/cache@v2
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: ~/.ccache
key: ccache-openmp-pyfull-${{ hashFiles('.github/workflows/ubuntu.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}
restore-keys: |
ccache-openmp-pyfull-${{ hashFiles('.github/workflows/ubuntu.yml') }}-
ccache-openmp-pyfull-
- name: build WarpX
run: |
python3 -m pip install --upgrade pip setuptools wheel
Expand Down