Skip to content

Commit 2cffb10

Browse files
attempt to build petsc in azure.
1 parent 75a95de commit 2cffb10

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.azure-pipelines.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ jobs:
4444
# Cartesian 2D
4545
cartesian_2d:
4646
WARPX_CMAKE_FLAGS: -DWarpX_DIMS=2 -DWarpX_FFT=ON -DWarpX_PYTHON=ON
47+
# Cartesian 2D with PETSc
48+
cartesian_petsc_2d:
49+
WARPX_CMAKE_FLAGS: -DWarpX_DIMS=2 -DWarpX_FFT=OFF -DWarpX_PYTHON=ON -DAMReX_PETSC=YES
4750
# Cartesian 3D
4851
cartesian_3d:
4952
WARPX_CMAKE_FLAGS: -DWarpX_DIMS=3 -DWarpX_FFT=ON -DWarpX_PYTHON=ON
@@ -108,6 +111,18 @@ jobs:
108111
# -DopenPMD_USE_PYTHON=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DBUILD_CLI_TOOLS=OFF
109112
# #python3 -m pip install --upgrade openpmd-api
110113
#fi
114+
if [ "${AMReX_PETSC:-YES}" == "TRUE" ]; then
115+
export warpx_dir=${PWD}
116+
export PETSC_DIR=${warpx_dir}/petsc
117+
export PETSC_ARCH=arch-opt
118+
# clone and configure PETSc
119+
cd ${warpx_dir}
120+
git clone -b release https://gitlab.com/petsc/petsc.git petsc
121+
cd ${PETSC_DIR}
122+
./configure --with-fortran-bindings=no --with-x=no --with-cc=mpicc --with-fc=mpif90 --with-cxx=mpicxx --with-debugging=1 --download-make --download-cmake --download-superlu --download-superlu_dist
123+
make -j 4
124+
export WARPX_CMAKE_FLAGS="${WARPX_CMAKE_FLAGS} -DPETSC_DIR=${PETSC_DIR} -DPETSC_ARCH=${PETSC_ARCH}"
125+
fi
111126
if [ "${WARPX_RZ_FFT:-FALSE}" == "TRUE" ]; then
112127
# BLAS++
113128
cmake-easyinstall --prefix=/usr/local \
@@ -145,7 +160,7 @@ jobs:
145160
# display disk space usage
146161
df -h
147162
# configure
148-
export AMReX_CMAKE_FLAGS="-DAMReX_ASSERTIONS=ON -DAMReX_TESTING=ON -DAMReX_PETSC=YES"
163+
export AMReX_CMAKE_FLAGS="-DAMReX_ASSERTIONS=ON -DAMReX_TESTING=ON"
149164
export WARPX_TEST_FLAGS="-DWarpX_TEST_CLEANUP=ON -DWarpX_TEST_FPETRAP=ON -DWarpX_BACKTRACE_INFO=ON"
150165
cmake -S . -B build \
151166
${AMReX_CMAKE_FLAGS} \

0 commit comments

Comments
 (0)