Skip to content

Commit

Permalink
Merge pull request #25939 from milljm/25831-clang-container
Browse files Browse the repository at this point in the history
  • Loading branch information
loganharbour authored Nov 7, 2023
2 parents 445341c + 3f44eb1 commit f07619a
Show file tree
Hide file tree
Showing 33 changed files with 172 additions and 87 deletions.
54 changes: 53 additions & 1 deletion apptainer/mpich.def
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
{#- Optional jinja arguments -#}
{#- ALTERNATE_FROM: Set an alternate from (currently supported: rocky9) -#}

{%- if ALTERNATE_FROM == "clang" %}
Bootstrap: docker
{%- else %}
BootStrap: oras
{%- endif %}
{%- if ALTERNATE_FROM == "rocky9" %}
From: mooseharbor.hpc.inl.gov/moose-hpcbase/rocky9-{{ ARCH }}:9.0-0
{%- elif ALTERNATE_FROM == "clang" %}
From: mooseharbor.hpc.inl.gov/moose-hpcbase/rocky8-clang-{{ ARCH }}:8.6-0
From: rockylinux:8
{%- elif ALTERNATE_FROM == "cuda" %}
From: mooseharbor.hpc.inl.gov/moose-hpcbase/rocky8-cuda-{{ ARCH }}:8.6-cuda11.4.0-0
{%- else %}
Expand All @@ -20,8 +24,12 @@ From: harbor.hpc.inl.gov/hpcbase/mpi_03:1.1.0
export LC_ALL=C

%post
{%- if ALTERNATE_FROM == "clang" %}
export MOOSE_MPICH_DIR=${MOOSE_MPICH_DIR:-"/opt/mpi/mpich-4.1.2"}
{%- else %}
export MOOSE_MPICH_DIR=${MOOSE_MPICH_DIR:-"/opt/mpi/mpich-3.4.3"}
export MOOSE_OPENMPI_DIR=${MOOSE_OPENMPI_DIR:-"/opt/mpi/openmpi-4.1.5"}
{%- endif %}

# Get the RHEL version
RHEL_VERSION=$(awk -F'=' '/VERSION_ID/{ gsub(/"/,""); print $2}' /etc/os-release)
Expand All @@ -44,6 +52,14 @@ From: harbor.hpc.inl.gov/hpcbase/mpi_03:1.1.0
libtirpc libtirpc-devel zlib-devel patch patchutils epel-release file \
libpng libpng-devel unzip jq valgrind cppunit doxygen fftw-devel gsl-devel \
libtool autoconf automake cppunit-devel

{%- if ALTERNATE_FROM == "clang" %}
# Installing Clang, and its dependencies
dnf install -y clang.x86_64 clang-devel.x86_64 clang-libs.x86_64 clang-tools-extra.x86_64 \
git-clang-format.x86_64 python3-clang.x86_64 clang-analyzer.noarch \
libomp.x86_64 gcc-toolset-12-gcc-gfortran.x86_64 lldb
{%- endif %}

# After epel-release
dnf install -y glpk-devel patchelf lcov

Expand Down Expand Up @@ -99,10 +115,46 @@ EOF
cd git-lfs-3.2.0
./install.sh

{%- if ALTERNATE_FROM == "clang" %}
# Build and Install MPICH Clang
mkdir ${TEMP_LOC}/mpich
cd ${TEMP_LOC}/mpich
curl -L -O http://www.mpich.org/static/downloads/4.1.2/mpich-4.1.2.tar.gz
tar -xf mpich-4.1.2.tar.gz
mkdir mpich-4.1.2/build
cd mpich-4.1.2/build
export PATH=/opt/rh/gcc-toolset-12/root/bin:${PATH}
export LD_LIBRARY_PATH=/opt/rh/gcc-toolset-12/root/lib:/opt/rh/gcc-toolset-12/root/lib64:${LD_LIBRARY_PATH}
../configure --prefix=${MOOSE_MPICH_DIR} \
--enable-shared \
--enable-sharedlibs=clang \
--enable-fast=O2 \
--enable-debuginfo \
--enable-totalview \
--enable-two-level-namespace \
CC=clang \
CXX=clang++ \
FC=gfortran \
F77=gfortran \
F90='' \
CFLAGS='' \
CXXFLAGS='' \
FFLAGS='-fallow-argument-mismatch' \
FCFLAGS='-fallow-argument-mismatch' \
F90FLAGS='' \
F77FLAGS=''
make -j ${MOOSE_JOBS:-6}
make install
{%- endif %}

# Basic script for setting mpich environment
USE_MPI_SCRIPT='export LD_LIBRARY_PATH=${MOOSE_MPI_DIR}/lib:${LD_LIBRARY_PATH}
export MANPATH=${MOOSE_MPI_DIR}/share/man:${MANPATH}
export PATH=${MOOSE_MPI_DIR}/bin:${PATH}
{%- if ALTERNATE_FROM == "clang" %}
export PATH=/opt/rh/gcc-toolset-12/root/bin:${PATH}
export LD_LIBRARY_PATH=/opt/rh/gcc-toolset-12/root/lib:/opt/rh/gcc-toolset-12/root/lib64:${LD_LIBRARY_PATH}
{%- endif %}
export CC=mpicc CXX=mpicxx FC=mpif90 F90=mpif90 F77=mpif77'

# Add script for loading mpich environment
Expand Down
2 changes: 1 addition & 1 deletion conda/libmesh-vtk/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
moose_mpich:
- moose-mpich 4.0.2 build_12
- moose-mpich 4.0.2 build_13

#### Darwin SDK SYSROOT
CONDA_BUILD_SYSROOT: # [osx]
Expand Down
2 changes: 1 addition & 1 deletion conda/libmesh-vtk/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# libmesh/*
#
# As well as any directions pertaining to modifying those files.
{% set build = 5 %}
{% set build = 6 %}
{% set vtk_version = "9.2.6" %}
{% set vtk_friendly_version = "9.2" %}
{% set sha256 = "06fc8d49c4e56f498c40fcb38a563ed8d4ec31358d0101e8988f0bb4d539dd12" %}
Expand Down
4 changes: 2 additions & 2 deletions conda/libmesh/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
moose_petsc:
- moose-petsc 3.20.0 build_0
- moose-petsc 3.20.0 build_1

moose_libmesh_vtk:
- moose-libmesh-vtk 9.2.6 build_5
- moose-libmesh-vtk 9.2.6 build_6

#### Darwin SDK SYSROOT
CONDA_BUILD_SYSROOT: # [osx]
Expand Down
4 changes: 2 additions & 2 deletions conda/libmesh/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#
# As well as any directions pertaining to modifying those files.
# ALSO: Follow the directions in scripts/tests/versioner_hashes.yaml
{% set build = 4 %}
{% set version = "2023.09.06" %}
{% set build = 0 %}
{% set version = "2023.11.06" %}
{% set vtk_friendly_version = "9.2" %}

# permanent
Expand Down
6 changes: 3 additions & 3 deletions conda/moose-dev/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
moose_libmesh:
- moose-libmesh 2023.09.06 build_4
- moose-libmesh 2023.11.06 build_0

moose_wasp:
- moose-wasp 2023.10.24
- moose-wasp 2023.11.06

moose_tools:
- moose-tools 2023.10.27

moose_peacock:
- moose-peacock 2023.10.23
- moose-peacock 2023.11.06
5 changes: 4 additions & 1 deletion conda/moose-dev/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
# moose/conda_build_config.yaml
# template/conda_build_config.yaml
#
# And documentation:
# framework/doc/packages_config.yml
#
# As well as any directions pertaining to modifying those files.
{% set version = "2023.10.27" %}
{% set version = "2023.11.06" %}

package:
name: moose-dev
Expand Down
2 changes: 1 addition & 1 deletion conda/moose/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
moose_dev:
- moose-dev 2023.10.27
- moose-dev 2023.11.06

#### Darwin SDK SYSROOT
CONDA_BUILD_SYSROOT: # [osx]
Expand Down
2 changes: 1 addition & 1 deletion conda/mpich/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# As well as any directions pertaining to modifying those files.
# ALSO: Follow the directions in scripts/tests/versioner_hashes.yaml
{% set build = 12 %}
{% set build = 13 %}
{% set version = "4.0.2" %}

# permanent
Expand Down
2 changes: 1 addition & 1 deletion conda/peacock/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
moose_mpich:
- moose-mpich 4.0.2 build_12
- moose-mpich 4.0.2 build_13

# Pesky packages that break internal CI
# Note: Modifying/Updating this will require changes to conda/mpich!
Expand Down
2 changes: 1 addition & 1 deletion conda/peacock/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# moose-dev/*
#
# As well as any directions pertaining to modifying those files.
{% set version = "2023.10.23" %}
{% set version = "2023.11.06" %}

package:
name: moose-peacock
Expand Down
2 changes: 1 addition & 1 deletion conda/petsc/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
moose_mpich:
- moose-mpich 4.0.2 build_12
- moose-mpich 4.0.2 build_13

#### Darwin SDK SYSROOT
CONDA_BUILD_SYSROOT: # [osx]
Expand Down
5 changes: 4 additions & 1 deletion conda/petsc/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
# REMEMBER TO UPDATE the .yaml files for the following packages:
# libmesh/*
#
# And documentation:
# framework/doc/packages_config.yml
#
# As well as any directions pertaining to modifying those files.
# ALSO: Follow the directions in scripts/tests/versioner_hashes.yaml
{% set build = 0 %}
{% set build = 1 %}
{% set version = "3.20.0" %}

# permanent
Expand Down
2 changes: 1 addition & 1 deletion conda/pyhit/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
moose_wasp:
moose-wasp 2023.10.24
moose-wasp 2023.11.06

moose_python:
- python 3.10
Expand Down
6 changes: 3 additions & 3 deletions conda/pyhit/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% set build = 0 %}
{% set version = "2023.10.24" %}
{% set version = "2023.11.06" %}

package:
name: moose-pyhit
Expand All @@ -9,7 +8,8 @@ source:
git_url: https://github.com/milljm/moose-pyhit.git

build:
number: # [linux,osx]
number: 0
string: build_0
skip: true # [win]
pin_depends: record

Expand Down
2 changes: 1 addition & 1 deletion conda/template/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
moose_dev:
- moose-dev 2023.10.27
- moose-dev 2023.11.06

#### Darwin SDK SYSROOT
CONDA_BUILD_SYSROOT: # [osx]
Expand Down
8 changes: 3 additions & 5 deletions conda/wasp/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
#
# As well as any directions pertaining to modifying those files.
# ALSO: Follow the directions in scripts/tests/versioner_hashes.yaml
{% set build = 0 %}
{% set strbuild = "build_" + build|string %}
{% set version = "2023.10.24" %}
{% set version = "2023.11.06" %}

package:
name: moose-wasp
Expand All @@ -18,8 +16,8 @@ source:
- path: ../../scripts/configure_wasp.sh

build:
number: {{ build }}
string: {{ strbuild }}
number: 0
string: build_0
skip: true # [win]
script_env:
- MOOSE_JOBS
Expand Down
2 changes: 1 addition & 1 deletion docker_ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ if [ ! -d $PETSC_DIR/lib/petsc ]; then exit 1; fi
#-----------------------------------------------------------------------------#
# Install Libmesh to system path
#-----------------------------------------------------------------------------#
ARG LIBMESH_REV=ceff84386bdc83d87e9eb98ac3a9b745711e415a
ARG LIBMESH_REV=b2248b506847fd72d37cff56b6f4d8432f6c7e92
ARG LIBMESH_OPTIONS
ARG LIBMESH_METHODS="opt dbg"
ENV LIBMESH_DIR=/usr/local \
Expand Down
3 changes: 2 additions & 1 deletion framework/doc/packages_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ minimum_clang: 10.0.1
minimum_python: 3.7
mpich: 4.0.2
petsc_alt: 3.11.4
petsc: 3.16.6
petsc: 3.20.0
moose_dev: 2023.11.06
3 changes: 0 additions & 3 deletions framework/include/utils_nonunity/SymmetricRankTwoTensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,6 @@ class SymmetricRankTwoTensorTempl
const T & S11, const T & S22, const T & S33, const T & S23, const T & S13, const T & S12);

public:
/// Copy assignment operator must be defined if used
SymmetricRankTwoTensorTempl(const SymmetricRankTwoTensorTempl<T> & a) = default;

/// Copy constructor from TensorValue<T>
explicit SymmetricRankTwoTensorTempl(const TensorValue<T> & a);

Expand Down
8 changes: 8 additions & 0 deletions framework/src/meshgenerators/XYDelaunayGenerator.C
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,9 @@ XYDelaunayGenerator::generate()
next_hole_boundary_point[mh.point(pi - 1)] = mh.point(pi);
next_hole_boundary_point[mh.point(np - 1)] = mh.point(0);

#ifndef NDEBUG
int found_hole_sides = 0;
#endif
for (auto elem : hole_mesh.element_ptr_range())
{
if (elem->dim() != 2)
Expand All @@ -377,14 +379,18 @@ XYDelaunayGenerator::generate()
if (it_s->second == elem->point((s + 1) % ns))
{
hole_boundary_info.add_side(elem, s, new_hole_bcid);
#ifndef NDEBUG
++found_hole_sides;
#endif
}
}
}
mooseAssert(found_hole_sides == np, "Failed to find full outer boundary of meshed hole");

auto & mesh_boundary_info = mesh->get_boundary_info();
#ifndef NDEBUG
int found_inner_sides = 0;
#endif
for (auto elem : mesh->element_ptr_range())
{
auto ns = elem->n_sides();
Expand All @@ -395,7 +401,9 @@ XYDelaunayGenerator::generate()
if (it_s->second == elem->point(s))
{
mesh_boundary_info.add_side(elem, s, inner_bcid);
#ifndef NDEBUG
++found_inner_sides;
#endif
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions framework/src/utils/FillBetweenPointVectorsTools.C
Original file line number Diff line number Diff line change
Expand Up @@ -508,13 +508,11 @@ isBoundarySimpleClosedLoop(MeshBase & mesh,
max_node_radius = 0.0;
BoundaryInfo & boundary_info = mesh.get_boundary_info();
auto side_list_tmp = boundary_info.build_side_list();
unsigned int elem_counter = 0;
std::vector<std::pair<dof_id_type, dof_id_type>> boundary_node_assm;
for (unsigned int i = 0; i < side_list_tmp.size(); i++)
{
if (std::get<2>(side_list_tmp[i]) == bid)
{
elem_counter++;
// store two nodes of each side
boundary_node_assm.push_back(std::make_pair(mesh.elem_ptr(std::get<0>(side_list_tmp[i]))
->side_ptr(std::get<1>(side_list_tmp[i]))
Expand Down
2 changes: 1 addition & 1 deletion libmesh
Submodule libmesh updated 355 files
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Create a unique conda environment for [!ac](MOOSE), named `moose`, and install t
packages:
!style-end!

```bash
mamba create -n moose moose-dev
```
!package! code
mamba create -n moose moose-dev=__MOOSE_DEV__
!package-end!

After the installation completes, activate the new environment:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Update Conda:

```bash
!package! code
mamba activate base
mamba env remove -n moose
mamba create moose moose-dev=__MOOSE_DEV__
mamba activate moose
mamba update moose-dev
```
!package-end!

!alert note title=Always Update MOOSE and the Conda/Mamba packages together
There is a tight dependency between libraries being provided by Conda, and what libraries MOOSE
Expand Down
8 changes: 5 additions & 3 deletions modules/doc/content/help/faq/build_issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ date.
- Verify the Conda Environment is active and up to date, with the latest version of our moose
packages:

```bash
!package! code
mamba activate base
mamba env remove -n moose
mamba create -n moose moose-dev=__MOOSE_DEV__
mamba activate moose
mamba update moose-dev
```
!package-end!

if `mamba activate moose` failed, see [Conda Issues](help/troubleshooting.md#condaissues) above.

Expand Down
Loading

0 comments on commit f07619a

Please sign in to comment.