From 2574db662db8c49c3476c715d73a5f5ad89f1f32 Mon Sep 17 00:00:00 2001 From: Edward Palmer Date: Fri, 26 Jan 2024 15:30:21 +0000 Subject: [PATCH 1/5] Added debug dockerfiles. --- docker/apollo-debug-deps/Dockerfile | 47 +++++++++++++++++++++++++++++ docker/apollo-debug/Dockerfile | 36 ++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 docker/apollo-debug-deps/Dockerfile create mode 100644 docker/apollo-debug/Dockerfile diff --git a/docker/apollo-debug-deps/Dockerfile b/docker/apollo-debug-deps/Dockerfile new file mode 100644 index 00000000..168720d9 --- /dev/null +++ b/docker/apollo-debug-deps/Dockerfile @@ -0,0 +1,47 @@ +# Build Apollo dependencies +# Get base image +FROM alexanderianblair/hephaestus-deps:master + +# By default one core is used to compile +ARG compile_cores=4 + +# By default checkout mfem-moose branch +ARG WORKDIR="opt" + +#Configure MOOSE +RUN export MOOSE_JOBS="$compile_cores" && \ + cd /$WORKDIR && \ + git clone https://github.com/idaholab/moose && \ + cd moose && \ + git checkout master && \ + export PETSC_DIR=/$WORKDIR/petsc && \ + export PETSC_ARCH=arch-linux-c-opt && \ + export CC=mpicc && \ + export CXX=mpicxx && \ + export F90=mpif90 && \ + export F77=mpif77 && \ + export FC=mpif90 && \ + METHODS='debug' ./scripts/update_and_rebuild_libmesh.sh --with-mpi && \ + ./configure --with-derivative-size=200 --with-ad-indexing-type=global + +# Build WASP +RUN cd /$WORKDIR/moose/scripts && \ + METHODS='debug' ./update_and_rebuild_wasp.sh + +# Build MOOSE +RUN cd /$WORKDIR/moose/framework && \ + METHOD=debug make -j"$compile_cores" + +RUN cd /$WORKDIR/moose/test && \ + METHOD=debug make -j"$compile_cores" + +# This is needed or it mpiexec complains because docker runs as root +# Discussion on this issue https://github.com/open-mpi/ompi/issues/4451 +ENV OMPI_ALLOW_RUN_AS_ROOT=1 +ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 + +# RUN cd /$WORKDIR/moose/test && \ +# ./run_tests -j"$compile_cores" --re='(?!initial_condition.newton_with_exact_initialization)' + +# ENV OMPI_ALLOW_RUN_AS_ROOT= +# ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM= diff --git a/docker/apollo-debug/Dockerfile b/docker/apollo-debug/Dockerfile new file mode 100644 index 00000000..6702b206 --- /dev/null +++ b/docker/apollo-debug/Dockerfile @@ -0,0 +1,36 @@ +# Build and test Apollo image +# Get base image +FROM alexanderianblair/apollo-deps:master + +# By default one core is used to compile +ARG compile_cores=4 + +# By default checkout mfem-moose branch +ARG WORKDIR="opt" +ARG build_git_sha="master" + +# Get Apollo with Hephaestus +RUN cd /$WORKDIR && \ + git clone https://github.com/aurora-multiphysics/apollo.git && \ + cd apollo && \ + git checkout "$build_git_sha" && \ + git submodule update --init --recursive + +# Build Hephaestus +RUN cd /$WORKDIR/apollo/contrib/hephaestus/ && \ + mkdir build && \ + cd build && \ + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DMFEM_DIR=/$WORKDIR/mfem/build -DMFEM_COMMON_INCLUDES=/$WORKDIR/mfem/miniapps/common .. && \ + make -j1 + +# Test Hephaestus +RUN cd /$WORKDIR/apollo/contrib/hephaestus/build && \ + make test + +# Build Apollo +RUN cd /$WORKDIR/apollo && \ + make -j"$compile_cores" + +# Test Apollo +RUN cd /$WORKDIR/apollo && \ + make test From 02a23134d166e00b0f14fd7b4d2c1d39df170bf8 Mon Sep 17 00:00:00 2001 From: Edward Palmer Date: Fri, 26 Jan 2024 15:30:58 +0000 Subject: [PATCH 2/5] Add to weekly build. --- .github/workflows/weekly_build.yml | 56 ++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/.github/workflows/weekly_build.yml b/.github/workflows/weekly_build.yml index eae37485..37226479 100644 --- a/.github/workflows/weekly_build.yml +++ b/.github/workflows/weekly_build.yml @@ -34,6 +34,34 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + push-apollo-debug-deps-image-to-docker-hub: + name: DockerPublishApolloDebugDeps + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: alexanderianblair/apollo-debug-deps + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: docker/apollo-debug-deps/ + file: docker/apollo-debug-deps/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + push-apollo-image-to-docker-hub: name: DockerPublishApollo runs-on: ubuntu-latest @@ -61,3 +89,31 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + + push-apollo-debug-image-to-docker-hub: + name: DockerPublishApolloDebug + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: alexanderianblair/apollo-debug + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: docker/apollo-debug/ + file: docker/apollo-debug/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file From 80af7fcecfbe3f73fe8120717b7ec57afb73f1ef Mon Sep 17 00:00:00 2001 From: = <=> Date: Fri, 26 Jan 2024 18:52:12 +0000 Subject: [PATCH 3/5] Updated debug docker files. --- docker/apollo-debug-deps/Dockerfile | 2 +- docker/apollo-debug/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/apollo-debug-deps/Dockerfile b/docker/apollo-debug-deps/Dockerfile index 168720d9..1a59b172 100644 --- a/docker/apollo-debug-deps/Dockerfile +++ b/docker/apollo-debug-deps/Dockerfile @@ -1,6 +1,6 @@ # Build Apollo dependencies # Get base image -FROM alexanderianblair/hephaestus-deps:master +FROM alexanderianblair/hephaestus-debug-deps:master # By default one core is used to compile ARG compile_cores=4 diff --git a/docker/apollo-debug/Dockerfile b/docker/apollo-debug/Dockerfile index 6702b206..3b085f95 100644 --- a/docker/apollo-debug/Dockerfile +++ b/docker/apollo-debug/Dockerfile @@ -1,6 +1,6 @@ # Build and test Apollo image # Get base image -FROM alexanderianblair/apollo-deps:master +FROM alexanderianblair/apollo-debug-deps:master # By default one core is used to compile ARG compile_cores=4 From 01726d64e36d7e94046ca429e04ca906c652b0d4 Mon Sep 17 00:00:00 2001 From: Edward Palmer Date: Thu, 1 Feb 2024 17:28:27 +0000 Subject: [PATCH 4/5] Added missing METHOD=dbg in apollo-debug. --- docker/apollo-debug/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/apollo-debug/Dockerfile b/docker/apollo-debug/Dockerfile index 3b085f95..bdbcdba8 100644 --- a/docker/apollo-debug/Dockerfile +++ b/docker/apollo-debug/Dockerfile @@ -29,8 +29,8 @@ RUN cd /$WORKDIR/apollo/contrib/hephaestus/build && \ # Build Apollo RUN cd /$WORKDIR/apollo && \ - make -j"$compile_cores" + METHOD=dbg make -j"$compile_cores" # Test Apollo RUN cd /$WORKDIR/apollo && \ - make test + METHOD=dbg make test From e6b383896af638860c08764b17b5c7663ffaa9b9 Mon Sep 17 00:00:00 2001 From: Edward Palmer Date: Thu, 1 Feb 2024 17:28:55 +0000 Subject: [PATCH 5/5] Switched to METHOD=dbg in apollo-debug-deps. --- docker/apollo-debug-deps/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/apollo-debug-deps/Dockerfile b/docker/apollo-debug-deps/Dockerfile index 1a59b172..2fddd0cc 100644 --- a/docker/apollo-debug-deps/Dockerfile +++ b/docker/apollo-debug-deps/Dockerfile @@ -21,19 +21,19 @@ RUN export MOOSE_JOBS="$compile_cores" && \ export F90=mpif90 && \ export F77=mpif77 && \ export FC=mpif90 && \ - METHODS='debug' ./scripts/update_and_rebuild_libmesh.sh --with-mpi && \ + METHOD=dbg ./scripts/update_and_rebuild_libmesh.sh --with-mpi && \ ./configure --with-derivative-size=200 --with-ad-indexing-type=global # Build WASP RUN cd /$WORKDIR/moose/scripts && \ - METHODS='debug' ./update_and_rebuild_wasp.sh + METHOD=dbg ./update_and_rebuild_wasp.sh # Build MOOSE RUN cd /$WORKDIR/moose/framework && \ - METHOD=debug make -j"$compile_cores" + METHOD=dbg make -j"$compile_cores" RUN cd /$WORKDIR/moose/test && \ - METHOD=debug make -j"$compile_cores" + METHOD=dbg make -j"$compile_cores" # This is needed or it mpiexec complains because docker runs as root # Discussion on this issue https://github.com/open-mpi/ompi/issues/4451