Skip to content

Commit

Permalink
Merge pull request aurora-multiphysics#5 from aurora-multiphysics/Edw…
Browse files Browse the repository at this point in the history
…ardPalmer99/remove-hephaestus-dependency

Remove Hephaestus Dependency
  • Loading branch information
alexanderianblair authored Jul 11, 2024
2 parents 843417b + c197753 commit 1c1649a
Show file tree
Hide file tree
Showing 105 changed files with 3,624 additions and 931 deletions.
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
HeaderFilterRegex: 'hephaestus/[ste]'
HeaderFilterRegex: 'platypus/[is]'
Checks: '-*,readability-identifier-naming,readability-redundant-member-init,modernize-*,-modernize-use-trailing-return-type,-modernize-avoid-c-arrays'
CheckOptions:
- key: readability-identifier-naming.AggressiveDependentMemberLookup
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "python/pybind11"]
path = python/pybind11
url = https://github.com/pybind/pybind11.git
[submodule "contrib/hephaestus"]
path = contrib/hephaestus
url = https://github.com/aurora-multiphysics/hephaestus
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,29 @@ ALL_MODULES := no

CHEMICAL_REACTIONS := no
CONTACT := no
ELECTROMAGNETICS := no
EXTERNAL_PETSC_SOLVER := no
FLUID_PROPERTIES := no
FSI := no
FUNCTIONAL_EXPANSION_TOOLS := no
HEAT_TRANSFER := yes
GEOCHEMISTRY := no
HEAT_TRANSFER := yes
LEVEL_SET := no
MISC := no
OPTIMIZATION := no
NAVIER_STOKES := no
PERIDYNAMICS := no
PHASE_FIELD := no
POROUS_FLOW := no
RAY_TRACING := no
RDG := no
REACTOR := no
RICHARDS := no
SCALAR_TRANSPORT := no
SOLID_MECHANICS := yes
SOLID_PROPERTIES := no
STOCHASTIC_TOOLS := no
TENSOR_MECHANICS := no
THERMAL_HYDRAULICS := no
XFEM := no

include $(MOOSE_DIR)/modules/modules.mk
Expand All @@ -55,7 +64,7 @@ printer:

# dep apps
APPLICATION_DIR := $(CURDIR)
PLATYPUS_DIR := $(CURDIR)
PLATYPUS_DIR := $(CURDIR)
APPLICATION_NAME := platypus
BUILD_EXEC := yes
GEN_REVISION := no
Expand Down
1 change: 0 additions & 1 deletion contrib/hephaestus
Submodule hephaestus deleted from ff359f
29 changes: 0 additions & 29 deletions contrib/hephaestus.mk

This file was deleted.

158 changes: 140 additions & 18 deletions docker/platypus-deps/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,153 @@
# Build Platypus dependencies
# Ignore warnings for not pinning versions in pip, apt-get install.
# hadolint global ignore=DL3008,DL3013

# Get base image
FROM alexanderianblair/hephaestus-deps:master
FROM ubuntu:22.04

# 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

# By default four cores are used to compile
ARG compile_cores=4

# By default we install everything under /opt
ARG WORKDIR=opt

# Install apt dependencies
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y --no-install-recommends \
build-essential \
bison \
flex \
clang-format \
clang-tidy \
curl \
doxygen \
git \
ninja-build \
pre-commit \
python3 \
python3-dev \
python3-distutils \
python-is-python3 \
python3-pip \
libboost-all-dev \
libfontconfig1-dev \
libfreetype6-dev \
libglew-dev \
libglm-dev \
libhdf5-mpich-dev \
libnetcdf-dev \
libomp-14-dev \
libpng-dev \
libsdl2-dev \
libssl-dev \
rsync \
xxd && \
rm -rf /var/lib/apt/lists/*

# Install pip packages
RUN pip install --no-cache-dir packaging && \
pip install --no-cache-dir pyyaml && \
pip install --no-cache-dir setuptools && \
pip install --no-cache-dir jinja2

# Install CMake
WORKDIR /$WORKDIR
RUN git clone https://github.com/Kitware/CMake.git
WORKDIR /$WORKDIR/CMake
RUN git checkout 78ae759 && \
./bootstrap --parallel=$compile_cores && \
make -j$compile_cores && \
make install && \
alias cmake='/$WORKDIR/CMake/bin/cmake'

# Download SuperLU
WORKDIR /$WORKDIR
RUN curl -LJO https://github.com/xiaoyeli/superlu_dist/archive/refs/tags/v8.1.0.tar.gz

# Download PETSc
WORKDIR /$WORKDIR
RUN mkdir petsc
WORKDIR /$WORKDIR/petsc
RUN curl -L -O http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.19.3.tar.gz && \
tar -xf petsc-3.19.3.tar.gz -C .

# Build PETSc
WORKDIR /$WORKDIR/petsc/petsc-3.19.3
RUN ./configure \
--prefix=/$WORKDIR/petsc \
CXXOPTFLAGS='-O3 -funroll-loops' COPTFLAGS='-O3 -funroll-loops' FOPTFLAGS='-O3' \
--with-debugging=0 \
--with-ssl=0 \
--with-pic=1 \
--with-openmp=1 \
--with-mpi=1 \
--with-shared-libraries=1 \
--with-fortran-bindings=0 \
--with-sowing=0 \
--download-hypre=1 \
--download-fblaslapack=1 \
--download-metis=1 \
--download-ptscotch=1 \
--download-parmetis=1 \
--download-superlu_dist=/$WORKDIR/superlu_dist-8.1.0.tar.gz \
--download-scalapack=1 \
--download-mumps=1 \
--download-slepc=1 \
--with-64-bit-indices=1 \
PETSC_DIR="$(pwd)" PETSC_ARCH=arch-linux-c-opt && \
make

# Install PETSc
WORKDIR /$WORKDIR/petsc/petsc-3.19.3
RUN make PETSC_DIR=/$WORKDIR/petsc/petsc-3.19.3 PETSC_ARCH=arch-linux-c-opt install && \
make PETSC_DIR=/$WORKDIR/petsc/petsc-3.19.3 PETSC_ARCH=arch-linux-c-opt check
WORKDIR /$WORKDIR
RUN export PETSC_DIR=/$WORKDIR/petsc

# Build MFEM and common miniapp
WORKDIR /$WORKDIR
RUN git clone https://github.com/Heinrich-BR/mfem.git
WORKDIR /$WORKDIR/mfem
RUN git checkout SubmeshBoundary && mkdir build
WORKDIR /$WORKDIR/mfem/build
RUN cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=YES \
-DMFEM_USE_OPENMP=NO \
-DMFEM_THREAD_SAFE=NO \
-DHYPRE_DIR=/$WORKDIR/petsc/ \
-DBLAS_LIBRARIES=/$WORKDIR/petsc/lib/libfblas.a \
-DLAPACK_LIBRARIES=/$WORKDIR/petsc/lib/libflapack.a \
-DMFEM_USE_MPI=YES \
-DMFEM_USE_METIS_5=YES \
-DMETIS_DIR=/$WORKDIR/petsc/ \
-DParMETIS_DIR=/$WORKDIR/petsc/ \
-DMFEM_USE_SUPERLU=YES \
-DSuperLUDist_DIR=/$WORKDIR/petsc/ \
-DMFEM_USE_NETCDF=YES \
-DHDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/mpich/ && \
make -j$compile_cores
WORKDIR /$WORKDIR/mfem/build/miniapps/common
RUN make -j$compile_cores

# Build GLVis
WORKDIR /$WORKDIR
RUN git clone https://github.com/GLVis/glvis.git
WORKDIR /$WORKDIR/glvis
RUN mkdir build
WORKDIR /$WORKDIR/glvis/build/
RUN cmake -G Ninja -DMFEM_DIR=/$WORKDIR/mfem/build .. && \
ninja

# Configure MOOSE
WORKDIR /$WORKDIR
# hadolint ignore=DL3003
RUN export MOOSE_JOBS=$compile_cores && \
git clone https://github.com/idaholab/moose && \
cd moose && \
git checkout master && \
git clone https://github.com/idaholab/moose
WORKDIR /$WORKDIR/moose
RUN git checkout master && \
export PETSC_DIR=/$WORKDIR/petsc && \
export PETSC_ARCH=arch-linux-c-opt && \
export CC=mpicc && \
Expand All @@ -34,15 +167,4 @@ WORKDIR /$WORKDIR/moose/framework
RUN METHOD=opt make -j$compile_cores

WORKDIR /$WORKDIR/moose/test
RUN METHOD=opt 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

# WORKDIR /$WORKDIR/moose/test
# RUN ./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=
RUN METHOD=opt make -j$compile_cores
24 changes: 5 additions & 19 deletions docker/platypus/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,11 @@ ARG WORKDIR=opt
# By default, build without code coverage flags
ARG coverage=false

# Get Platypus with Hephaestus
WORKDIR /$WORKDIR
# hadolint ignore=DL3003
RUN git clone https://github.com/$build_git_repo && \
cd platypus && \
git checkout $build_git_sha && \
git submodule update --init --recursive

# Build Hephaestus
WORKDIR /$WORKDIR/platypus/contrib/hephaestus/
# hadolint ignore=DL3003
RUN mkdir build && \
cd build && \
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DMFEM_DIR=/$WORKDIR/mfem/build .. && \
ninja

# Test Hephaestus
WORKDIR /$WORKDIR/platypus/contrib/hephaestus/build
RUN ninja test
# Get Platypus
WORKDIR /$WORKDIR
RUN git clone https://github.com/$build_git_repo
WORKDIR /$WORKDIR/platypus
RUN git checkout $build_git_sha

# Build Platypus
WORKDIR /$WORKDIR/platypus
Expand Down
25 changes: 0 additions & 25 deletions include/auxkernels/MFEMAuxSolver.h

This file was deleted.

78 changes: 0 additions & 78 deletions include/auxkernels/MFEMJouleHeatingAux.h

This file was deleted.

Loading

0 comments on commit 1c1649a

Please sign in to comment.