From 660921234f1ada2bf388a6fc89e1851eb41121eb Mon Sep 17 00:00:00 2001
From: Dennis Terhorst <d.terhorst@fz-juelich.de>
Date: Fri, 26 May 2023 10:02:29 +0200
Subject: [PATCH] cherry-picked changes from previous site-config attempt
---
.gitignore | 4 +
site-config/.gitignore | 7 ++
site-config/README.md | 21 +++++
site-config/jurecadc/compilers.yaml | 27 +++++++
site-config/jurecadc/config.yaml | 10 +++
site-config/jurecadc/packages.yaml | 115 ++++++++++++++++++++++++++++
spack.yaml | 2 +
7 files changed, 186 insertions(+)
create mode 100644 site-config/.gitignore
create mode 100644 site-config/README.md
create mode 100644 site-config/jurecadc/compilers.yaml
create mode 100644 site-config/jurecadc/config.yaml
create mode 100644 site-config/jurecadc/packages.yaml
diff --git a/.gitignore b/.gitignore
index 8d35cb32..9266bb61 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,6 @@
__pycache__
*.pyc
+*.err
+*.out
+.spack-env/
+spack.lock
diff --git a/site-config/.gitignore b/site-config/.gitignore
new file mode 100644
index 00000000..e70257b1
--- /dev/null
+++ b/site-config/.gitignore
@@ -0,0 +1,7 @@
+# exclude all files to allow sites to add own configs
+*/
+
+# un-exclude the configs tracked in this repository
+!g100
+!jurecadc
+!jusuf
diff --git a/site-config/README.md b/site-config/README.md
new file mode 100644
index 00000000..46d8ae71
--- /dev/null
+++ b/site-config/README.md
@@ -0,0 +1,21 @@
+# Site specific config for Spack
+
+Usually the machine name is available in an environment variable like
+`$SYSTEMNAME`, `$HPC_SYSTEM` or equivalent to load local base configuration.
+The environment base `spack.yaml` then includes all files in the specific
+folder:
+
+```yaml
+spack:
+ include:
+ - site-config/$SYSTEMNAME
+```
+
+You can check the overlay is working by
+```bash
+spack env activate .
+spack config blame config
+```
+
+Some system specific entries should be governed by the site-specific
+envrionment config.
diff --git a/site-config/jurecadc/compilers.yaml b/site-config/jurecadc/compilers.yaml
new file mode 100644
index 00000000..69485034
--- /dev/null
+++ b/site-config/jurecadc/compilers.yaml
@@ -0,0 +1,27 @@
+compilers:
+- compiler:
+ spec: gcc@11.3.0
+ paths:
+ cc: /p/software/jurecadc/stages/2023/software/GCCcore/11.3.0/bin/gcc
+ cxx: /p/software/jurecadc/stages/2023/software/GCCcore/11.3.0/bin/g++
+ f77: /p/software/jurecadc/stages/2023/software/GCCcore/11.3.0/bin/gfortran
+ fc: /p/software/jurecadc/stages/2023/software/GCCcore/11.3.0/bin/gfortran
+ flags: {}
+ operating_system: rocky8
+ target: x86_64
+ modules: []
+ environment: {}
+ extra_rpaths: []
+- compiler:
+ spec: gcc@8.5.0
+ paths:
+ cc: /usr/bin/gcc
+ cxx: /usr/bin/g++
+ f77: null
+ fc: null
+ flags: {}
+ operating_system: rocky8
+ target: x86_64
+ modules: []
+ environment: {}
+ extra_rpaths: []
diff --git a/site-config/jurecadc/config.yaml b/site-config/jurecadc/config.yaml
new file mode 100644
index 00000000..9dd3b0b0
--- /dev/null
+++ b/site-config/jurecadc/config.yaml
@@ -0,0 +1,10 @@
+config:
+ build_stage:
+ - $USERSOFTWARE/spack/user-cache/$user/spack-stage
+ - $tempdir/$user/spack-stage
+ source_cache: $USERSOFTWARE/spack/source-cache
+ test_stage: $USERSOFTWARE/spack/user-cache/$user/test
+ misc_cache: $USERSOFTWARE/spack/user-cache/$user/cache
+ install_tree:
+ root: $USERSOFTWARE/install
+ db_lock_timeout: 10
diff --git a/site-config/jurecadc/packages.yaml b/site-config/jurecadc/packages.yaml
new file mode 100644
index 00000000..c5f285aa
--- /dev/null
+++ b/site-config/jurecadc/packages.yaml
@@ -0,0 +1,115 @@
+# `spack external find` with
+# Currently Loaded Modules:
+# 1) Stages/2023 (S) 2) GCCcore/.11.3.0 (H) 3) zlib/.1.2.12 (H) 4) binutils/.2.38 (H) 5) StdEnv/2023 6) spack/0.19.2
+packages:
+ findutils:
+ externals:
+ - spec: findutils@4.6.0
+ prefix: /usr
+ groff:
+ externals:
+ - spec: groff@1.22.3
+ prefix: /usr
+ flex:
+ externals:
+ - spec: flex@2.6.1+lex
+ prefix: /usr
+ diffutils:
+ externals:
+ - spec: diffutils@3.6
+ prefix: /usr
+ git:
+ externals:
+ - spec: git@2.31.1~tcltk
+ prefix: /usr
+ m4:
+ externals:
+ - spec: m4@1.4.18
+ prefix: /usr
+ texinfo:
+ externals:
+ - spec: texinfo@6.5
+ prefix: /usr
+ subversion:
+ externals:
+ - spec: subversion@1.10.2
+ prefix: /usr
+ libtool:
+ externals:
+ - spec: libtool@2.4.6
+ prefix: /usr
+ binutils:
+ externals:
+ - spec: binutils@2.38
+ prefix: /p/software/jurecadc/stages/2023/software/binutils/2.38-GCCcore-11.3.0
+ - spec: binutils@2.30.117
+ prefix: /usr
+ openssl:
+ externals:
+ - spec: openssl@1.1.1k
+ prefix: /usr
+ pkgconf:
+ externals:
+ - spec: pkgconf@1.4.2
+ prefix: /usr
+ automake:
+ externals:
+ - spec: automake@1.16.1
+ prefix: /usr
+ tar:
+ externals:
+ - spec: tar@1.30
+ prefix: /usr
+ gmake:
+ externals:
+ - spec: gmake@4.2.1
+ prefix: /usr
+ openssh:
+ externals:
+ - spec: openssh@8.0p1
+ prefix: /usr
+ curl:
+ externals:
+ - spec: curl@7.61.1+gssapi+ldap+nghttp2
+ prefix: /usr
+ git-lfs:
+ externals:
+ - spec: git-lfs@2.13.3
+ prefix: /usr
+ gawk:
+ externals:
+ - spec: gawk@4.2.1
+ prefix: /usr
+ coreutils:
+ externals:
+ - spec: coreutils@8.30
+ prefix: /usr
+ bison:
+ externals:
+ - spec: bison@3.0.4
+ prefix: /usr
+ autoconf:
+ externals:
+ - spec: autoconf@2.69
+ prefix: /usr
+# packages:
+# all:
+# compiler: [gcc@11.2.0]
+# python:
+# buildable: False
+# version: [3.9.6]
+# externals:
+# - spec: "python@3.9.6%gcc@11.2.0 arch=linux-rocky8-zen2"
+# prefix: /p/software/jurecadc/stages/2022/software/Python/3.9.6-GCCcore-11.2.0/
+# openssl:
+# buildable: False
+# version: [1.1.1k]
+# externals:
+# - spec: openssl@1.1.1k
+# prefix: /p/software/jurecadc/stages/2022/software/OpenSSL/1.1/
+# mpi:
+# buildable: False
+# openmpi:
+# externals:
+# - spec: "openmpi@4.1.2%gcc@11.2.0 arch=linux-rocky8-zen2"
+# prefix: /p/software/jurecadc/stages/2022/software/OpenMPI/4.1.2-GCC-11.2.0/
diff --git a/spack.yaml b/spack.yaml
index 1a29f7fb..ef408623 100644
--- a/spack.yaml
+++ b/spack.yaml
@@ -1,4 +1,6 @@
spack:
+ include:
+ - site-config/$SYSTEMNAME
specs:
# Notebook
- py-ipycanvas
--
GitLab