Skip to content

Commit

Permalink
Merge pull request #27605 from cticenhour/petsc-3211
Browse files Browse the repository at this point in the history
Update PETSc to 3.21.4 and fixup breaking tests
  • Loading branch information
loganharbour authored Aug 13, 2024
2 parents bdbf31a + 076c686 commit a062c21
Show file tree
Hide file tree
Showing 34 changed files with 133 additions and 41 deletions.
1 change: 1 addition & 0 deletions apptainer/petsc.def
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ From: {{ APPTAINER_FROM }}
%files
{{ MOOSE_DIR }}/scripts/configure_petsc.sh {{ ROOT_BUILD_DIR }}/scripts/configure_petsc.sh
{{ MOOSE_DIR }}/scripts/update_and_rebuild_petsc.sh {{ ROOT_BUILD_DIR }}/scripts/update_and_rebuild_petsc.sh
{{ MOOSE_DIR }}/scripts/tao_restore_viewer.patch {{ ROOT_BUILD_DIR }}/scripts/tao_restore_viewer.patch
{%- if PETSC_ALT is defined %}
{{ MOOSE_DIR }}/scripts/update_and_rebuild_petsc_alt.sh {{ ROOT_BUILD_DIR }}/scripts/update_and_rebuild_petsc_alt.sh
{%- endif %}
2 changes: 1 addition & 1 deletion conda/libmesh-vtk/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mpi:
- openmpi

moose_mpi:
- moose-mpi 2024.07.10
- moose-mpi 2024.08.05

#### 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 = 0 %}
{% set build = 1 %}
{% set vtk_version = "9.3.0" %}
{% set vtk_friendly_version = "9.3" %}
{% set sha256 = "fdc7b9295225b34e4fdddc49cd06e66e94260cb00efee456e0f66568c9681be9" %}
Expand Down
8 changes: 4 additions & 4 deletions conda/libmesh/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ mpi:
- openmpi

moose_petsc:
- moose-petsc 3.20.3 mpich_1
- moose-petsc 3.20.3 openmpi_1
- moose-petsc 3.21.4 mpich_0
- moose-petsc 3.21.4 openmpi_0

moose_libmesh_vtk:
- moose-libmesh-vtk 9.3.0 mpich_0
- moose-libmesh-vtk 9.3.0 openmpi_0
- moose-libmesh-vtk 9.3.0 mpich_1
- moose-libmesh-vtk 9.3.0 openmpi_1

zip_keys:
- mpi
Expand Down
2 changes: 1 addition & 1 deletion conda/libmesh/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,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 build = 1 %}
{% set version = "2024.07.27" %}

package:
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
Expand Up @@ -3,8 +3,8 @@ mpi:
- openmpi

moose_libmesh:
- moose-libmesh 2024.07.27 mpich_0
- moose-libmesh 2024.07.27 openmpi_0
- moose-libmesh 2024.07.27 mpich_1
- moose-libmesh 2024.07.27 openmpi_1

moose_wasp:
- moose-wasp 2024.05.08
Expand All @@ -13,7 +13,7 @@ moose_tools:
- moose-tools 2024.07.19

moose_peacock:
- moose-peacock 2024.07.10
- moose-peacock 2024.08.05

zip_keys:
- mpi
Expand Down
2 changes: 1 addition & 1 deletion conda/moose-dev/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# framework/doc/packages_config.yml
#
# As well as any directions pertaining to modifying those files.
{% set version = "2024.07.27" %}
{% set version = "2024.08.05" %}

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
Expand Up @@ -3,7 +3,7 @@ mpi:
- openmpi

moose_dev:
- moose-dev 2024.07.27
- moose-dev 2024.08.05

#### Darwin SDK SYSROOT
CONDA_BUILD_SYSROOT: # [osx]
Expand Down
20 changes: 17 additions & 3 deletions conda/mpi/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,23 @@ ACTIVATION_CXXFLAGS=${TEMP_CXXFLAGS%%-fdebug-prefix-map*}-std=c++17
mkdir -p "${PREFIX}/etc/conda/activate.d" "${PREFIX}/etc/conda/deactivate.d"
cat <<EOF > "${PREFIX}/etc/conda/activate.d/activate_${PKG_NAME}.sh"
export CC=mpicc CXX=mpicxx FC=mpif90 F90=mpif90 F77=mpif77 C_INCLUDE_PATH=${PREFIX}/include \
MOOSE_NO_CODESIGN=true MPIHOME=${PREFIX} CXXFLAGS="$ACTIVATION_CXXFLAGS" HDF5_DIR=${PREFIX} \
FI_PROVIDER=tcp
MOOSE_NO_CODESIGN=true MPIHOME=${PREFIX} CXXFLAGS="$ACTIVATION_CXXFLAGS" HDF5_DIR=${PREFIX}
EOF
cat <<EOF > "${PREFIX}/etc/conda/deactivate.d/deactivate_${PKG_NAME}.sh"
unset CC CXX FC F90 F77 C_INCLUDE_PATH MOOSE_NO_CODESIGN MPIHOME CXXFLAGS HDF5_DIR FI_PROVIDER
unset CC CXX FC F90 F77 C_INCLUDE_PATH MOOSE_NO_CODESIGN MPIHOME CXXFLAGS HDF5_DIR
EOF
if [[ "${mpi}" == 'mpich' ]]; then
cat <<EOF >> "${PREFIX}/etc/conda/activate.d/activate_${PKG_NAME}.sh"
export FI_PROVIDER=tcp
EOF
cat <<EOF >> "${PREFIX}/etc/conda/deactivate.d/deactivate_${PKG_NAME}.sh"
unset FI_PROVIDER
EOF
elif [[ "${mpi}" == 'openmpi' ]]; then
cat <<EOF >> "${PREFIX}/etc/conda/activate.d/activate_${PKG_NAME}.sh"
export OMPI_MCA_mca_base_component_show_load_errors=0
EOF
cat <<EOF >> "${PREFIX}/etc/conda/deactivate.d/deactivate_${PKG_NAME}.sh"
unset OMPI_MCA_mca_base_component_show_load_errors
EOF
fi
2 changes: 1 addition & 1 deletion conda/mpi/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 version = "2024.07.10" %}
{% set version = "2024.08.05" %}

# HDF5 Version
{% set hdf5_version = "1.14.3" %}
Expand Down
2 changes: 1 addition & 1 deletion conda/peacock/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mpi:
- openmpi

moose_mpi:
- moose-mpi 2024.07.10
- moose-mpi 2024.08.05

# 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 = "2024.07.10" %}
{% set version = "2024.08.05" %}

package:
name: moose-peacock
Expand Down
8 changes: 5 additions & 3 deletions conda/petsc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export PETSC_ARCH=arch-conda-c-opt
# Remove std=C++17 from CXXFLAGS as we specify the C++ dialect for PETSc as C++17 in configure_petsc.
# Specifying both causes an error as of PETSc 3.17.
CXXFLAGS=${CXXFLAGS//-std=c++[0-9][0-9]}
# This linker argument leads to segmentation faults when testing MUMPS during PETSc make check. We
# are not the only ones who have had problems with this option. See
# https://gitlab.c3s.unito.it/enocera/nnpdf/-/issues/307
LDFLAGS=${LDFLAGS//-Wl,-dead_strip_dylibs}

## TODO: the following is a partial requirement for the day we introduce pytorch
# Handle switches created by Conda variants
Expand Down Expand Up @@ -54,9 +58,7 @@ function build_petsc() {
make PETSC_DIR="$SRC_DIR" PETSC_ARCH=$PETSC_ARCH install
# set forth by MPI conda-forge package
# shellcheck disable=SC2154
if [[ "${mpi}" == 'mpich' ]]; then
make PETSC_DIR="$SRC_DIR" PETSC_ARCH=$PETSC_ARCH check
fi
make SLEPC_DIR="$PREFIX"/petsc PETSC_DIR="$PREFIX"/petsc PETSC_ARCH="" check
}

function no_exit_failure(){
Expand Down
2 changes: 1 addition & 1 deletion conda/petsc/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mpi:
- openmpi

moose_mpi:
- moose-mpi 2024.07.10
- moose-mpi 2024.08.05

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

package:
name: moose-petsc
Expand All @@ -19,6 +19,7 @@ source:
- path: ../../scripts/configure_petsc.sh
- patches:
- no-cppflags-in-pkgconfig-cflags.patch
- ../../scripts/tao_restore_viewer.patch

build:
number: {{ build }}
Expand Down
2 changes: 1 addition & 1 deletion docker_ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ WORKDIR ${MOOSE_DIR}
#-----------------------------------------------------------------------------#
# Install PETSc to system path
#-----------------------------------------------------------------------------#
ARG PETSC_REV=9a61b8cbbacd10b14c2a18c9bc314b0ecb8ec018
ARG PETSC_REV=0d6defa7a01093b0f9cf3ff983d2b19d1f01a13e
ARG PETSC_OPTIONS
ENV PETSC_DIR=/usr/local
COPY scripts/update_and_rebuild_petsc.sh ${MOOSE_DIR}/scripts/update_and_rebuild_petsc.sh
Expand Down
4 changes: 2 additions & 2 deletions framework/doc/packages_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ maximum_python: 3.11
mpich: 4.2.1
openmpi: 4.1.6
petsc_alt: 3.11.4
petsc: 3.20.3
moose_dev: 2024.07.27
petsc: 3.21.4
moose_dev: 2024.08.05
moose_tools: 2024.07.19
apptainer_rockylinux: 8.8.20230518
apptainer_mpich: 3.4.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ name = 'small'
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
c_normal = 1e3
[]
[]

Expand Down Expand Up @@ -147,13 +147,13 @@ name = 'small'
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount -pc_factor_mat_solver_type'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15 mumps'
end_time = 5.0
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
line_search = 'none'
[]

[Postprocessors]
Expand Down
2 changes: 1 addition & 1 deletion modules/heat_transfer/test/tests/heat_source_bar/tests
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
type = 'PetscJacobianTester'
input = 'ad_heat_source_bar.i'
ratio_tol = 2e-7
difference_tol = 1e-2
difference_tol = 2e-2
run_sim = True
requirement = 'The system shall produce correct Jacobians for the AD heat conduction and heat source kernel objects.'
design = "ADMatHeatSource.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
[Executioner]
type = Optimize
tao_solver = taobncg
petsc_options_iname='-tao_fd_test -tao_test_gradient -tao_fd_gradient -tao_fd_delta'
petsc_options_value='true true false 1e-8'
petsc_options_iname='-tao_fd_test -tao_test_gradient -tao_fd_gradient -tao_fd_delta -tao_ls_type'
petsc_options_value='true true false 1e-8 unit'
petsc_options = '-tao_test_gradient_view'
verbose = true
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
COORDINATES absolute 1.e-6 # min separation not calculated

TIME STEPS relative 5.5e-6 floor 1e-10 # min: 0 @ t1 max: 0.0003 @ t4


# No GLOBAL VARIABLES

NODAL VARIABLES relative 5.5e-6 floor 1e-10
w relative 6e-06 # min: 0 @ t1,n1 max: 8.1220764 @ t2,n609

ELEMENT VARIABLES relative 5.5e-6 floor 1e-10

# No NODESET VARIABLES

# No SIDESET VARIABLES
1 change: 1 addition & 0 deletions modules/phase_field/test/tests/GrandPotentialPFM/tests
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
type = 'Exodiff'
input = 'GrandPotentialStrictMassConservation.i'
exodiff = 'GrandPotentialStrictMassConservation_out.e'
custom_cmp = GrandPotentialStrictMassConservation.cmp
issues = '#23329'
design = '/GrandPotentialKernelAction.md'
requirement = 'The system shall provide classes to implement a Grand Potential phase field '
Expand Down
1 change: 1 addition & 0 deletions modules/porous_flow/test/tests/actions/tests
Original file line number Diff line number Diff line change
Expand Up @@ -206,5 +206,6 @@
issues = '#28030'
design = 'actions/PorousFlowFullySaturated.md actions/PorousFlowBasicTHM.md actions/PorousFlowUnsaturated.md'
valgrind = 'heavy'
method = "!dbg"
[]
[]
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@
type = Steady
solve_type = Newton
nl_rel_tol = 1E-12
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'NONZERO'
petsc_options_iname = '-pc_factor_shift_type -snes_linesearch_type'
petsc_options_value = 'NONZERO basic'
[]

[Outputs]
Expand Down
2 changes: 1 addition & 1 deletion modules/richards/test/tests/pressure_pulse/pp22.i
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
solve_type = Newton
dt = 1E3
dtmin = 1E3
nl_rel_tol=1.e-10
nl_rel_tol=8.e-8
nl_max_its=20
end_time = 1E4
[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
exodiff_opts = '-steps 0:1200:1'
valgrind = HEAVY
requirement = 'The MOOSE SolidMechanics module shall simulate exponential stress relase while using the rz coordinate system using AD and match non-AD methods.'
method = "!dbg"
[]
[power]
type = Exodiff
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@
detail = 'continue to compute the plastic shear due to twinning after '
'a simulation restart.'
prereq = 'constiutive_model/only_twinning_fcc'
method = "!dbg"
[]
[combined_twinning_slip_111tension_restart]
type = CSVDiff
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TIME STEPS relative 5.5e-06 floor 1e-10

GLOBAL VARIABLES relative 5.5e-06 floor 1e-10
core_delta_p relative 3e-05
3 changes: 2 additions & 1 deletion modules/thermal_hydraulics/tutorials/single_phase_flow/tests
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@
csvdiff = '04_loop_out.csv'
cli_args = 'Outputs/csv=true Executioner/num_steps=10'
recover = false
max_parallel = 1
detail = 'fourth step,'
# PR #26848. Clang 16 Apple Si is not compatible.
machine = X86_64
rel_err = 4e-5
[]
[05]
type = CSVDiff
input = '05_secondary_side.i'
csvdiff = '05_secondary_side_out.csv'
comparison_file = 05_secondary_side.cmp
cli_args = 'Outputs/csv=true Executioner/num_steps=10'
recover = false
max_parallel = 1
Expand Down
2 changes: 1 addition & 1 deletion petsc
Submodule petsc updated from 1580af to 0d6def
Loading

0 comments on commit a062c21

Please sign in to comment.