-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to use caching for as much as possible on Azure. This might help to reuse AMReX objects between our weekly updates. It might also be just way too large and get evicted quickly.
- Loading branch information
Showing
2 changed files
with
49 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,10 @@ jobs: | |
WARPX_CI_NUM_MAKE_JOBS: 2 | ||
WARPX_CI_CCACHE: 'TRUE' | ||
WARPX_CI_OPENPMD: 'TRUE' | ||
FFTW_HOME: '/usr/' | ||
BLASPP_HOME: '/usr/local/' | ||
LAPACKPP_HOME: '/usr/local/' | ||
WARPX_CI_TMP: '/tmp/ci' | ||
FFTW_HOME: '/usr' | ||
BLASPP_HOME: '/usr/local' | ||
LAPACKPP_HOME: '/usr/local' | ||
OMP_NUM_THREADS: 1 | ||
|
||
strategy: | ||
|
@@ -42,12 +43,39 @@ jobs: | |
timeoutInMinutes: 90 | ||
|
||
steps: | ||
- script: | | ||
# set up caches: | ||
# - once stored under a key, they become immutable (even if cache content changes) | ||
# - for a refresh the key has to change, e.g., hash of a tracked file in the key | ||
- task: Cache@2 | ||
inputs: | ||
key: 'Ccache | "$(System.JobName)" | cmake/dependencies/AMReX.cmake | run_test.sh' | ||
restoreKeys: | | ||
Ccache | "$(System.JobName)" | cmake/dependencies/AMReX.cmake | run_test.sh | ||
Ccache | "$(System.JobName)" | cmake/dependencies/AMReX.cmake | ||
Ccache | "$(System.JobName)" | ||
Ccache | ||
path: /home/vsts/.ccache | ||
cacheHitVar: CCACHE_CACHE_RESTORED | ||
displayName: Cache Ccache Objects | ||
|
||
- task: Cache@2 | ||
inputs: | ||
key: 'Python3 | "$(System.JobName)" | run_test.sh' | ||
restoreKeys: | | ||
Python3 | "$(System.JobName)" | run_test.sh | ||
Python3 | "$(System.JobName)" | ||
Python3 | ||
path: /home/vsts/.local/lib/python3.8 | ||
cacheHitVar: PYTHON38_CACHE_RESTORED | ||
displayName: Cache Python Libraries | ||
|
||
- bash: | | ||
cat /proc/cpuinfo | grep "model name" | sort -u | ||
sudo apt update | ||
df -h | ||
sudo apt install -y ccache gcc gfortran g++ openmpi-bin libopenmpi-dev \ | ||
libfftw3-dev libfftw3-mpi-dev libhdf5-openmpi-dev pkg-config make \ | ||
python3 python3-pip python3-venv python3-setuptools libblas-dev liblapack-dev | ||
ccache --set-config=max_size=10.0G | ||
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2 | ||
sudo update-alternatives --set python /usr/bin/python3 | ||
python -m pip install --upgrade pip | ||
|
@@ -58,21 +86,30 @@ jobs: | |
export PATH="$HOME/.local/bin:$PATH" | ||
python -m pip install --upgrade matplotlib mpi4py numpy scipy yt | ||
export CEI_SUDO="sudo" | ||
export CEI_TMP="/tmp/cei" | ||
sudo curl -L -o /usr/local/bin/cmake-easyinstall https://git.io/JvLxY | ||
sudo chmod a+x /usr/local/bin/cmake-easyinstall | ||
if [ "${WARPX_CI_OPENPMD:-FALSE}" == "TRUE" ]; then | ||
cmake-easyinstall --prefix=/usr/local git+https://github.com/openPMD/[email protected] \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \ | ||
-DopenPMD_USE_PYTHON=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DBUILD_CLI_TOOLS=OFF | ||
python -m pip install --upgrade openpmd-api | ||
fi | ||
if [[ "${WARPX_CI_RZ_OR_NOMPI:-FALSE}" == "TRUE" || "${WARPX_CI_PYTHON_MAIN:-FALSE}" == "TRUE" ]]; then | ||
cmake-easyinstall --prefix=/usr/local git+https://bitbucket.org/icl/blaspp.git \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \ | ||
-Duse_openmp=OFF -Dbuild_tests=OFF -DCMAKE_VERBOSE_MAKEFILE=ON | ||
cmake-easyinstall --prefix=/usr/local git+https://bitbucket.org/icl/lapackpp.git \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \ | ||
-Duse_cmake_find_lapack=ON -Dbuild_tests=OFF -DCMAKE_VERBOSE_MAKEFILE=ON | ||
fi | ||
df -h | ||
displayName: 'Install dependencies' | ||
# condition: eq(variables.CCACHE_CACHE_RESTORED, 'false') and ... | ||
|
||
- script: | | ||
- bash: | | ||
df -h | ||
./run_test.sh | ||
rm -rf ${WARPX_CI_TMP} | ||
df -h | ||
displayName: 'Build & test' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters