Skip to content

Commit

Permalink
add mch/climana uenv that provides everything needed for imagemagick (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bcumming authored Oct 14, 2024
1 parent 18ca30a commit c7a6a05
Show file tree
Hide file tree
Showing 11 changed files with 846 additions and 4 deletions.
18 changes: 14 additions & 4 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ clusters:
-
uarch: 'a100'
partition: 'normal'
variables:
F7T_URL: 'https://api.cscs.ch/mch/firecrest/v1'
-
uarch: 'zen3'
partition: 'postproc'
runner:
slurm-tag: balfrin-spack-stack-builder
baremetal-tag: balfrin-login-baremetal
variables:
F7T_URL: 'https://api.cscs.ch/mch/firecrest/v1'
runner: f7t
daint:
targets:
-
Expand All @@ -35,7 +37,6 @@ clusters:
SLURM_CONSTRAINT: 'mc'
F7T_URL: 'https://firecrest-dev.cscs.ch'
runner: f7t
#no_bwrap: True
santis:
targets:
-
Expand Down Expand Up @@ -71,6 +72,15 @@ uenvs:
deploy:
balfrin: [zen3, a100]
develop: False
climana:
"24.10":
recipes:
zen2: mch/climana/24.10
zen3: mch/climana/24.10
a100: mch/climana/24.10
deploy:
balfrin: [zen3, a100]
develop: False
editors:
"24.7":
recipes:
Expand Down
5 changes: 5 additions & 0 deletions recipes/mch/climana/24.10/compilers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bootstrap:
spec: [email protected]
gcc:
specs:
- [email protected]
6 changes: 6 additions & 0 deletions recipes/mch/climana/24.10/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: mch
store: /user-environment
spack:
commit: releases/v0.22
repo: https://github.com/spack/spack.git
description: MCH climate analysys toolkit
56 changes: 56 additions & 0 deletions recipes/mch/climana/24.10/environments.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
climana:
compiler:
- toolchain: gcc
spec: gcc@12
unify: when_possible
mpi:
spec: [email protected]
packages:
- perl
- autoconf
- m4
- automake
- texinfo
- libtool
- gawk
- curl
specs:
# choose fftw instead of the default intel-oneapi-mkl.
# this saves ~2GB of space, and reduces image build time.
- cdo ^[virtuals=fftw-api] fftw
- gdal
- geos
- gsl
- [email protected] +fortran +threadsafe ~mpi
- imagemagick
- ncview
- nco
- ncl
- [email protected]~mpi ^hdf5~mpi api=v18
- proj
- [email protected]
- sqlite
- udunits
# R and its packages
# +X is required for png, tiff, jpeg, etc support
- [email protected] +X
# install here so that the openssl built by Spack is used.
- r-curl
# R needs to find all of the following use pkg-config
# so we add them to the view, where they will be picked up.
- freetype
- fribidi
- glib
- harfbuzz
- libjpeg-turbo
- libpng
- libtiff
- zstd
# required as a runtime dependency of the ssl R package
- openssl
views:
climana:
link: roots
uenv:
prefix_paths:
LD_LIBRARY_PATH: [lib, lib64]
36 changes: 36 additions & 0 deletions recipes/mch/climana/24.10/modules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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
netcdf-c:
environment:
set:
NETCDF_C_ROOT: '{prefix}'
hash_length: 0
exclude_implicits: true
include:
- hdf5
- zlib+shared
exclude:
- '%[email protected]'
- 'gcc %[email protected]'
projections:
all: '{name}/{version}'
39 changes: 39 additions & 0 deletions recipes/mch/climana/24.10/post-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

# don't generate an error message if a glob does not match any files
shopt -s nullglob

# where all of the applications built by spack are installed
# this has to change if
# - the compiler version used to build software changes
# - we build for a different micro-architecture
# - we upgrade to SLES 16
install_base=/user-environment/linux-sles15-zen3/gcc-12.3.0
view_base=/user-environment/env/climana

# iterate over all of the locations where pkgconfig files are likely to be installed
for pkbase in "lib/pkgconfig" "lib64/pkgconfig" "share/pkgconfig" "rlib/pkgconfig"
do
# find all directories that match the pattern
pkgpaths=$(find $install_base -type d -path '*/'$pkbase)

# iterate over each directory, searching for pkg-config .pc files
for pkpath in $pkgpaths
do
pcfiles=($pkpath/*.pc)
for pcpath in ${pcfiles[@]}
do
pcfile=$(basename $pcpath)
from=$pkpath/$pcfile
to_root=$view_base/$pkbase
to=$to_root/$pcfile
mkdir -p $to_root
if [ ! -e $to ]; then
echo '+ ' $pkbase/$pcfile
ln -s "$from" "$to"
else
echo 'skip ' $pkbase/$pcfile
fi
done
done
done
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
diff -ur R-3.6.3.org/configure R-3.6.3/configure
--- R-3.6.3.org/configure 2020-03-09 11:09:16.060825352 +0900
+++ R-3.6.3/configure 2020-03-09 11:10:47.011280195 +0900
@@ -6470,13 +6470,13 @@
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
- CFLAGS="-g -O2"
+ CFLAGS="-g -O1"
else
CFLAGS="-g"
fi
else
if test "$GCC" = yes; then
- CFLAGS="-O2"
+ CFLAGS="-O1"
else
CFLAGS=
fi
@@ -7445,13 +7445,13 @@
FCFLAGS=$ac_save_FCFLAGS
elif test $ac_cv_prog_fc_g = yes; then
if test "x$ac_cv_fc_compiler_gnu" = xyes; then
- FCFLAGS="-g -O2"
+ FCFLAGS="-g -O1"
else
FCFLAGS="-g"
fi
else
if test "x$ac_cv_fc_compiler_gnu" = xyes; then
- FCFLAGS="-O2"
+ FCFLAGS="-O1"
else
FCFLAGS=
fi
@@ -7717,13 +7717,13 @@
CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
+ CXXFLAGS="-g -O1"
else
CXXFLAGS="-g"
fi
else
if test "$GXX" = yes; then
- CXXFLAGS="-O2"
+ CXXFLAGS="-O1"
else
CXXFLAGS=
fi
@@ -8336,13 +8336,13 @@
OBJCFLAGS=$ac_save_OBJCFLAGS
elif test $ac_cv_prog_objc_g = yes; then
if test "$GOBJC" = yes; then
- OBJCFLAGS="-g -O2"
+ OBJCFLAGS="-g -O1"
else
OBJCFLAGS="-g"
fi
else
if test "$GOBJC" = yes; then
- OBJCFLAGS="-O2"
+ OBJCFLAGS="-O1"
else
OBJCFLAGS=
fi
Loading

0 comments on commit c7a6a05

Please sign in to comment.