Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 12 additions & 34 deletions .github/workflows/ubuntu-ci-x86_64-gnu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,11 @@ jobs:

- name: prepare-directories
run: |
# DH* REVERT ME AFTER MERGE
mkdir -p ${BUILD_CACHE_PATH}
mkdir -p ${SOURCE_CACHE_PATH}

- name: create-buildcache
run: |
# Get day of week to decide whether to use build caches or not
DOW=$(date +%u)
# Monday is 1 ... Sunday is 7
if [[ $DOW == 7 ]]; then
export USE_BINARY_CACHE=false
echo "Ignore existing binary cache for creating buildcache environment"
else
export USE_BINARY_CACHE=true
echo "Use existing binary cache for creating buildcache environment"
fi

# Set up spack-stack
source ./setup.sh

Expand Down Expand Up @@ -118,23 +106,22 @@ jobs:
# Add additional variants for MET packages, different from config/common/packages.yaml
spack config add "packages:met:variants:+python +grib2 +graphics +lidar2nc +modis"

# Concretize and check for duplicates
# Concretize, check for duplicates and for correct compilers being used
spack concretize --force --fresh 2>&1 | tee log.concretize.${ENVNAME}
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -i fms -i crtm -i crtm-fix -i esmf -i mapl -i py-cython -i neptune-env -i fms -i ip
spack stack check-preferred-compiler 2>&1 | tee log.check-preferred-compiler.${ENVNAME}

# Add and update source cache
spack mirror add local-source file://${SOURCE_CACHE_PATH}/
spack mirror create -a -d ${SOURCE_CACHE_PATH}/

# Add binary cache if requested
if [ "$USE_BINARY_CACHE" = true ] ; then
set +e
spack mirror add local-binary file://${BUILD_CACHE_PATH}/
spack buildcache update-index local-binary
set -e
echo "Packages in spack binary cache:"
spack buildcache list
fi
# Add binary cache
set +e
spack mirror add local-binary file://${BUILD_CACHE_PATH}/
spack buildcache update-index local-binary
set -e
echo "Packages in spack binary cache:"
spack buildcache list

# Break installation up in pieces and create build caches in between
# This allows us to "spin up" builds that altogether take longer than
Expand Down Expand Up @@ -169,11 +156,6 @@ jobs:
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.${ENVNAME}.all
spack buildcache create -u local-binary

# Remove binary cache for next round of concretization
if [ "$USE_BINARY_CACHE" = true ] ; then
spack mirror rm local-binary
fi

# Remove buildcache config settings
spack config remove config:install_tree:padded_length

Expand All @@ -196,14 +178,10 @@ jobs:
rsync -av --exclude='install' --exclude='spack.lock' --exclude='.spack_db' ${BUILDCACHE_ENVDIR}/ ${ENVDIR}/
spack env activate ${ENVDIR}

# Concretize and check for duplicates
spack concretize --force 2>&1 | tee log.concretize.${ENVNAME}
# Concretize, check for duplicates and for correct compilers being used
spack concretize --force --fresh 2>&1 | tee log.concretize.${ENVNAME}
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -i fms -i crtm -i crtm-fix -i esmf -i mapl -i py-cython -i neptune-env -i fms -i ip

# Add binary cache back in
spack mirror add local-binary file://${BUILD_CACHE_PATH}/
echo "Packages in combined spack build caches:"
spack buildcache list
spack stack check-preferred-compiler 2>&1 | tee log.check-preferred-compiler.${ENVNAME}

# Install from cache
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.${ENVNAME}.all
Expand Down
46 changes: 12 additions & 34 deletions .github/workflows/ubuntu-ci-x86_64-oneapi-ifx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,11 @@ jobs:

- name: prepare-directories
run: |
# DH* REVERT ME AFTER MERGE
mkdir -p ${BUILD_CACHE_PATH}
mkdir -p ${SOURCE_CACHE_PATH}

- name: create-buildcache
run: |
# Get day of week to decide whether to use build caches or not
DOW=$(date +%u)
# Monday is 1 ... Sunday is 7
if [[ $DOW == 7 ]]; then
export USE_BINARY_CACHE=false
echo "Ignore existing binary cache for creating buildcache environment"
else
export USE_BINARY_CACHE=true
echo "Use existing binary cache for creating buildcache environment"
fi

# Set up spack-stack
source ./setup.sh

Expand Down Expand Up @@ -134,23 +122,22 @@ jobs:
# Don't generate ecflow module when using external package
spack config add "modules:default:tcl:exclude:[ecflow]"

# Concretize and check for duplicates
# Concretize, check for duplicates and for correct compilers being used
spack concretize --force --fresh 2>&1 | tee log.concretize.${ENVNAME}
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -i fms -i crtm -i crtm-fix -i esmf -i mapl -i py-cython -i neptune-env -i fms -i ip
spack stack check-preferred-compiler 2>&1 | tee log.check-preferred-compiler.${ENVNAME}

# Add and update source cache
spack mirror add local-source file://${SOURCE_CACHE_PATH}/
spack mirror create -a -d ${SOURCE_CACHE_PATH}/

# Add binary cache if requested
if [ "$USE_BINARY_CACHE" = true ] ; then
set +e
spack mirror add local-binary file://${BUILD_CACHE_PATH}/
spack buildcache update-index local-binary
set -e
echo "Packages in spack binary cache:"
spack buildcache list
fi
# Add binary cache
set +e
spack mirror add local-binary file://${BUILD_CACHE_PATH}/
spack buildcache update-index local-binary
set -e
echo "Packages in spack binary cache:"
spack buildcache list

# Break installation up in pieces and create build caches in between
# This allows us to "spin up" builds that altogether take longer than
Expand Down Expand Up @@ -188,11 +175,6 @@ jobs:
# Check for libirc.so in shared libraries (returns 1=error if found)
${SPACK_STACK_DIR}/util/check_libirc.sh

# Remove binary cache for next round of concretization
if [ "$USE_BINARY_CACHE" = true ] ; then
spack mirror rm local-binary
fi

# Remove buildcache config settings
spack config remove config:install_tree:padded_length

Expand All @@ -215,14 +197,10 @@ jobs:
rsync -av --exclude='install' --exclude='spack.lock' --exclude='.spack_db' ${BUILDCACHE_ENVDIR}/ ${ENVDIR}/
spack env activate ${ENVDIR}

# Concretize and check for duplicates
spack concretize --force 2>&1 | tee log.concretize.${ENVNAME}
# Concretize, check for duplicates and for correct compilers being used
spack concretize --force --fresh 2>&1 | tee log.concretize.${ENVNAME}
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -i fms -i crtm -i crtm-fix -i esmf -i mapl -i py-cython -i neptune-env -i fms -i ip

# Add binary cache back in
spack mirror add local-binary file://${BUILD_CACHE_PATH}/
echo "Packages in combined spack build caches:"
spack buildcache list
spack stack check-preferred-compiler 2>&1 | tee log.check-preferred-compiler.${ENVNAME}

# Install from cache
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.${ENVNAME}.all
Expand Down
46 changes: 12 additions & 34 deletions .github/workflows/ubuntu-ci-x86_64-oneapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,11 @@ jobs:

- name: prepare-directories
run: |
# DH* REVERT ME AFTER MERGE
mkdir -p ${BUILD_CACHE_PATH}
mkdir -p ${SOURCE_CACHE_PATH}

- name: create-buildcache
run: |
# Get day of week to decide whether to use build caches or not
DOW=$(date +%u)
# Monday is 1 ... Sunday is 7
if [[ $DOW == 7 ]]; then
export USE_BINARY_CACHE=false
echo "Ignore existing binary cache for creating buildcache environment"
else
export USE_BINARY_CACHE=true
echo "Use existing binary cache for creating buildcache environment"
fi

# Set up spack-stack
source ./setup.sh

Expand Down Expand Up @@ -134,23 +122,22 @@ jobs:
# Don't generate ecflow module when using external package
spack config add "modules:default:tcl:exclude:[ecflow]"

# Concretize and check for duplicates
# Concretize, check for duplicates and for correct compilers being used
spack concretize --force --fresh 2>&1 | tee log.concretize.${ENVNAME}
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -i fms -i crtm -i crtm-fix -i esmf -i mapl -i py-cython -i neptune-env -i fms -i ip
spack stack check-preferred-compiler 2>&1 | tee log.check-preferred-compiler.${ENVNAME}

# Add and update source cache
spack mirror add local-source file://${SOURCE_CACHE_PATH}/
spack mirror create -a -d ${SOURCE_CACHE_PATH}/

# Add binary cache if requested
if [ "$USE_BINARY_CACHE" = true ] ; then
set +e
spack mirror add local-binary file://${BUILD_CACHE_PATH}/
spack buildcache update-index local-binary
set -e
echo "Packages in spack binary cache:"
spack buildcache list
fi
# Add binary cache
set +e
spack mirror add local-binary file://${BUILD_CACHE_PATH}/
spack buildcache update-index local-binary
set -e
echo "Packages in spack binary cache:"
spack buildcache list

# Break installation up in pieces and create build caches in between
# This allows us to "spin up" builds that altogether take longer than
Expand Down Expand Up @@ -188,11 +175,6 @@ jobs:
# Check for libirc.so in shared libraries (returns 1=error if found)
${SPACK_STACK_DIR}/util/check_libirc.sh

# Remove binary cache for next round of concretization
if [ "$USE_BINARY_CACHE" = true ] ; then
spack mirror rm local-binary
fi

# Remove buildcache config settings
spack config remove config:install_tree:padded_length

Expand All @@ -215,14 +197,10 @@ jobs:
rsync -av --exclude='install' --exclude='spack.lock' --exclude='.spack_db' ${BUILDCACHE_ENVDIR}/ ${ENVDIR}/
spack env activate ${ENVDIR}

# Concretize and check for duplicates
spack concretize --force 2>&1 | tee log.concretize.${ENVNAME}
# Concretize, check for duplicates and for correct compilers being used
spack concretize --force --fresh 2>&1 | tee log.concretize.${ENVNAME}
${SPACK_STACK_DIR}/util/show_duplicate_packages.py -i fms -i crtm -i crtm-fix -i esmf -i mapl -i py-cython -i neptune-env -i fms -i ip

# Add binary cache back in
spack mirror add local-binary file://${BUILD_CACHE_PATH}/
echo "Packages in combined spack build caches:"
spack buildcache list
spack stack check-preferred-compiler 2>&1 | tee log.check-preferred-compiler.${ENVNAME}

# Install from cache
spack install --fail-fast --source --no-check-signature 2>&1 | tee log.install.${ENVNAME}.all
Expand Down
21 changes: 12 additions & 9 deletions configs/common/packages_oneapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,43 +19,46 @@ packages:
# Individual package settings
antlr:
require:
- '%gcc'
- '%c,cxx=gcc'
bison:
require:
- '%gcc'
- '%c,cxx=gcc'
cmake:
require:
- '%gcc'
- '%c,cxx=gcc'
ectrans:
require:
- +mkl ~fftw
gmake:
require:
- '%gcc'
- '%c=gcc'
go:
require:
- '%c,cxx=gcc'
libbsd:
require:
- '%gcc'
- '%c=gcc'
libmd:
require:
- '%gcc'
- '%c=gcc'
met:
require:
- +shared-intel
nco:
require:
- '%gcc'
- '%c,cxx=gcc'
parallel-netcdf:
require:
- +shared-intel
py-maturin:
require:
- '%gcc'
- '%c=gcc'
py-scipy:
require:
- 'cxxflags="-O1"'
qt:
require:
- '%gcc'
- '%c,cxx=gcc'
rust:
require:
- '%c,cxx=gcc'
17 changes: 15 additions & 2 deletions spack-ext/lib/jcsda-emc/spack-stack/stack/cmd/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
setup_meta_modules_parser,
stack_setup_meta_modules,
)
from spack.extensions.stack.cmd.stack_cmds.check_preferred_compiler import (
setup_preferred_compiler_parser,
stack_check_preferred_compiler,
)
from spack.extensions.stack.stack_paths import stack_path

description = "Create spack-stack environment"
Expand All @@ -26,10 +30,17 @@ def setup_parser(subparser):
sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='stack_command')
create_parser = sp.add_parser('create',
help='Create spack-stack environment or container.')
meta_modules_parser = sp.add_parser('setup-meta-modules',
help='Create lmod/lua or tcl/tk meta-modules')
meta_modules_parser = sp.add_parser(
'setup-meta-modules',
help='Create lmod/lua or tcl/tk meta-modules',
)
preferred_compiler_parser = sp.add_parser(
'check-preferred-compiler',
help='Check that the preferred compiler is being used',
)
setup_create_parser(create_parser)
setup_meta_modules_parser(meta_modules_parser)
setup_preferred_compiler_parser(preferred_compiler_parser)


# Main command that calls subcommands
Expand All @@ -38,3 +49,5 @@ def stack(parser, args):
stack_create(parser, args)
if args.stack_command == 'setup-meta-modules':
stack_setup_meta_modules(parser, args)
if args.stack_command == 'check-preferred-compiler':
stack_check_preferred_compiler(parser, args)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from spack.extensions.stack.compiler_utils import check_preferred_compiler

description = "Check preferred compiler"
section = "spack-stack"
level = "long"


# Add potential arguments to check-preferred-compiler
def setup_preferred_compiler_parser(subparser):
pass


def stack_check_preferred_compiler(parser, args):
check_preferred_compiler()
Loading