Skip to content

Commit

Permalink
Merge branch 'develop' into feature/chai-submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavis36 authored Jul 15, 2024
2 parents 1f50e9c + a5dde1d commit 6f1d305
Show file tree
Hide file tree
Showing 21 changed files with 175 additions and 146 deletions.
34 changes: 4 additions & 30 deletions .gitlab/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,38 +98,12 @@
script:
- INSTALL_DIR=/usr/gapps/Spheral/$SYS_TYPE/spheral-$SPHERAL_REV_STR
- DEV_PKG_NAME=$SYS_TYPE-spheral-dev-pkg-$SPHERAL_REV_STR
- DEV_PKG_PATH=$INSTALL_DIR/$DEV_PKG_NAME

- env SPHERAL_REV_STR=$SPHERAL_REV_STR INSTALL_DIR=$INSTALL_DIR SPEC=$SPEC SPACK_PKG_NAME=$SPACK_PKG_NAME BUILD_ALLOC="$BUILD_ALLOC" SCRIPT_DIR=$SCRIPT_DIR
bash ./$SCRIPT_DIR/lc/generate-buildcache.sh

- echo $INSTALL_DIR &> install-dir.txt
- echo $DEV_PKG_NAME &> dev-pkg-name.txt

# *** Copy spheral src and all submodules. ***
- mkdir -p $DEV_PKG_PATH/resources && cp -a $CI_PROJECT_DIR/. $DEV_PKG_PATH

### Initialize the upstream spack instance for this platform.
### - We do this to load system configs / externals for this machine.
- ./$SCRIPT_DIR/devtools/tpl-manager.py --init-only --spheral-spack-dir=$UPSTREAM_DIR --spec=none
- source $UPSTREAM_DIR/spack/share/spack/setup-env.sh

### Installation Directory w/ Spheral rev numbers.

### Create a temporary spack environement with only the TPL specs for this specific commit of Spheral
- spack env create -d $INSTALL_DIR
- spack env activate $INSTALL_DIR
- spack add $SPACK_PKG_NAME@develop%$SPEC
- spack concretize --fresh -f

# *** Pre-built binaries for $SYS_TYPE. ***
- spack buildcache create -auf -d $DEV_PKG_PATH/resources $(spack find --format /{hash})
# *** All TPL tar files. ***
- spack mirror create -a -d $DEV_PKG_PATH/resources/mirror --exclude-specs "llnlspheral spheral"
# *** Spack bootstrapping resources. ***
- spack bootstrap mirror --binary-packages $DEV_PKG_PATH/resources

### Wrap it all up.
- tar -czvf "$DEV_PKG_PATH".tar.gz -C $INSTALL_DIR $DEV_PKG_NAME

### Cleanup
- rm -rf $DEV_PKG_PATH

artifacts:
paths:
Expand Down
20 changes: 17 additions & 3 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
Version vYYYY.MM.p -- Release date YYYY-MM-DD
Version v2024.06.1 -- Release date 2024-07-09
==============================================

* Important Notes:
* This is a patch release for v2024.06.0.

* Bug Fixes / improvements:
* CD pipeline hotfix for installing release builds on LC machines.
* Fixes an issue with the use of the axom::quest::SignedDistance interface.

Version v2024.06.0 -- Release date 2024-06-27
==============================================
* Important Notes:
* External users of the code will need to supply config files for tpl-manager to find system libraries correctly. Steps to do this are detailed in the external user build guide.

Notable changes include:

* New features/ API changes:
* added MFV hydro from Hopkins 2015 with extension for ALE options
* New features / API changes:
* Added MFV hydro from Hopkins 2015 with extension for ALE options.
* Adding optional user specified smoothing scale method for SPH, FSISPH, and CRKSPH.

* Build changes / improvements:
* PYBind11 libraries no longer depend on the structure of the PYB11 source directory.
Expand All @@ -24,6 +35,9 @@ Notable changes include:
* Versions for python dependencies in the Spheral spack recipe are fixed and updated (in some cases).

* Bug Fixes / improvements:
* Corrected an erroneous VERIFY in the P-alpha porosity constructor (with Fields of porosity and sound speed) that forced runs to stop even with correct input parameters
* Fixed a bug in the standard ASPH hydros (ASPH, SolidASPH, and RZ varieties) that gave incorrect results. FSI ad CRK models with ASPH smoothing scales were OK, but standard
SPH using ASPH smoothing scales were simply incorrect for non-unit aspect ratio H's. Also added ATS tests to help catch such errors going forward.

Version v2024.01.1 -- Release date 2024-02-17
==============================================
Expand Down
19 changes: 0 additions & 19 deletions cmake/FindSphinx.cmake

This file was deleted.

1 change: 1 addition & 0 deletions cmake/SetupSpheral.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ set(Python3_EXECUTABLE ${python_DIR}/bin/python3)

set(ENABLE_MPI ON CACHE BOOL "")
set(ENABLE_OPENMP ON CACHE BOOL "")
set(BLT_DOCS_TARGET_NAME "blt_docs" CACHE STRING "")

if(NOT SPHERAL_BLT_DIR)
set (SPHERAL_BLT_REL_DIR "${SPHERAL_ROOT_DIR}/cmake/blt" CACHE PATH "")
Expand Down
2 changes: 1 addition & 1 deletion cmake/SpheralVersion.cmake
Original file line number Diff line number Diff line change
@@ -1 +1 @@
set(SPHERAL_VERSION 2024.01.1)
set(SPHERAL_VERSION 2024.06.1)
13 changes: 3 additions & 10 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
#find_package(Sphinx)
set(SPHINX_FOUND true)
if (NOT DEFINED SPHINX_EXEC)
set(SPHINX_EXEC "${sphinx_DIR}/bin/sphinx-build" CACHE STRING "Path to sphinx documentation generator")
endif()
message("-- Sphinx ${SPHINX_EXEC}")

if(ENABLE_DOCS AND NOT SPHINX_EXEC STREQUAL "SPHINX_EXEC-NOTFOUND")
if(ENABLE_DOCS)
if(NOT DEFINED SPHINX_THEME)
set(SPHINX_THEME sphinx_rtd_theme)
endif()
Expand All @@ -28,8 +21,8 @@ if(ENABLE_DOCS AND NOT SPHINX_EXEC STREQUAL "SPHINX_EXEC-NOTFOUND")
"${BINARY_BUILD_DIR}/conf.py"
@ONLY)

add_custom_target(Spheral_docs ALL
${CMAKE_COMMAND} -E env PYTHONPATH=${SPACK_PYTHONPATH} ${PYTHON_EXE} -m sphinx
add_custom_target(docs ALL
env PYTHONPATH=${SPACK_PYTHONPATH} ${PYTHON_EXE} -m sphinx
-q -b html
-c "${BINARY_BUILD_DIR}"
-d "${SPHINX_CACHE_DIR}"
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
author = 'J. Michael Owen'

# The short X.Y version
version = '2024.01.1'
version = '2024.06.1'
# The full version, including alpha/beta/rc tags
release = '2024.01.1'
release = '2024.06.1'


# -- General configuration ---------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ copyright = '2012, LLNS'
author = 'J. Michael Owen'

# The short X.Y version
version = '2024.01.1'
version = '2024.06.1'
# The full version, including alpha/beta/rc tags
release = '2024.01.1'
release = '2024.06.1'


# -- General configuration ---------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions docs/developer/dev/continuous_deployment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ to their environment.

On LC systems we maintain:
* ``Spheral/risky``
* ``Spheral/2024.06.1``
* ``Spheral/2024.01.1``
* ``Spheral/2023.06.0``
* ``Spheral/2023.03.1``
* ``Spheral/2023.03.0`` (deprecated as of TOSS4 upgrade)
* ``Spheral/2022.06.0`` (deprecated as of TOSS4 upgrade)

Spheral/risky
=============
Expand Down
46 changes: 46 additions & 0 deletions scripts/lc/generate-buildcache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
trap 'echo "# $BASH_COMMAND"' DEBUG

SPEC=${SPEC:-gcc@10.3.1}
SPACK_PKG_NAME=${SPACK_PKG_NAME:-spheral}
SPHERAL_SPEC=$SPACK_PKG_NAME@develop%$SPEC
echo $SPHERAL_SPEC

INSTALL_DIR=${INSTALL_DIR:-$PWD/../$SYS_TYPE/spheral-cache}
SPHERAL_REV_STR=${SPHERAL_REV_STR:-undefined}


UPSTREAM_DIR=${UPSTREAM_DIR:-/usr/WS2/sduser/Spheral/spack_upstream/0.22}
SCRIPT_DIR=${SCRIPT_DIR:-'scripts'}
DEV_PKG_NAME=$SYS_TYPE-spheral-dev-pkg-$SPHERAL_REV_STR
DEV_PKG_DIR=$INSTALL_DIR/$DEV_PKG_NAME

CI_PROJECT_DIR=${CI_PROJECT_DIR:-$PWD}

RESOURCE_DIR=$DEV_PKG_DIR/resources
echo $RESOURCE_DIR

echo $INSTALL_DIR
#echo $INSTALL_DIR &> install-dir.txt

echo $DEV_PKG_DIR
#echo $DEV_PKG_NAME &> dev-pkg-name.txt

rm -rf $INSTALL_DIR
mkdir -p $RESOURCE_DIR && cp -a $CI_PROJECT_DIR/. $DEV_PKG_DIR

./$SCRIPT_DIR/devtools/tpl-manager.py --init-only --spheral-spack-dir=$UPSTREAM_DIR --spec=none
source $UPSTREAM_DIR/spack/share/spack/setup-env.sh

spack env rm -y -f $INSTALL_DIR
spack env create -d $INSTALL_DIR
spack env activate $INSTALL_DIR
spack add $SPHERAL_SPEC
spack concretize -f --fresh --deprecated

spack mirror create -a -d $RESOURCE_DIR/mirror --exclude-specs "llnlspheral spheral"
spack buildcache push -auf $RESOURCE_DIR/mirror $(spack find --format /{hash})

spack bootstrap mirror --binary-packages $RESOURCE_DIR

tar -czf $DEV_PKG_DIR.tar.gz -C $INSTALL_DIR $DEV_PKG_NAME

9 changes: 6 additions & 3 deletions scripts/lc/install-from-dev-pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@ echo $INSTALL_DIR
echo $SCRIPT_DIR
echo $BUILD_ALLOC

rm -rf $INSTALL_DIR
mkdir -p $INSTALL_DIR

./$SCRIPT_DIR/devtools/tpl-manager.py --spack-url $SPACK_URL --init-only --spec=none --no-upstream --spheral-spack-dir $INSTALL_DIR/spheral-spack-tpls

source $INSTALL_DIR/spheral-spack-tpls/spack/share/spack/setup-env.sh
spack bootstrap add --trust local-sources $PWD/resources/metadata/sources
spack bootstrap add --trust local-binaries $PWD/resources/metadata/binaries
spack mirror add spheral-mirror $PWD/resources/mirror
spack mirror add spheral-cache $PWD/resources
spack buildcache update-index -d $PWD/resources
spack mirror rm spheral-mirror
spack mirror rm spheral-cache
spack mirror add --unsigned spheral-mirror $PWD/resources/mirror
spack mirror add --unsigned spheral-cache $PWD/resources
spack buildcache update-index $PWD/resources/mirror

$BUILD_ALLOC spack install --fresh --deprecated --no-check-signature --only dependencies $SPACK_PKG_NAME@develop%$SPEC

Expand Down
1 change: 1 addition & 0 deletions scripts/spack/configs/toss_4_x86_64_ib/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ packages:
mpi: [mvapich2]
pkgconfig: [pkg-config]
pil: [py-pillow]
jpeg: [libjpeg]
zlib-api: [zlib]
cmake:
version: [3.23.1]
Expand Down
12 changes: 7 additions & 5 deletions src/CRKSPH/CRKSPHHydros.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def CRKSPH(dataBase,
damageRelieveRubble = False,
ASPH = False,
etaMinAxis = 0.1,
crktype = "default"):
crktype = "default",
smoothingScaleMethod = None):

# We use the provided DataBase to sniff out what sort of NodeLists are being
# used, and based on this determine which SPH object to build.
Expand Down Expand Up @@ -62,10 +63,11 @@ def CRKSPH(dataBase,
Q = eval("LimitedMonaghanGingoldViscosity%id(Clinear=%g, Cquadratic=%g)" % (ndim, Cl, Cq))

# Smoothing scale update
if ASPH:
smoothingScaleMethod = eval("ASPHSmoothingScale%id()" % ndim)
else:
smoothingScaleMethod = eval("SPHSmoothingScale%id()" % ndim)
if smoothingScaleMethod is None:
if ASPH:
smoothingScaleMethod = eval("ASPHSmoothingScale%id()" % ndim)
else:
smoothingScaleMethod = eval("SPHSmoothingScale%id()" % ndim)

# Build the constructor arguments
kwargs = {"smoothingScaleMethod" : smoothingScaleMethod,
Expand Down
63 changes: 33 additions & 30 deletions src/FSISPH/FSISPHHydros.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,34 @@
dims = spheralDimensions()

def FSISPH(dataBase,
W,
Q = None,
slides=None,
cfl = 0.35,
surfaceForceCoefficient=0.0,
densityStabilizationCoefficient=0.1,
specificThermalEnergyDiffusionCoefficient=0.1,
xsphCoefficient=0.0,
interfaceMethod=HLLCInterface,
kernelAveragingMethod = NeverAverageKernels,
sumDensityNodeLists=[],
useVelocityMagnitudeForDt = False,
compatibleEnergyEvolution = True,
evolveTotalEnergy = False,
linearCorrectGradients = True,
planeStrain = False,
interfacePmin = 0.0,
interfaceNeighborAngleThreshold=0.707,
HUpdate = IdealH,
densityUpdate = FSISumMassDensity,
epsTensile = 0.0,
nTensile = 4.0,
xmin = (-1e100, -1e100, -1e100),
xmax = ( 1e100, 1e100, 1e100),
ASPH = False,
RZ = False):
W,
Q = None,
slides=None,
cfl = 0.35,
surfaceForceCoefficient=0.0,
densityStabilizationCoefficient=0.1,
specificThermalEnergyDiffusionCoefficient=0.1,
xsphCoefficient=0.0,
interfaceMethod=HLLCInterface,
kernelAveragingMethod = NeverAverageKernels,
sumDensityNodeLists=[],
useVelocityMagnitudeForDt = False,
compatibleEnergyEvolution = True,
evolveTotalEnergy = False,
linearCorrectGradients = True,
planeStrain = False,
interfacePmin = 0.0,
interfaceNeighborAngleThreshold=0.707,
HUpdate = IdealH,
densityUpdate = FSISumMassDensity,
epsTensile = 0.0,
nTensile = 4.0,
xmin = (-1e100, -1e100, -1e100),
xmax = ( 1e100, 1e100, 1e100),
ASPH = False,
RZ = False,
smoothingScaleMethod = None):

######################################################################
# some of these parameters are inactive and possible on there was out.
# strengthInDamage and damageRelieveRubble are old switches and are not
Expand Down Expand Up @@ -86,10 +88,11 @@ def FSISPH(dataBase,
slides = eval("SlideSurface%id(dataBase,contactTypes)" % ndim)

# Smoothing scale update
if ASPH:
smoothingScaleMethod = eval("ASPHSmoothingScale%id()" % ndim)
else:
smoothingScaleMethod = eval("SPHSmoothingScale%id()" % ndim)
if smoothingScaleMethod is None:
if ASPH:
smoothingScaleMethod = eval("ASPHSmoothingScale%id()" % ndim)
else:
smoothingScaleMethod = eval("SPHSmoothingScale%id()" % ndim)

# Build the constructor arguments
xmin = (ndim,) + xmin
Expand Down
3 changes: 0 additions & 3 deletions src/Porosity/PalphaPorosity.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ PalphaPorosity(const SolidNodeList<Dimension>& nodeList,
for (auto i = 0u; i < n; ++i) {
mc0[i] = c0[i];
}
const auto alpha0_min = mAlpha0.min();
VERIFY2((1.0 <= mAlphae) and (mAlphae <= mAlphat) and (mAlphat <= alpha0_min),
"PalphaPorosity input ERROR : require 1.0 <= alphae <= alphat <= alpha0, (alphae, alphat, alpha0) = " << mAlphae << ", " << mAlphat << ", " << alpha0_min);
}
}

Expand Down
11 changes: 6 additions & 5 deletions src/SPH/SPHHydroBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -843,15 +843,16 @@ evaluateDerivatives(const typename Dimension::Scalar time,
const auto etaj = Hj*rij;
const auto etaMagi = etai.magnitude();
const auto etaMagj = etaj.magnitude();
const auto etaUnit = etai*safeInvVar(etaMagi);
const auto etaiUnit = etai*safeInvVar(etaMagi);
const auto etajUnit = etaj*safeInvVar(etaMagj);
CHECK(etaMagi >= 0.0);
CHECK(etaMagj >= 0.0);

// Symmetrized kernel weight and gradient.
W.kernelAndGradValue(etaMagi, Hdeti, Wi, gWi);
W.kernelAndGradValue(etaMagj, Hdetj, Wj, gWj);
gradWi = gWi*Hi*etaUnit;
gradWj = gWj*Hj*etaUnit;
gradWi = gWi*Hi*etaiUnit;
gradWj = gWj*Hj*etajUnit;
if (oneKernel) {
WQi = Wi;
WQj = Wj;
Expand All @@ -860,8 +861,8 @@ evaluateDerivatives(const typename Dimension::Scalar time,
} else {
WQ.kernelAndGradValue(etaMagi, Hdeti, WQi, gWQi);
WQ.kernelAndGradValue(etaMagj, Hdetj, WQj, gWQj);
gradWQi = gWQi*Hi*etaUnit;
gradWQj = gWQj*Hj*etaUnit;
gradWQi = gWQi*Hi*etaiUnit;
gradWQj = gWQj*Hj*etajUnit;
}

// Zero'th and second moment of the node distribution -- used for the
Expand Down
Loading

0 comments on commit 6f1d305

Please sign in to comment.