Skip to content

Commit

Permalink
Merge pull request #283 from LLNL/hotfix/cd-pipeline
Browse files Browse the repository at this point in the history
Hotfix CD pipeline
  • Loading branch information
mdavis36 authored Jul 9, 2024
2 parents cdd7c1d + 961700c commit 93ebb5d
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 36 deletions.
34 changes: 4 additions & 30 deletions .gitlab/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,38 +78,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
10 changes: 10 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
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:
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
4 changes: 1 addition & 3 deletions src/Geometry/GeomPolyhedron.cc
Original file line number Diff line number Diff line change
Expand Up @@ -984,9 +984,7 @@ buildAxomData() const {
mSurfaceMeshQueryPtr = new AxOctree(bb, mSurfaceMeshPtr);
mSurfaceMeshQueryPtr->generateIndex();
mSignedDistancePtr = new AxDistance(mSurfaceMeshPtr,
true, // is_watertight
25, // max_objects
10); // max_levels
true); // is_watertight
}

//------------------------------------------------------------------------------
Expand Down

0 comments on commit 93ebb5d

Please sign in to comment.