Skip to content

Commit

Permalink
Update OpenMPI oversubscribe flags in configs/containers/docker-ubunt…
Browse files Browse the repository at this point in the history
…u-gcc-openmpi.yaml for openmpi@5:
  • Loading branch information
climbfuji committed Feb 22, 2024
1 parent 7a941f8 commit 773a61a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions configs/containers/docker-ubuntu-gcc-openmpi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,22 +177,22 @@ spack:
echo "export CXX=g++" >> /home/nonroot/.bashrc && \
echo "export FC=gfortran" >> /home/nonroot/.bashrc && \
printf "[credential]\n helper = cache --timeout=7200\n" >> /home/nonroot/.gitconfig && \
mkdir /home/nonroot/.openmpi && \
echo "rmaps_base_oversubscribe = 1" >> /home/nonroot/.openmpi/mca-params.conf && \
chown -R nonroot:nonroot /home/nonroot/.gitconfig /home/nonroot/.openmpi
mkdir /home/nonroot/.pmix && \
echo "rmaps_default_mapping_policy=:oversubscribe" >> /home/nonroot/.pmix/mca-params.conf && \
chown -R nonroot:nonroot /home/nonroot/.gitconfig /home/nonroot/.pmix
# Replicate settings for root user
RUN echo "ulimit -s unlimited" >> /root/.bashrc && \
echo "ulimit -v unlimited" >> /root/.bashrc && \
echo "export CC=gcc" >> /root/.bashrc && \
echo "export CXX=g++" >> /root/.bashrc && \
echo "export FC=gfortran" >> /root/.bashrc && \
printf "[credential]\n helper = cache --timeout=7200\n" >> /root/.gitconfig && \
mkdir /root/.openmpi && \
echo "rmaps_base_oversubscribe = 1" >> /root/.openmpi/mca-params.conf
mkdir /root/.pmix && \
echo "rmaps_default_mapping_policy=:oversubscribe" >> /root/.pmix/mca-params.conf
# Also set necessary environment variables for openmpi
RUN echo "export OMPI_ALLOW_RUN_AS_ROOT=1" >> /root/.bashrc && \
echo "export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1" >> /root/.bashrc && \
echo "export OMPI_MCA_rmaps_base_oversubscribe=1" >> /root/.bashrc
echo "export PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe" >> /root/.bashrc
# Labels for the image
labels:
Expand Down

0 comments on commit 773a61a

Please sign in to comment.