Skip to content
Draft
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
4 changes: 4 additions & 0 deletions recipes/icon/25.11/gh200/compilers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
gcc:
version: "13"
nvhpc:
version: "25.7"
11 changes: 11 additions & 0 deletions recipes/icon/25.11/gh200/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: icon
store: /user-environment
spack:
commit: releases/v1.0
repo: https://github.com/spack/spack.git
packages:
repo: https://github.com/spack/spack-packages.git
commit: develop
description: Compilers and libraries required to build ICON
modules: False
version: 2
54 changes: 54 additions & 0 deletions recipes/icon/25.11/gh200/environments.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
icon:
compiler: [gcc, nvhpc]
network:
mpi: cray-mpich@8.1.32 +cuda %c,cxx,fortran=nvhpc
specs:
- libfabric@2.3 +gdrcopy %c=gcc
- gdrcopy %c,cxx=gcc
- libcxi %c=gcc
unify: true
duplicates:
strategy: full
specs:
- boost ~mpi +thread %c,cxx=gcc
- serialbox@2.6.2 +fortran %c,cxx,fortran=nvhpc
- python@3.11 +optimizations %c,cxx=gcc ^libffi %c,cxx=gcc ^expat %c=gcc ^libmd %c=gcc ^libxcrypt %c=gcc ^gettext %c,cxx=gcc
- cuda@12
- eccodes@2.36.4 +tools +fortran +aec +openmp jp2k=jasper %c,cxx,fortran=nvhpc ^libjpeg-turbo %c,cxx=gcc
- cosmo-eccodes-definitions@2.36.0.3
- hdf5 +szip +hl +fortran +mpi %c,cxx,fortran=nvhpc
- netcdf-c@4.9.2 %c,cxx=nvhpc
- netcdf-cxx4@4.3.1 %c,cxx=nvhpc
- netcdf-fortran@4.6.1 %c,cxx,fortran=nvhpc
- nvhpc
- osu-micro-benchmarks %c,cxx=gcc
- openblas %c,cxx,fortran=nvhpc
# for validation
# - cdo # dependencies don't build (check cache?)
# everything needed for nccl on SS11
- aws-ofi-nccl %c,cxx=gcc ^findutils %c=gcc
- nccl %c,cxx=gcc
- nccl-tests %cxx=gcc
# extras
- libfyaml %c=gcc ^m4 %c,cxx=gcc
- zlib-ng %c,cxx=gcc
- cmake %c,cxx=gcc
# for icon-exclaim
- libxml2 %c=gcc ^libiconv %c=gcc
# force compiler on transitive dependencies
- texinfo %c,cxx=gcc
- numactl %c=gcc
- libnl %c=gcc
- libuv %c=gcc
- ninja %c,cxx=gcc
- libfuse %c,cxx=gcc
variants:
- +mpi
- +cuda
- cuda_arch=90a
views:
default:
link: roots
uenv:
prefix_paths:
LD_LIBRARY_PATH: [lib, lib64]
13 changes: 13 additions & 0 deletions recipes/icon/25.11/gh200/extra/reframe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
default:
features:
- cuda
- mpi
- osu-micro-benchmarks
- nccl-tests
- serial
- openmp
cc: mpicc
cxx: mpic++
ftn: mpifort
activation: /user-environment/env/default/activate.sh

26 changes: 26 additions & 0 deletions recipes/icon/25.11/gh200/modules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
modules:
# Paths to check when creating modules for all module sets
prefix_inspections:
bin:
- PATH
lib:
- LD_LIBRARY_PATH
lib64:
- LD_LIBRARY_PATH

default:
arch_folder: false
# Where to install modules
roots:
tcl: /snap/modules
tcl:
all:
autoload: run
hash_length: 0
hide_implicits: true
exclude:
- '%gcc@7.5.0'
- '%gcc@12'
- 'gcc %gcc@7.5.0'
projections:
all: '{name}/{version}'
5 changes: 5 additions & 0 deletions recipes/icon/25.11/gh200/post-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

curl -LsSf https://astral.sh/uv/install.sh > uv-installer.sh
UV_INSTALL_DIR="store/env/default/bin" sh uv-installer.sh
rm uv-installer.sh
12 changes: 12 additions & 0 deletions recipes/icon/25.11/gh200/pre-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# packages=("cosmo-eccodes-definitions")
# SPACK_C2SM_TAG="v0.22.2.1"
#
# git clone -b ${SPACK_C2SM_TAG} https://github.com/C2SM/spack-c2sm.git
#
# for package in "${packages[@]}"; do
# cp -r spack-c2sm/repos/c2sm/packages/"${package}" store/repo/packages
# done
#
# rm -rf spack-c2sm
1 change: 1 addition & 0 deletions recipes/icon/25.11/gh200/repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
from spack_repo.builtin.build_systems.generic import Package

from spack.package import *


class CosmoEccodesDefinitions(Package):
"""To simplify the usage of the GRIB 2 format within the COSMO Consortium, a COSMO GRIB 2 Policy has been defined. One element of this policy is to define a unified ecCodes system for the COSMO community, which is compatible with all COSMO software. This unified system is split into two parts, the vendor distribution of the ecCodes, available from ECMWF and the modified samples and definitions used by the COSMO consortium, available in the current repository."""

homepage = "https://github.com/COSMO-ORG/eccodes-cosmo-resources.git"
url = "https://github.com/COSMO-ORG/eccodes-cosmo-resources.git"
git = 'https://github.com/COSMO-ORG/eccodes-cosmo-resources.git'

maintainers('huppd', 'lxavier')

version('2.36.0.3', tag='v2.36.0.3')
version('2.25.0.3', tag='v2.25.0.3')
version('2.25.0.2', tag='v2.25.0.2')
version('2.25.0.1', tag='v2.25.0.1')
version('2.18.0.1', tag='v2.18.0.1')

depends_on('eccodes')
depends_on('eccodes@2.36.4',
type=('build', 'link', 'run'),
when='@2.36.0.3')
depends_on('eccodes@2.25.0',
type=('build', 'link', 'run'),
when='@2.25.0.1:2.25.0.3')
depends_on('eccodes@2.18.0',
type=('build', 'link', 'run'),
when='@2.18.0.1')

def setup_run_environment(self, env):
eccodes_definition_path = ':'.join([
self.prefix + '/cosmoDefinitions/definitions/',
self.spec['eccodes'].prefix + '/share/eccodes/definitions/'
])
env.prepend_path('GRIB_DEFINITION_PATH', eccodes_definition_path)
env.prepend_path('ECCODES_DEFINITION_PATH', eccodes_definition_path)

eccodes_samples_path = self.prefix + '/cosmoDefinitions/samples/'
env.prepend_path('GRIB_SAMPLES_PATH', eccodes_samples_path)
env.prepend_path('ECCODES_SAMPLES_PATH', eccodes_samples_path)

def setup_dependent_build_environment(self, env, dependent_spec):
self.setup_run_environment(env)

def install(self, spec, prefix):
mkdir(prefix.cosmoDefinitions)
mkdir(prefix.cosmoDefinitions + '/definitions')
mkdir(prefix.cosmoDefinitions + '/samples')
install_tree('definitions', prefix.cosmoDefinitions + '/definitions')
install_tree('samples', prefix.cosmoDefinitions + '/samples')
install('RELEASE', prefix.cosmoDefinitions)
11 changes: 11 additions & 0 deletions recipes/icon/25.11/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/icon/25.11/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