Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mch v8 software stack #165

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
11 changes: 10 additions & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ clusters:
targets:
-
uarch: 'a100'
partition: 'normal'
# ~use postproc for building, because it is usually less busy~
# use normal for building, because postproc does not give enough resources
partition: 'postproc'
variables:
F7T_URL: 'https://api.cscs.ch/mch/firecrest/v1'
SLURM_CPUS_PER_TASK: '128'
-
uarch: 'zen3'
partition: 'postproc'
Expand Down Expand Up @@ -182,6 +185,12 @@ uenvs:
deploy:
balfrin: [a100]
develop: False
"v8":
recipes:
a100: v8
deploy:
balfrin: [a100]
develop: False
namd:
"3.0":
recipes:
Expand Down
9 changes: 9 additions & 0 deletions recipes/mch/v8/compilers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
bootstrap:
spec: [email protected]
gcc:
specs:
- [email protected]
llvm:
requires: [email protected]
specs:
- [email protected]
6 changes: 6 additions & 0 deletions recipes/mch/v8/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: mch
store: /mch-environment/v8
spack:
commit: releases/v0.22
repo: https://github.com/spack/spack.git
description: The compiler toolchains, libraries and tools required for the MCH production software stack.
91 changes: 91 additions & 0 deletions recipes/mch/v8/environments.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
tools:
compiler:
- toolchain: gcc
spec: gcc
unify: when_possible
specs:
- [email protected]
- [email protected]
- libtree
- tree
- [email protected]
packages:
- perl
- gmake
- autoconf
- automake
views:
tools:
exclude: []
prgenv-nvidia:
compiler:
- toolchain: gcc
spec: gcc
- toolchain: llvm
spec: nvhpc
unify: when_possible
mpi:
spec: [email protected]%nvhpc
gpu: cuda
packages:
- perl
- gmake
- autoconf
- automake
specs:
- [email protected]%nvhpc
- [email protected]
- [email protected]%nvhpc +tools +fortran +aec +openmp jp2k=jasper
- [email protected]
- [email protected]%nvhpc ^[email protected]+mpi
- hdf5%nvhpc +szip +hl +fortran +mpi
- [email protected]%nvhpc
- libfyaml
# the following are explicitly set for backwards compatibility
- [email protected]
variants:
- cuda_arch=80
- +mpi
- +cuda
views:
prgenv-icon:
exclude: ['[email protected]']
link: roots
prgenv-gcc:
compiler:
- toolchain: gcc
spec: gcc
unify: when_possible
mpi:
spec: [email protected]%gcc
packages:
- perl
- libx11
- gmake
- autoconf
- automake
specs:
- [email protected]
- cmake
- [email protected]
- [email protected]
- [email protected] +fortran +threadsafe ~mpi
- [email protected] +fortran +threadsafe +mpi
- [email protected]
- [email protected] +tools +fortran +aec +openmp jp2k=jasper
- [email protected]+mpi ^hdf5+mpi api=v18
- [email protected]~mpi ^hdf5~mpi api=v18
- [email protected] ^netcdf-c+mpi
- [email protected] ^netcdf-c~mpi
- [email protected]
- [email protected]
variants:
- +mpi
views:
prgenv-gcc-serial:
exclude:
- hdf5+mpi
- netcdf-c+mpi
- netcdf-fortran ^netcdf-c+mpi
- [email protected]
link: roots
58 changes: 58 additions & 0 deletions recipes/mch/v8/modules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
modules:
# Paths to check when creating modules for all module sets
prefix_inspections:
bin:
- PATH
lib:
- LD_LIBRARY_PATH
lib64:
- LD_LIBRARY_PATH
lib/pkgconfig:
- PKG_CONFIG_PATH
lib64/pkgconfig:
- PKG_CONFIG_PATH

default:
arch_folder: false
# Where to install modules
roots:
tcl: /user-environment/modules
tcl:
all:
autoload: none
eccodes:
environment:
set:
ECCODES_DIR: '{prefix}'
ECCODES_INCLUDE: '{prefix}/include'
ECCODES_VERSION: '{version}'
netlib-scalapack:
environment:
set:
NETLIB_SCALAPACK_ROOT: '{prefix}'
openblas:
environment:
set:
OPENBLAS_ROOT: '{prefix}'
netcdf-c:
environment:
set:
NETCDF_C_ROOT: '{prefix}'
hash_length: 0
exclude_implicits: true
include:
- cuda
- hdf5
- zlib+shared
exclude:
- '%[email protected]'
- 'gcc %[email protected]'
projections:
all: '{name}/{version}-{compiler.name}'
nvhpc: '{name}/{version}'
gcc: '{name}/{version}'
cray-mpich: 'cray-mpich-{compiler.name}/{version}'
python: '{name}/{version}'
hdf5%gcc~mpi: '{name}/{version}-serial-{compiler.name}'
netcdf-c~mpi: '{name}/{version}-serial-{compiler.name}'
netcdf-fortran^netcdf-c~mpi: '{name}/{version}-serial-{compiler.name}'
1 change: 1 addition & 0 deletions recipes/mch/v8/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This software stack uses spack v0.21, to macth the spack-c2sm distribution
11 changes: 11 additions & 0 deletions recipes/mch/v8/repo/packages/eccodes/cmake_install_rpath.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/cmake/ecbuild_append_to_rpath.cmake
+++ b/cmake/ecbuild_append_to_rpath.cmake
@@ -31,7 +31,7 @@ function( _path_append var path )
else()
list( FIND ${var} ${path} _found )
if( _found EQUAL "-1" )
- set( ${var} "${${var}}:${path}" PARENT_SCOPE )
+ set( ${var} "${${var}};${path}" PARENT_SCOPE )
endif()
endif()
endfunction()
39 changes: 39 additions & 0 deletions recipes/mch/v8/repo/packages/eccodes/openjpeg_jasper.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,6 +43,18 @@ ecbuild_add_option( FEATURE JPG
DESCRIPTION "support for JPG decoding/encoding"
DEFAULT ON
)
+# Options related to JPG. The Jasper and OpenJPEG libraries
+ecbuild_add_option( FEATURE JPG_LIBJASPER
+ DESCRIPTION "Support for JPG decoding/encoding with the Jasper library"
+ CONDITION ENABLE_JPG
+ DEFAULT ON
+)
+ecbuild_add_option( FEATURE JPG_LIBOPENJPEG
+ DESCRIPTION "Support for JPG decoding/encoding with the OpenJPEG library"
+ CONDITION ENABLE_JPG
+ DEFAULT ON
+)
+

ecbuild_add_option( FEATURE PNG
DESCRIPTION "support for PNG decoding/encoding"
@@ -144,7 +156,7 @@ if( ENABLE_JPG )

find_package( OpenJPEG )

- if( JASPER_FOUND )
+ if( JASPER_FOUND AND ENABLE_JPG_LIBJASPER )
list( APPEND ECCODES_TPLS Jasper )
set( HAVE_JPEG 1 )
set( HAVE_LIBJASPER 1 )
@@ -152,7 +164,7 @@ if( ENABLE_JPG )
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" JASPER_VERSION_MAJOR "${JASPER_VERSION_STRING}")
endif()

- if( OPENJPEG_FOUND )
+ if( OPENJPEG_FOUND AND ENABLE_JPG_LIBOPENJPEG )
list( APPEND ECCODES_TPLS OpenJPEG )
set( HAVE_JPEG 1 )
set( HAVE_LIBOPENJPEG 1 )
Loading