Skip to content

Commit c7a6a05

Browse files
authored
add mch/climana uenv that provides everything needed for imagemagick (#157)
1 parent 18ca30a commit c7a6a05

File tree

11 files changed

+846
-4
lines changed

11 files changed

+846
-4
lines changed

config.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ clusters:
44
-
55
uarch: 'a100'
66
partition: 'normal'
7+
variables:
8+
F7T_URL: 'https://api.cscs.ch/mch/firecrest/v1'
79
-
810
uarch: 'zen3'
911
partition: 'postproc'
10-
runner:
11-
slurm-tag: balfrin-spack-stack-builder
12-
baremetal-tag: balfrin-login-baremetal
12+
variables:
13+
F7T_URL: 'https://api.cscs.ch/mch/firecrest/v1'
14+
runner: f7t
1315
daint:
1416
targets:
1517
-
@@ -35,7 +37,6 @@ clusters:
3537
SLURM_CONSTRAINT: 'mc'
3638
F7T_URL: 'https://firecrest-dev.cscs.ch'
3739
runner: f7t
38-
#no_bwrap: True
3940
santis:
4041
targets:
4142
-
@@ -71,6 +72,15 @@ uenvs:
7172
deploy:
7273
balfrin: [zen3, a100]
7374
develop: False
75+
climana:
76+
"24.10":
77+
recipes:
78+
zen2: mch/climana/24.10
79+
zen3: mch/climana/24.10
80+
a100: mch/climana/24.10
81+
deploy:
82+
balfrin: [zen3, a100]
83+
develop: False
7484
editors:
7585
"24.7":
7686
recipes:
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bootstrap:
2+
3+
gcc:
4+
specs:
5+

recipes/mch/climana/24.10/config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: mch
2+
store: /user-environment
3+
spack:
4+
commit: releases/v0.22
5+
repo: https://github.com/spack/spack.git
6+
description: MCH climate analysys toolkit
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
climana:
2+
compiler:
3+
- toolchain: gcc
4+
spec: gcc@12
5+
unify: when_possible
6+
mpi:
7+
8+
packages:
9+
- perl
10+
- autoconf
11+
- m4
12+
- automake
13+
- texinfo
14+
- libtool
15+
- gawk
16+
- curl
17+
specs:
18+
# choose fftw instead of the default intel-oneapi-mkl.
19+
# this saves ~2GB of space, and reduces image build time.
20+
- cdo ^[virtuals=fftw-api] fftw
21+
- gdal
22+
- geos
23+
- gsl
24+
- [email protected] +fortran +threadsafe ~mpi
25+
- imagemagick
26+
- ncview
27+
- nco
28+
- ncl
29+
- [email protected]~mpi ^hdf5~mpi api=v18
30+
- proj
31+
32+
- sqlite
33+
- udunits
34+
# R and its packages
35+
# +X is required for png, tiff, jpeg, etc support
36+
37+
# install here so that the openssl built by Spack is used.
38+
- r-curl
39+
# R needs to find all of the following use pkg-config
40+
# so we add them to the view, where they will be picked up.
41+
- freetype
42+
- fribidi
43+
- glib
44+
- harfbuzz
45+
- libjpeg-turbo
46+
- libpng
47+
- libtiff
48+
- zstd
49+
# required as a runtime dependency of the ssl R package
50+
- openssl
51+
views:
52+
climana:
53+
link: roots
54+
uenv:
55+
prefix_paths:
56+
LD_LIBRARY_PATH: [lib, lib64]
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
modules:
2+
# Paths to check when creating modules for all module sets
3+
prefix_inspections:
4+
bin:
5+
- PATH
6+
lib:
7+
- LD_LIBRARY_PATH
8+
lib64:
9+
- LD_LIBRARY_PATH
10+
lib/pkgconfig:
11+
- PKG_CONFIG_PATH
12+
lib64/pkgconfig:
13+
- PKG_CONFIG_PATH
14+
15+
default:
16+
arch_folder: false
17+
# Where to install modules
18+
roots:
19+
tcl: /user-environment/modules
20+
tcl:
21+
all:
22+
autoload: none
23+
netcdf-c:
24+
environment:
25+
set:
26+
NETCDF_C_ROOT: '{prefix}'
27+
hash_length: 0
28+
exclude_implicits: true
29+
include:
30+
- hdf5
31+
- zlib+shared
32+
exclude:
33+
34+
35+
projections:
36+
all: '{name}/{version}'
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
# don't generate an error message if a glob does not match any files
4+
shopt -s nullglob
5+
6+
# where all of the applications built by spack are installed
7+
# this has to change if
8+
# - the compiler version used to build software changes
9+
# - we build for a different micro-architecture
10+
# - we upgrade to SLES 16
11+
install_base=/user-environment/linux-sles15-zen3/gcc-12.3.0
12+
view_base=/user-environment/env/climana
13+
14+
# iterate over all of the locations where pkgconfig files are likely to be installed
15+
for pkbase in "lib/pkgconfig" "lib64/pkgconfig" "share/pkgconfig" "rlib/pkgconfig"
16+
do
17+
# find all directories that match the pattern
18+
pkgpaths=$(find $install_base -type d -path '*/'$pkbase)
19+
20+
# iterate over each directory, searching for pkg-config .pc files
21+
for pkpath in $pkgpaths
22+
do
23+
pcfiles=($pkpath/*.pc)
24+
for pcpath in ${pcfiles[@]}
25+
do
26+
pcfile=$(basename $pcpath)
27+
from=$pkpath/$pcfile
28+
to_root=$view_base/$pkbase
29+
to=$to_root/$pcfile
30+
mkdir -p $to_root
31+
if [ ! -e $to ]; then
32+
echo '+ ' $pkbase/$pcfile
33+
ln -s "$from" "$to"
34+
else
35+
echo 'skip ' $pkbase/$pcfile
36+
fi
37+
done
38+
done
39+
done
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
diff -ur R-3.6.3.org/configure R-3.6.3/configure
2+
--- R-3.6.3.org/configure 2020-03-09 11:09:16.060825352 +0900
3+
+++ R-3.6.3/configure 2020-03-09 11:10:47.011280195 +0900
4+
@@ -6470,13 +6470,13 @@
5+
CFLAGS=$ac_save_CFLAGS
6+
elif test $ac_cv_prog_cc_g = yes; then
7+
if test "$GCC" = yes; then
8+
- CFLAGS="-g -O2"
9+
+ CFLAGS="-g -O1"
10+
else
11+
CFLAGS="-g"
12+
fi
13+
else
14+
if test "$GCC" = yes; then
15+
- CFLAGS="-O2"
16+
+ CFLAGS="-O1"
17+
else
18+
CFLAGS=
19+
fi
20+
@@ -7445,13 +7445,13 @@
21+
FCFLAGS=$ac_save_FCFLAGS
22+
elif test $ac_cv_prog_fc_g = yes; then
23+
if test "x$ac_cv_fc_compiler_gnu" = xyes; then
24+
- FCFLAGS="-g -O2"
25+
+ FCFLAGS="-g -O1"
26+
else
27+
FCFLAGS="-g"
28+
fi
29+
else
30+
if test "x$ac_cv_fc_compiler_gnu" = xyes; then
31+
- FCFLAGS="-O2"
32+
+ FCFLAGS="-O1"
33+
else
34+
FCFLAGS=
35+
fi
36+
@@ -7717,13 +7717,13 @@
37+
CXXFLAGS=$ac_save_CXXFLAGS
38+
elif test $ac_cv_prog_cxx_g = yes; then
39+
if test "$GXX" = yes; then
40+
- CXXFLAGS="-g -O2"
41+
+ CXXFLAGS="-g -O1"
42+
else
43+
CXXFLAGS="-g"
44+
fi
45+
else
46+
if test "$GXX" = yes; then
47+
- CXXFLAGS="-O2"
48+
+ CXXFLAGS="-O1"
49+
else
50+
CXXFLAGS=
51+
fi
52+
@@ -8336,13 +8336,13 @@
53+
OBJCFLAGS=$ac_save_OBJCFLAGS
54+
elif test $ac_cv_prog_objc_g = yes; then
55+
if test "$GOBJC" = yes; then
56+
- OBJCFLAGS="-g -O2"
57+
+ OBJCFLAGS="-g -O1"
58+
else
59+
OBJCFLAGS="-g"
60+
fi
61+
else
62+
if test "$GOBJC" = yes; then
63+
- OBJCFLAGS="-O2"
64+
+ OBJCFLAGS="-O1"
65+
else
66+
OBJCFLAGS=
67+
fi

0 commit comments

Comments
 (0)