Skip to content

Commit 4414e0b

Browse files
committed
Doc: WarpX no-MPI Perlmutter Container
A container for WarpX on GPU on Perlmutter without MPI support.
1 parent cdc28a3 commit 4414e0b

File tree

2 files changed

+8
-38
lines changed

2 files changed

+8
-38
lines changed

Tools/machines/perlmutter-nersc/Containerfile

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
# WarpX Python bindings are installed in /opt/venv
77
#
88
# On Perlmutter, run WarpX like this:
9-
# podman-hpc run --rm --gpu --cuda-mpi --nccl -v $PWD:/opt/pwd -it registry.nersc.gov/m558/superfacility/warpx-perlmutter:latest warpx.2d /opt/pwd/inputs_base_2d
9+
# podman-hpc run --rm --gpu -v $PWD:/opt/pwd -it registry.nersc.gov/m558/superfacility/warpx-perlmutter-nompi:latest warpx.2d /opt/pwd/inputs_base_2d
1010
# Prefix this line with "srun ..." in job scripts, as usual:
1111
# srun --cpu-bind=cores bash -c "
1212
# export CUDA_VISIBLE_DEVICES=\$((3-SLURM_LOCALID));
13-
# podman run ... ${INPUTS} ${GPU_AWARE_MPI}" \
13+
# podman run ... ${INPUTS}" \
1414
# > output.txt
1515
#
1616

@@ -49,8 +49,6 @@ ENV LD_LIBRARY_PATH="/opt/warpx/lib:${LD_LIBRARY_PATH}"
4949
ENV CMAKE_PREFIX_PATH="/opt/warpx:${CMAKE_PREFIX_PATH}"
5050

5151
# Install essential system dependencies (development)
52-
# Perlmutter MPICH: cray-mpich/8.1.30 based on MPICH 3.4a2
53-
# Ubuntu 22.04 ships MPICH 4.0, so we build from source
5452
RUN apt-get update && \
5553
apt-get install \
5654
-y \
@@ -78,35 +76,6 @@ RUN apt-get update && \
7876
zlib1g-dev && \
7977
rm -rf /var/lib/apt/lists/*
8078

81-
# Install MPICH 3.4 support from source
82-
# after https://docs.nersc.gov/development/containers/shifter/how-to-use/#using-mpi-in-shifter
83-
# Note:
84-
# w/o GPUdirect here, because we will swap out the MPI binaries on Perlmutter using a Podman-HPC
85-
# plugin (--mpi/--cuda-mpi). This only works if we do NOT build GPUdirect here, this we skip:
86-
# --with-ch4-shmmods=posix,gpudirect
87-
# Perlmutter MPICH: cray-mpich/8.1.30 based on MPICH 3.4a2
88-
# TODO: install libfabric from source and depend on it (or expose where embedded libfabric gets installed)
89-
ARG mpich=3.4.3
90-
ARG mpich_prefix=mpich-$mpich
91-
92-
RUN \
93-
curl -Lo $mpich_prefix.tar.gz https://www.mpich.org/static/downloads/$mpich/$mpich_prefix.tar.gz && \
94-
tar xzf $mpich_prefix.tar.gz && \
95-
cd $mpich_prefix && \
96-
FFLAGS=-fallow-argument-mismatch FCFLAGS=-fallow-argument-mismatch \
97-
./configure \
98-
--disable-fortran \
99-
--prefix=/opt/warpx \
100-
--with-device=ch4:ofi && \
101-
make -j ${NJOBS} && \
102-
make install && \
103-
make clean && \
104-
cd .. && \
105-
rm -rf ${mpich_prefix}*
106-
107-
RUN /sbin/ldconfig
108-
# ENV MPICH_GPU_SUPPORT_ENABLED=1
109-
11079
# Install c-blosc from source
11180
RUN git clone \
11281
-b v2.14.4 \
@@ -128,7 +97,6 @@ RUN git clone \
12897
rm -rf /tmp/c-blosc2*
12998

13099
# Install ADIOS2 from source
131-
# TODO: install libfabric from source and depend on it (or expose where MPICH-embedded libfabric gets installed)
132100
# TODO: -DADIOS2_USE_SST=ON
133101
RUN git clone \
134102
-b v2.10.2 \
@@ -143,6 +111,7 @@ RUN git clone \
143111
-DADIOS2_USE_SST=OFF \
144112
-DADIOS2_USE_SZ=OFF \
145113
-DADIOS2_USE_MGARD=OFF \
114+
-DADIOS2_USE_MPI=OFF \
146115
-DADIOS2_USE_PNG=ON \
147116
-DADIOS2_USE_Python=OFF \
148117
-DADIOS2_USE_ZeroMQ=OFF \
@@ -241,8 +210,9 @@ RUN git clone \
241210
-B /tmp/warpx-build \
242211
-DCMAKE_INSTALL_PREFIX=/opt/warpx \
243212
-DWarpX_COMPUTE=CUDA \
244-
-DWarpX_DIMS="2;RZ" \
213+
-DWarpX_DIMS="1;2;RZ;3" \
245214
-DWarpX_FFT=ON \
215+
-DWarpX_MPI=OFF \
246216
-DWarpX_PYTHON=ON \
247217
-DWarpX_QED_TABLE_GEN=OFF \
248218
&& \
@@ -255,8 +225,10 @@ RUN git clone \
255225
-j${NJOBS} \
256226
&& \
257227
rm -rf /tmp/warpx* && \
228+
ln -s /opt/warpx/bin/warpx.1d* /opt/warpx/bin/warpx.1d && \
258229
ln -s /opt/warpx/bin/warpx.2d* /opt/warpx/bin/warpx.2d && \
259-
ln -s /opt/warpx/bin/warpx.rz* /opt/warpx/bin/warpx.rz
230+
ln -s /opt/warpx/bin/warpx.rz* /opt/warpx/bin/warpx.rz && \
231+
ln -s /opt/warpx/bin/warpx.3d* /opt/warpx/bin/warpx.3d
260232

261233
# Reduce to runtime
262234
FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04 AS warpx

Tools/machines/perlmutter-nersc/entrypoint.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,5 @@ export LD_LIBRARY_PATH=${WARPX_ROOT}/lib:${LD_LIBRARY_PATH}
99
# Activate python venv
1010
source /opt/venv/bin/activate
1111

12-
# export MPICH_GPU_SUPPORT_ENABLED=1
13-
1412
# Execute the provided command
1513
exec "$@"

0 commit comments

Comments
 (0)