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

[WIP] Spack docker containers #261

Draft
wants to merge 52 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
d4afd73
LC Spack Support (#1204)
corbett5 Dec 17, 2020
f5d63f6
Python interface (#1068)
corbett5 Feb 12, 2021
90d44e6
Corbett/references and exceptions (#1318)
corbett5 Feb 19, 2021
93fc439
Changes for Summit. (#1367)
corbett5 Mar 23, 2021
cba00e8
Spack changes. (#1445)
corbett5 Jun 3, 2021
9ce2b63
Use {fmt} for message formatting (#1568)
klevzoff Sep 28, 2021
1c7822a
Adding features for Wellbore meshing (#1424)
rrsettgast Oct 16, 2021
1cebee6
Format python files with YAPF (#1947)
cssherman Jul 18, 2022
bb56e1f
Add PT-Scotch as a partitioning method option in VTKMesh (#1996)
klevzoff Aug 5, 2022
7174fc2
Change `geosx` to `geos` in macros, include guards, namespace... (#2392)
TotoGaz Apr 15, 2023
f22db18
Initial HIP/ROCM Support (#2453)
wrtobin May 17, 2023
f29a21e
Ensure unit tests are enabled by default. (#2464)
wrtobin May 31, 2023
7423737
Spack Update (#2028)
bmhan12 Jan 23, 2024
8b687f1
Update spack commit, remove chai and umpire recipes
bmhan12 Feb 1, 2024
9da3f99
Remove fesapi support from spack
bmhan12 Feb 8, 2024
3884ee9
Remove toss_3 recipe (no more toss_3 systems)
bmhan12 Feb 8, 2024
e45a801
hypre update
bmhan12 Feb 8, 2024
615fc7d
Remove unneeded dependencies for pygeosx, add recommendation to build…
bmhan12 Mar 6, 2024
50a7374
Attempt to add openmp variant
bmhan12 Apr 4, 2024
081a2c4
Try adding fPIC to cflag as well...
bmhan12 Apr 11, 2024
6c93a56
Guard the cuda release flags
bmhan12 Apr 24, 2024
90c59d2
Update hypre hash
bmhan12 Apr 25, 2024
15869e7
Try adding cached_cmake.py logic for determining MPIEXEC
bmhan12 May 16, 2024
9319cf9
Merge remote-tracking branch 'remotes/tempGEOS/feature/han12/wip_dock…
bmhan12 Aug 22, 2024
f19e7dd
Testing spacked docker images
bmhan12 Dec 13, 2023
b904228
Added uberenv as submodule
bmhan12 Aug 29, 2024
9949b57
Try rocky
bmhan12 Jul 11, 2024
70aecbe
Changes to get things working with tpl version updates - includes spa…
bmhan12 Aug 1, 2024
4af6e2c
Try rocky gcc
bmhan12 Aug 7, 2024
f5ce06f
Find mpfr, reduce build size
bmhan12 Aug 14, 2024
c2d6d69
Do not build pygeosx for gcc, build silo~shared
bmhan12 Aug 22, 2024
ced4677
Update raja suite and vtk for github action images
bmhan12 Aug 28, 2024
a62fc20
spack environment file updates for LC
bmhan12 Aug 28, 2024
427c690
Merge branch 'master' into test/han12/spack_history_with_gha_changes
bmhan12 Aug 29, 2024
bdacbff
Try curl with error
bmhan12 Aug 29, 2024
d6922a9
Update .gitignore for spack, update cmake version for blueos
bmhan12 Sep 3, 2024
153263f
Remove environment variable sets from rocky linux Dockerfiles
bmhan12 Sep 3, 2024
f971b98
Attempt to update LC build script for uberenv
bmhan12 Sep 3, 2024
33f21b0
Script arg indexing
bmhan12 Sep 5, 2024
3aa6810
Script clang13-cuda12 naming
bmhan12 Sep 5, 2024
1bde35c
Keep gcc env vars for mpi4py installation
bmhan12 Sep 10, 2024
aa36440
Merge branch 'master' into feature/han12/docker_spack
bmhan12 Sep 19, 2024
48a1830
Try pangea3, separate total environment file into separate pangea and…
bmhan12 Sep 26, 2024
ccefebd
Merge branch 'master' into feature/han12/docker_spack
bmhan12 Sep 26, 2024
86e4f0f
Remove leftover merge comment
bmhan12 Sep 26, 2024
d216b25
change openmpi spec
bmhan12 Sep 26, 2024
9e96477
Spelling, flag geosx recipe adjustments
bmhan12 Sep 26, 2024
1f2c29f
Possible rpaths and LD_LIBRARY_PATH options for pangea-3
bmhan12 Oct 8, 2024
480eeda
cleanup paths, add symlinks so spack can find link dependencies, bump…
bmhan12 Oct 8, 2024
24b6d22
Have spack build part of texinfo dependencies, install bzip2 for tar
bmhan12 Oct 9, 2024
cc2fdfa
Let spack build ncurses
bmhan12 Oct 10, 2024
fa0f98c
Use built gettext
bmhan12 Oct 10, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/docker_build_tpls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
- name: Pangea 3 (AlmaLinux 8.8, gcc 9.4.0, open-mpi 4.1.2, cuda 11.5.0, openblas 0.3.10)
DOCKER_REPOSITORY: geosx/pangea3-almalinux8-gcc9.4-openmpi4.1.2-cuda11.5.0-openblas0.3.18
TPL_DOCKERFILE: docker/TotalEnergies/Pangea3.Dockerfile
HOST_CONFIG: host-configs/TOTAL/pangea3-gcc8.4.1-openmpi-4.1.2.cmake
DOCKER_ROOT_IMAGE: 7g8efcehpff/pangea-almalinux8-gcc9.4-openmpi4.1.2-cuda11.5.0-openblas0.3.18:4
HOST_ARCH: ppc64le
RUNS_ON: streak2
Expand Down Expand Up @@ -95,6 +94,7 @@ jobs:
DOCKER_COMPILER_BUILD_ARG: ${{ matrix.DOCKER_COMPILER_BUILD_ARG }}
INSTALL_DIR_ROOT: ${{ matrix.INSTALL_DIR_ROOT || '/opt/GEOS' }}
HOST_CONFIG: ${{ matrix.HOST_CONFIG || 'host-configs/environment.cmake'}}
SPEC: ${{ matrix.SPEC || 'undefined' }}
DOCKER_ROOT_IMAGE: ${{ matrix.DOCKER_ROOT_IMAGE || 'undefined' }}
COMMIT: ${{ github.sha }}
BUILD_DIR: ${{ github.workspace }}
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ build-*/
install-*/
.cproject
.project
.pydevproject
.pydevproject
spack-*.txt
__pycache__
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "cmake/blt"]
path = cmake/blt
url = ../../LLNL/blt.git
[submodule "scripts/uberenv"]
path = scripts/uberenv
url = ../../LLNL/uberenv.git
11 changes: 11 additions & 0 deletions .uberenv_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"package_name": "geosx",
"package_version": "develop",
"package_final_phase": "lvarray_hostconfig",
"package_source_dir": "../..",
"spack_url": "https://github.com/spack/spack",
"spack_commit": "d66dce2d668a6234504594661506cdd1eaca4adc",
"spack_configs_path": "scripts/spack_configs",
"spack_packages_path": "scripts/spack_packages/packages",
"spack_concretizer": "clingo"
}
48 changes: 41 additions & 7 deletions docker/Stanford/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@ RUN yum install -y \
ca-certificates \
curl \
python3 \
zlib-devel
zlib-devel \
# Additional spack dependencies
python3-pip \
pkgconfig \
# xz \
unzip \
bzip2 \
&& pip3 install virtualenv

# Install clingo for Spack
RUN python3 -m pip install --upgrade pip && \
python3 -m pip install clingo

RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-cmake.sh

Expand All @@ -29,20 +40,43 @@ RUN yum install -y \
file \
bison \
flex \
patch
patch \
ca-certificates \
autoconf \
automake \
git

ARG HOST_CONFIG
ARG SPEC

RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/configure-tpl.sh
WORKDIR $BLD_DIR
RUN --mount=src=.,dst=$SRC_DIR make
# Run uberenv
# Have to create install directory first for uberenv
# -k flag is to ignore SSL errors
RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \
mkdir -p ${GEOSX_TPL_DIR} && \
./scripts/uberenv/uberenv.py \
# spack spec defined per image
--spec "${SPEC}" \
--spack-env-file=${SRC_DIR}/docker/stanford-spack.yaml \
--project-json=.uberenv_config.json \
--prefix ${GEOSX_TPL_DIR} \
-k && \
# Remove host-config generated for LvArray
rm lvarray* && \
# Rename and copy spack-generated host-config to root directory
cp *.cmake /spack-generated.cmake && \
# Remove extraneous spack files
cd ${GEOSX_TPL_DIR} && \
rm -rf bin/ build_stage/ misc_cache/ spack/ spack_env/ .spack-db/

FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain
ARG SRC_DIR

COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR

RUN yum -y install \
# Extract the generated host-config
COPY --from=tpl_toolchain /spack-generated.cmake /

RUN yum install -y \
openssh-clients \
ca-certificates \
curl \
Expand Down
52 changes: 43 additions & 9 deletions docker/TotalEnergies/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,72 @@ ARG SRC_DIR
ARG INSTALL_DIR
ENV GEOSX_TPL_DIR=$INSTALL_DIR

RUN yum install -y \
RUN yum install --disablerepo=intel-mkl-repo -y \
ca-certificates \
curl \
python3 \
zlib-devel
zlib-devel \
# Additional spack dependencies
python3-pip \
pkgconfig \
# xz \
unzip \
bzip2 \
&& pip3 install virtualenv

# Install clingo for Spack
RUN python3 -m pip install --upgrade pip && \
python3 -m pip install clingo

RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/install-cmake.sh

FROM tpl_toolchain_intersect_geosx_toolchain AS tpl_toolchain
ARG SRC_DIR
ARG BLD_DIR

RUN yum install -y \
RUN yum install --disablerepo=intel-mkl-repo -y \
make \
bc \
file \
bison \
flex \
patch
patch \
ca-certificates \
autoconf \
automake \
git

ARG HOST_CONFIG
ARG SPEC

RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/configure-tpl.sh
WORKDIR $BLD_DIR
RUN --mount=src=.,dst=$SRC_DIR make
# Run uberenv
# Have to create install directory first for uberenv
# -k flag is to ignore SSL errors
RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \
mkdir -p ${GEOSX_TPL_DIR} && \
./scripts/uberenv/uberenv.py \
# spack spec defined per image
--spec "${SPEC}" \
--spack-env-file=${SRC_DIR}/docker/total-spack.yaml \
--project-json=.uberenv_config.json \
--prefix ${GEOSX_TPL_DIR} \
-k && \
# Remove host-config generated for LvArray
rm lvarray* && \
# Rename and copy spack-generated host-config to root directory
cp *.cmake /spack-generated.cmake && \
# Remove extraneous spack files
cd ${GEOSX_TPL_DIR} && \
rm -rf bin/ build_stage/ misc_cache/ spack/ spack_env/ .spack-db/

FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain
ARG SRC_DIR

COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR

RUN yum -y install \
# Extract the generated host-config
COPY --from=tpl_toolchain /spack-generated.cmake /

RUN yum install --disablerepo=intel-mkl-repo -y \
openssh-clients \
ca-certificates \
curl \
Expand Down
65 changes: 61 additions & 4 deletions docker/TotalEnergies/Pangea3.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ FROM $DOCKER_ROOT_IMAGE as tpl_toolchain_intersect_geosx_toolchain
ARG SRC_DIR
ARG BLD_DIR

# Install additional required packages for spack
RUN dnf clean all && \
dnf -y update && \
dnf -y install \
autoconf \
automake \
libtool \
bzip2 \
unzip

# All the environment variables defined in this Dockerfile
# (GEOSX_TPL_DIR but also compiler information like CC, CXX...)
# are part of the image contract (otherwise ARG is used).
Expand All @@ -21,18 +31,65 @@ ARG INSTALL_DIR
ENV GEOSX_TPL_DIR=$INSTALL_DIR

# Get host config file from docker build arguments
ARG HOST_CONFIG
#ARG HOST_CONFIG

FROM tpl_toolchain_intersect_geosx_toolchain AS tpl_toolchain

# We now configure the build...
RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/configure-tpl.sh
#RUN --mount=src=.,dst=$SRC_DIR $SRC_DIR/docker/configure-tpl.sh
# ... before we compile the TPLs!
WORKDIR $BLD_DIR
RUN --mount=src=.,dst=$SRC_DIR make
#WORKDIR $BLD_DIR
#RUN --mount=src=.,dst=$SRC_DIR make

# Run uberenv
# Have to create install directory first for uberenv
# -k flag is to ignore SSL errors
RUN --mount=src=.,dst=$SRC_DIR,readwrite cd ${SRC_DIR} && \
mkdir -p ${GEOSX_TPL_DIR} && \
# Create symlink to existing libraries sp spack can find
ln -s /usr/lib64/libhwloc.so.15 /usr/lib64/libhwloc.so && \
ln -s /usr/lib64/libibverbs.so.1.14.48.0 /usr/lib64/libibverbs.so && \
ln -s /usr/lib64/libnsl.so.2.0.0 /usr/lib64/libnsl.so && \
ln -s /usr/lib64/librdmacm.so.1.3.48.0 /usr/lib64/librdmacm.so && \
ln -s /usr/lib64/liblustreapi.so.1 /usr/lib64/liblustreapi.so && \
# Run uberenv
./scripts/uberenv/uberenv.py \
--spec "%[email protected]+cuda~uncrustify~openmp~pygeosx cuda_arch=70 ^[email protected]+allow-unsupported-compilers ^[email protected]~gotcha~sampler~libunwind~libdw~papi" \
--spack-env-file=${SRC_DIR}/docker/pangea-spack.yaml \
--project-json=.uberenv_config.json \
--prefix ${GEOSX_TPL_DIR} \
-k && \
# Remove host-config generated for LvArray
rm lvarray* && \
# Rename and copy spack-generated host-config to root directory
cp *.cmake /spack-generated-wave-solver-only.cmake && \
# Remove extraneous spack files
cd ${GEOSX_TPL_DIR} && \
rm -rf bin/ build_stage/ misc_cache/ spack/ spack_env/ .spack-db/

# Build only the wave solver for Pangea 3
RUN echo 'set ( GEOS_ENABLE_CONTACT OFF CACHE BOOL "" FORCE )' >> /spack-generated-wave-solver-only.cmake && \
echo 'set ( GEOS_ENABLE_FLUIDFLOW OFF CACHE BOOL "" FORCE )' >> /spack-generated-wave-solver-only.cmake && \
echo 'set ( GEOS_ENABLE_INDUCEDSEISMICITY OFF CACHE BOOL "" FORCE )' >> /spack-generated-wave-solver-only.cmake && \
echo 'set ( GEOS_ENABLE_MULTIPHYSICS OFF CACHE BOOL "" FORCE )' >> /spack-generated-wave-solver-only.cmake && \
echo 'set ( GEOS_ENABLE_SIMPLEPDE OFF CACHE BOOL "" FORCE )' >> /spack-generated-wave-solver-only.cmake && \
echo 'set ( GEOS_ENABLE_SOLIDMECHANICS OFF CACHE BOOL "" FORCE )' >> /spack-generated-wave-solver-only.cmake && \
echo 'set ( GEOS_ENABLE_SURFACEGENERATION OFF CACHE BOOL "" FORCE )' >> /spack-generated-wave-solver-only.cmake


# Extract only TPL's from previous stage
FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain

COPY --from=tpl_toolchain $GEOSX_TPL_DIR $GEOSX_TPL_DIR

# Extract the generated host-config
COPY --from=tpl_toolchain /spack-generated-wave-solver-only.cmake /

# Regenerate symlinks for existing libraries
RUN ln -s /usr/lib64/libhwloc.so.15 /usr/lib64/libhwloc.so && \
ln -s /usr/lib64/libibverbs.so.1.14.48.0 /usr/lib64/libibverbs.so && \
ln -s /usr/lib64/libnsl.so.2.0.0 /usr/lib64/libnsl.so && \
ln -s /usr/lib64/librdmacm.so.1.3.48.0 /usr/lib64/librdmacm.so && \
ln -s /usr/lib64/liblustreapi.so.1 /usr/lib64/liblustreapi.so

ENV SCCACHE=/opt/sccache/bin/sccache
2 changes: 1 addition & 1 deletion docker/install-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ set -xe
VERSION=${1-3.28.3}
PREFIX=${2-/usr/local}

curl -s https://cmake.org/files/v${VERSION%.[0-9]*}/cmake-$VERSION-linux-x86_64.tar.gz | \
curl -S https://cmake.org/files/v${VERSION%.[0-9]*}/cmake-$VERSION-linux-x86_64.tar.gz | \
tar --directory=$PREFIX --strip-components=1 -xzf -
Loading