diff --git a/ci/ci.yml b/ci/ci.yml index bdd79c96..7c28d46e 100644 --- a/ci/ci.yml +++ b/ci/ci.yml @@ -4,7 +4,8 @@ stages: pipeline-configure: stage: configure - tags: [clariden-login-baremetal] + # temporary workaround: we need somewhere to run the initial configuration stage + tags: [santis-login-baremetal] script: - ./ci/configure-pipeline artifacts: diff --git a/ci/config/ci.py b/ci/config/ci.py index 1392aad0..fcdb2f3f 100755 --- a/ci/config/ci.py +++ b/ci/config/ci.py @@ -85,11 +85,8 @@ def readenv(config): # - JOB_ID (if needed?) if os.getenv("UENVCITEST", default=None) is not None: os.environ["system"] = "santis" - os.environ["uarch"] = "zen2" - os.environ["uenv"] = "gromacs:2023" - #os.environ["system"] = "clariden" - #os.environ["uarch"] = "a100" - #os.environ["uenv"] = "gromacs:2023" + os.environ["uarch"] = "gh200" + os.environ["uenv"] = "netcdf-tools:2024" # read and validate the configuration print(recipe_path) diff --git a/ci/config/configuration.py b/ci/config/configuration.py index fc94360b..c02f2806 100644 --- a/ci/config/configuration.py +++ b/ci/config/configuration.py @@ -14,7 +14,7 @@ import schema -valid_uarch = ["zen2", "zen3", "a100", "mi200"] +valid_uarch = ["zen2", "zen3", "a100", "mi200", "gh200"] class ConfigError(Exception): """ConfigError when an invalid configuration is entered. @@ -25,8 +25,9 @@ def __init__(self, message): super().__init__(self.message) class Version: - def __init__(self, name, desc, recipe_path): + def __init__(self, name, uenv_name, desc, recipe_path): self._name = name + self._uenv_name = uenv_name self._recipes = desc["recipes"] self._deploy = desc["deploy"] self._use_spack_develop = desc["develop"] @@ -52,8 +53,16 @@ def uarch(self): # list of the uarch that this version can be deployed on return [n for n in self._recipes.keys()] - def recipe_path(self, uarch): - return self._recipe_path / self._recipes[uarch] + def recipe_path(self, uarch, relative=False): + # search for self._recipe_path / name / arch-specific-recipe + # then for self._recipe_path / arch-specific-recipe + relpaths = [self._uenv_name + "/" + self._recipes[uarch], self._recipes[uarch]] + for relpath in relpaths: + fullpath = self._recipe_path / relpath + if fullpath.is_dir(): + return pathlib.Path("recipes")/relpath if relative else fullpath + + raise FileNotFoundError(f"the path for {self._name}@{uarch} ({self._recipes[uarch]}) does not exist") def recipe(self, uarch): return self._recipes[uarch] @@ -65,7 +74,7 @@ def deployments(self): class Uenv: def __init__(self, name, desc, recipe_path): self._name = name - self._versions = [Version(v, desc[v], recipe_path / name) for v in desc.keys()] + self._versions = [Version(v, name, desc[v], recipe_path) for v in desc.keys()] @property def name(self): @@ -163,7 +172,7 @@ def recipe(self, name, version, uarch): if u is not None: for v in u.versions: if v.name==version and uarch in v.uarch: - return "recipes/" + name + "/" + v.recipe(uarch) + return v.recipe_path(uarch, relative=True) return None diff --git a/ci/config/schema/config.json b/ci/config/schema/config.json index 3edf6945..f146a69f 100644 --- a/ci/config/schema/config.json +++ b/ci/config/schema/config.json @@ -23,7 +23,7 @@ "properties": { "uarch": { "type": "string", - "enum": ["zen2", "zen3", "a100", "mi200"] + "enum": ["zen2", "zen3", "a100", "mi200", "gh200"] }, "partition": {"type": "string"}, "variables": { @@ -81,7 +81,7 @@ "type":"object", "additionalProperties": false, "patternProperties": { - "^(zen2|zen3|a100|mi200)$": {"type": "string"} + "^(zen2|zen3|a100|mi200|gh200)$": {"type": "string"} } }, "deploy": { @@ -93,7 +93,7 @@ "type": "array", "items": { "type": "string", - "enum": ["zen2", "zen3", "a100", "mi200"] + "enum": ["zen2", "zen3", "a100", "mi200", "gh200"] } } } diff --git a/ci/config/templates/pipeline.yml b/ci/config/templates/pipeline.yml index e9f813cf..66170fe0 100644 --- a/ci/config/templates/pipeline.yml +++ b/ci/config/templates/pipeline.yml @@ -8,6 +8,7 @@ stages: variables: SLURM_TIMELIMIT: 180 script: + - echo "==== RECIPE $STACK_RECIPE" - ./stack-build -n $STACK_NAME -s $STACK_SYSTEM -r $STACK_RECIPE -b /dev/shm/jenkssl $SPACK_DEVELOP -m $STACK_MOUNT -u $STACK_UARCH after_script: - rm -Rf /dev/shm/jenkssl diff --git a/config.yaml b/config.yaml index 0ee68973..c7049487 100644 --- a/config.yaml +++ b/config.yaml @@ -24,12 +24,10 @@ clusters: santis: targets: - - uarch: 'zen2' + uarch: 'gh200' partition: 'normal' runner: - slurm-tag: santis-spack-stack-builder - # there is no baremetal tag as of now. - #baremetal-tag: null + slurm-tag: santis-spack-stack-builder baremetal-tag: santis-login-baremetal uenvs: gromacs: @@ -56,6 +54,14 @@ uenvs: eiger: [zen2] clariden: [a100] develop: False + icon-wcp: + "v1": + recipes: + a100: wcp/icon/v1/a100 + gh200: wcp/icon/v1/gh200 + deploy: + santis: [gh200] + develop: False lammps: "2023": recipes: @@ -87,9 +93,10 @@ uenvs: netcdf-tools: "2024": recipes: - zen2: '2024' - zen3: '2024' - a100: '2024' + zen2: '2024/x86' + zen3: '2024/x86' + a100: '2024/x86' + gh200: '2024/arm64' deploy: eiger: [zen2] develop: False @@ -111,6 +118,11 @@ uenvs: # deploy to both the production and test clusters eiger: [zen2] clariden: [a100] + "24.2": + recipes: + gh200: 24.2/gh200 + deploy: + santis: [gh200] quantumespresso: "v7.1": recipes: diff --git a/recipes/netcdf-tools/2024/arm64/compilers.yaml b/recipes/netcdf-tools/2024/arm64/compilers.yaml new file mode 100644 index 00000000..199f37ca --- /dev/null +++ b/recipes/netcdf-tools/2024/arm64/compilers.yaml @@ -0,0 +1,5 @@ +bootstrap: + spec: gcc@12.3 +gcc: + specs: + - gcc@12.3 diff --git a/recipes/netcdf-tools/2024/config.yaml b/recipes/netcdf-tools/2024/arm64/config.yaml similarity index 100% rename from recipes/netcdf-tools/2024/config.yaml rename to recipes/netcdf-tools/2024/arm64/config.yaml diff --git a/recipes/netcdf-tools/2024/arm64/environments.yaml b/recipes/netcdf-tools/2024/arm64/environments.yaml new file mode 100644 index 00000000..28d24d97 --- /dev/null +++ b/recipes/netcdf-tools/2024/arm64/environments.yaml @@ -0,0 +1,24 @@ +gcc-env: + compiler: + - toolchain: gcc + spec: gcc@12 + mpi: + spec: cray-mpich + gpu: false + unify: true + specs: + - hdf5 + - netcdf-c + - netcdf-cxx4 + - netcdf-fortran + - ncview + - cdo + - nco + #- ferret + views: + default: + link: roots + packages: + - git + - perl + diff --git a/recipes/netcdf-tools/2024/modules.yaml b/recipes/netcdf-tools/2024/arm64/modules.yaml similarity index 100% rename from recipes/netcdf-tools/2024/modules.yaml rename to recipes/netcdf-tools/2024/arm64/modules.yaml diff --git a/recipes/netcdf-tools/2024/compilers.yaml b/recipes/netcdf-tools/2024/compilers.yaml deleted file mode 100644 index 5db9c480..00000000 --- a/recipes/netcdf-tools/2024/compilers.yaml +++ /dev/null @@ -1,5 +0,0 @@ -bootstrap: - spec: gcc@11 -gcc: - specs: - - gcc@11 diff --git a/recipes/netcdf-tools/2024/x86/compilers.yaml b/recipes/netcdf-tools/2024/x86/compilers.yaml new file mode 100644 index 00000000..199f37ca --- /dev/null +++ b/recipes/netcdf-tools/2024/x86/compilers.yaml @@ -0,0 +1,5 @@ +bootstrap: + spec: gcc@12.3 +gcc: + specs: + - gcc@12.3 diff --git a/recipes/netcdf-tools/2024/x86/config.yaml b/recipes/netcdf-tools/2024/x86/config.yaml new file mode 100644 index 00000000..10e6f6c9 --- /dev/null +++ b/recipes/netcdf-tools/2024/x86/config.yaml @@ -0,0 +1,6 @@ +name: netcdf-tools +store: /user-environment +description: utilities used for climate/weather analysis and file manipulation +spack: + repo: https://github.com/spack/spack.git + commit: releases/v0.21 diff --git a/recipes/netcdf-tools/2024/environments.yaml b/recipes/netcdf-tools/2024/x86/environments.yaml similarity index 78% rename from recipes/netcdf-tools/2024/environments.yaml rename to recipes/netcdf-tools/2024/x86/environments.yaml index 47131ad7..99b8d95f 100644 --- a/recipes/netcdf-tools/2024/environments.yaml +++ b/recipes/netcdf-tools/2024/x86/environments.yaml @@ -1,9 +1,9 @@ gcc-env: compiler: - toolchain: gcc - spec: gcc@11 + spec: gcc@12 mpi: - spec: cray-mpich@8.1.25 + spec: cray-mpich gpu: false unify: true specs: diff --git a/recipes/netcdf-tools/2024/x86/modules.yaml b/recipes/netcdf-tools/2024/x86/modules.yaml new file mode 100644 index 00000000..623307b0 --- /dev/null +++ b/recipes/netcdf-tools/2024/x86/modules.yaml @@ -0,0 +1,23 @@ +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: /user-environment/modules + tcl: + all: + autoload: none + hash_length: 0 + exclude_implicits: true + exclude: ['%gcc@7.5.0', 'gcc %gcc@7.5.0'] + projections: + all: '{name}/{version}' diff --git a/recipes/netcdf-tools/2024/repo/packages/ferret/0001-fix-type-mismatch-between-2-args.patch b/recipes/netcdf-tools/2024/x86/repo/packages/ferret/0001-fix-type-mismatch-between-2-args.patch similarity index 100% rename from recipes/netcdf-tools/2024/repo/packages/ferret/0001-fix-type-mismatch-between-2-args.patch rename to recipes/netcdf-tools/2024/x86/repo/packages/ferret/0001-fix-type-mismatch-between-2-args.patch diff --git a/recipes/netcdf-tools/2024/repo/packages/ferret/0002-fix-hidden-lenght-argument.patch b/recipes/netcdf-tools/2024/x86/repo/packages/ferret/0002-fix-hidden-lenght-argument.patch similarity index 100% rename from recipes/netcdf-tools/2024/repo/packages/ferret/0002-fix-hidden-lenght-argument.patch rename to recipes/netcdf-tools/2024/x86/repo/packages/ferret/0002-fix-hidden-lenght-argument.patch diff --git a/recipes/netcdf-tools/2024/repo/packages/ferret/package.py b/recipes/netcdf-tools/2024/x86/repo/packages/ferret/package.py similarity index 100% rename from recipes/netcdf-tools/2024/repo/packages/ferret/package.py rename to recipes/netcdf-tools/2024/x86/repo/packages/ferret/package.py diff --git a/recipes/prgenv-gnu/24.2/gh200/compilers.yaml b/recipes/prgenv-gnu/24.2/gh200/compilers.yaml new file mode 100644 index 00000000..199f37ca --- /dev/null +++ b/recipes/prgenv-gnu/24.2/gh200/compilers.yaml @@ -0,0 +1,5 @@ +bootstrap: + spec: gcc@12.3 +gcc: + specs: + - gcc@12.3 diff --git a/recipes/prgenv-gnu/24.2/gh200/config.yaml b/recipes/prgenv-gnu/24.2/gh200/config.yaml new file mode 100644 index 00000000..c3bc3884 --- /dev/null +++ b/recipes/prgenv-gnu/24.2/gh200/config.yaml @@ -0,0 +1,7 @@ +name: prgenv-gnu +spack: + commit: releases/v0.21 + repo: https://github.com/spack/spack.git +store: /user-environment +description: GNU Compiler toolchain with cray-mpich, Python, CMake and other development tools. + diff --git a/recipes/prgenv-gnu/24.2/gh200/environments.yaml b/recipes/prgenv-gnu/24.2/gh200/environments.yaml new file mode 100644 index 00000000..7129cd3e --- /dev/null +++ b/recipes/prgenv-gnu/24.2/gh200/environments.yaml @@ -0,0 +1,28 @@ +gcc-env: + compiler: + - toolchain: gcc + spec: gcc + mpi: + spec: cray-mpich@8.1.29 + gpu: cuda + unify: true + specs: + - aws-ofi-nccl@master + - cmake + - cuda@12.4 + - fftw + - fmt + - hdf5 + - nccl + - nccl-tests + - ninja + - openblas threads=openmp + - osu-micro-benchmarks@5.9 + - python@3.11 + variants: + - +mpi + - +cuda + - cuda_arch=90 + views: + default: + link: roots diff --git a/recipes/prgenv-gnu/24.2/gh200/extra/reframe.yaml b/recipes/prgenv-gnu/24.2/gh200/extra/reframe.yaml new file mode 100644 index 00000000..b71f2797 --- /dev/null +++ b/recipes/prgenv-gnu/24.2/gh200/extra/reframe.yaml @@ -0,0 +1,11 @@ +default: + features: + - cuda + - mpi + - osu-micro-benchmarks + - openmp + - serial + cc: mpicc + cxx: mpic++ + ftn: mpifort + activation: /user-environment/env/default/activate.sh diff --git a/recipes/prgenv-gnu/24.2/gh200/modules.yaml b/recipes/prgenv-gnu/24.2/gh200/modules.yaml new file mode 100644 index 00000000..623307b0 --- /dev/null +++ b/recipes/prgenv-gnu/24.2/gh200/modules.yaml @@ -0,0 +1,23 @@ +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: /user-environment/modules + tcl: + all: + autoload: none + hash_length: 0 + exclude_implicits: true + exclude: ['%gcc@7.5.0', 'gcc %gcc@7.5.0'] + projections: + all: '{name}/{version}' diff --git a/recipes/wcp/icon/v1/a100/compilers.yaml b/recipes/wcp/icon/v1/a100/compilers.yaml new file mode 100644 index 00000000..74ba955e --- /dev/null +++ b/recipes/wcp/icon/v1/a100/compilers.yaml @@ -0,0 +1,9 @@ +bootstrap: + spec: gcc@11.3 +gcc: + specs: + - gcc@11.3 +llvm: + requires: gcc@11 + specs: + - nvhpc@23.9 diff --git a/recipes/wcp/icon/v1/a100/config.yaml b/recipes/wcp/icon/v1/a100/config.yaml new file mode 100644 index 00000000..810d76bc --- /dev/null +++ b/recipes/wcp/icon/v1/a100/config.yaml @@ -0,0 +1,6 @@ +name: icon-wcp +store: /user-environment +spack: + commit: releases/v0.21 + repo: https://github.com/spack/spack.git +description: The tools required to build ICON diff --git a/recipes/wcp/icon/v1/a100/environments.yaml b/recipes/wcp/icon/v1/a100/environments.yaml new file mode 100644 index 00000000..2aeff706 --- /dev/null +++ b/recipes/wcp/icon/v1/a100/environments.yaml @@ -0,0 +1,54 @@ +nvidia: + compiler: + - toolchain: gcc + spec: gcc + - toolchain: llvm + spec: nvhpc + unify: when_possible + mpi: + spec: cray-mpich + gpu: cuda + specs: + - boost%gcc ~mpi + - python@3.10%gcc + #- eccodes@2.25.0%nvhpc +tools +fortran +aec +openmp jp2k=jasper + - cmake%gcc + - cuda@11.8%gcc + - hdf5%nvhpc +fortran + - hwloc%gcc + - netcdf-c%gcc + - netcdf-fortran%nvhpc + - numactl%gcc + - osu-micro-benchmarks@5.9%nvhpc + - perl%gcc + # The following are required to stop spack from using nvhpc to build + # basic dependencies, some of which don't compile with nvc etc. + # Explicitly excluded as modules. + - autoconf%gcc + - automake%gcc + - ca-certificates-mozilla%gcc + - diffutils%gcc + - gnuconfig%gcc + - libiconv%gcc + - libxcrypt%gcc + - libxml2%gcc + - m4%gcc + - ncurses%gcc + - openssl%gcc + - xz%gcc + - zlib%gcc + - zstd%gcc + - c-blosc%gcc + - libaec%gcc + - jasper%gcc + - patchelf%gcc + - gmake%gcc + variants: + - cuda_arch=80 + - +mpi + - +cuda + packages: + - curl + - gmake + views: + default: diff --git a/recipes/wcp/icon/v1/a100/extra/reframe.yaml b/recipes/wcp/icon/v1/a100/extra/reframe.yaml new file mode 100644 index 00000000..363f809f --- /dev/null +++ b/recipes/wcp/icon/v1/a100/extra/reframe.yaml @@ -0,0 +1,6 @@ +default: + features: [osu-micro-benchmarks, mpi, serial, openmp] + cc: mpicc + cxx: mpic++ + ftn: mpifort + activation: /user-environment/env/default/activate.sh diff --git a/recipes/wcp/icon/v1/a100/modules.yaml b/recipes/wcp/icon/v1/a100/modules.yaml new file mode 100644 index 00000000..db999335 --- /dev/null +++ b/recipes/wcp/icon/v1/a100/modules.yaml @@ -0,0 +1,43 @@ +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: none + hash_length: 0 + exclude_implicits: true + exclude: + - '%gcc@7.5.0' + - 'gcc %gcc@7.5.0' + - 'autoconf' + - 'automake' + - 'c-blosc' + - 'ca-certificates-mozilla' + - 'diffutils' + - 'gnuconfig' + - 'jasper' + - 'libaec' + - 'libiconv' + - 'libxcrypt' + - 'libxml2' + - 'patchelf' + - 'm4' + - 'ncurses' + - 'openssl' + - 'xz' + - 'zlib' + - 'zstd' + projections: + all: '{name}/{version}' diff --git a/recipes/wcp/icon/v1/gh200/compilers.yaml b/recipes/wcp/icon/v1/gh200/compilers.yaml new file mode 100644 index 00000000..b2e7685c --- /dev/null +++ b/recipes/wcp/icon/v1/gh200/compilers.yaml @@ -0,0 +1,9 @@ +bootstrap: + spec: gcc@12.3 +gcc: + specs: + - gcc@12.3 +llvm: + requires: gcc@12.3 + specs: + - nvhpc@24.3 diff --git a/recipes/wcp/icon/v1/gh200/config.yaml b/recipes/wcp/icon/v1/gh200/config.yaml new file mode 100644 index 00000000..810d76bc --- /dev/null +++ b/recipes/wcp/icon/v1/gh200/config.yaml @@ -0,0 +1,6 @@ +name: icon-wcp +store: /user-environment +spack: + commit: releases/v0.21 + repo: https://github.com/spack/spack.git +description: The tools required to build ICON diff --git a/recipes/wcp/icon/v1/gh200/environments.yaml b/recipes/wcp/icon/v1/gh200/environments.yaml new file mode 100644 index 00000000..6a2d9c1d --- /dev/null +++ b/recipes/wcp/icon/v1/gh200/environments.yaml @@ -0,0 +1,59 @@ +nvidia: + compiler: + - toolchain: gcc + spec: gcc + - toolchain: llvm + spec: nvhpc + unify: when_possible + mpi: + spec: cray-mpich@8.1.29%nvhpc + gpu: cuda + specs: + - boost%gcc ~mpi + - python@3.10%gcc + #- eccodes@2.25.0%nvhpc +tools +fortran +aec +openmp jp2k=jasper + - cmake%gcc + - cuda@12.3%gcc + - hdf5%gcc + - hwloc%gcc + - netcdf-c%gcc + - netcdf-cxx4%gcc + - netcdf-fortran%nvhpc + - numactl%gcc + - osu-micro-benchmarks@5.9%nvhpc + - perl%gcc + # everything needed for nccl on SS11 + - aws-ofi-nccl@master%gcc + - nccl%gcc + - nccl-tests%gcc + # The following are required to stop spack from using nvhpc to build + # basic dependencies, some of which don't compile with nvc etc. + # Explicitly excluded as modules. + - autoconf%gcc + - automake%gcc + - ca-certificates-mozilla%gcc + - diffutils%gcc + - gnuconfig%gcc + - libiconv%gcc + - libxcrypt%gcc + - libxml2%gcc + - m4%gcc + - ncurses%gcc + - openssl%gcc + - xz%gcc + - zlib%gcc + - zstd%gcc + - c-blosc%gcc + - libaec%gcc + - jasper%gcc + - patchelf%gcc + - gmake%gcc + variants: + - cuda_arch=90 + - +mpi + - +cuda + packages: + - curl + - gmake + views: + default: diff --git a/recipes/wcp/icon/v1/gh200/extra/reframe.yaml b/recipes/wcp/icon/v1/gh200/extra/reframe.yaml new file mode 100644 index 00000000..363f809f --- /dev/null +++ b/recipes/wcp/icon/v1/gh200/extra/reframe.yaml @@ -0,0 +1,6 @@ +default: + features: [osu-micro-benchmarks, mpi, serial, openmp] + cc: mpicc + cxx: mpic++ + ftn: mpifort + activation: /user-environment/env/default/activate.sh diff --git a/recipes/wcp/icon/v1/gh200/modules.yaml b/recipes/wcp/icon/v1/gh200/modules.yaml new file mode 100644 index 00000000..db999335 --- /dev/null +++ b/recipes/wcp/icon/v1/gh200/modules.yaml @@ -0,0 +1,43 @@ +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: none + hash_length: 0 + exclude_implicits: true + exclude: + - '%gcc@7.5.0' + - 'gcc %gcc@7.5.0' + - 'autoconf' + - 'automake' + - 'c-blosc' + - 'ca-certificates-mozilla' + - 'diffutils' + - 'gnuconfig' + - 'jasper' + - 'libaec' + - 'libiconv' + - 'libxcrypt' + - 'libxml2' + - 'patchelf' + - 'm4' + - 'ncurses' + - 'openssl' + - 'xz' + - 'zlib' + - 'zstd' + projections: + all: '{name}/{version}' diff --git a/recipes/wcp/icon/v1/readme.md b/recipes/wcp/icon/v1/readme.md new file mode 100644 index 00000000..344ca047 --- /dev/null +++ b/recipes/wcp/icon/v1/readme.md @@ -0,0 +1,11 @@ +# ICON PE + +A programming environment for development of both the Fortran+OpenACC and DSL versions of ICON. + +## Custom spack packages + +### netcdf-c + +The netcdf-c package adds a `logging` variant that sets the `--enable-logging` autotools flag. + +A Spack PR will be opend to add this feature to the upstream package once this feature has been validated. diff --git a/recipes/wcp/readme.md b/recipes/wcp/readme.md new file mode 100644 index 00000000..0da87da0 --- /dev/null +++ b/recipes/wcp/readme.md @@ -0,0 +1,3 @@ +# Weather and Climate Platform + +Image recipes for the weather and climate platform. diff --git a/scripts/setup-oras b/scripts/setup-oras index ba5424d2..bab5c246 100755 --- a/scripts/setup-oras +++ b/scripts/setup-oras @@ -1,7 +1,19 @@ #!/usr/bin/env bash +get_arch() { + case "$(uname -m)" in + aarch64) + echo "arm64" + ;; + *) + echo "amd64" + ;; + esac +} + +oras_arch=$(get_arch) oras_version=1.1.0 -oras_file=oras_${oras_version}_linux_amd64.tar.gz +oras_file=oras_${oras_version}_linux_${oras_arch}.tar.gz oras_url=https://github.com/oras-project/oras/releases/download/v${oras_version}/${oras_file} log "download and install oras $oras_url" diff --git a/scripts/setup-stackinator b/scripts/setup-stackinator index ecc3ebe5..3a8e0383 100755 --- a/scripts/setup-stackinator +++ b/scripts/setup-stackinator @@ -5,7 +5,7 @@ tool_base_path="$(pwd)" # builds in the same pipeline do not conflict tool_path=`mktemp -d` tool_repo=https://github.com/eth-cscs/stackinator.git -tool_version=9cc2c9e8b8ea9b04611391b13f7a9da2ff849cf7 +tool_version=v4.0 log "installing stackinator from git in '${tool_path}'" diff --git a/stack-build b/stack-build index ac922f74..7a45da14 100755 --- a/stack-build +++ b/stack-build @@ -54,6 +54,8 @@ uarch="-" mount="-" spack_develop="" +echo "====== parsing arguments $@" + while getopts n:s:r:b:u:m:d: flag do case "${flag}" in @@ -158,7 +160,7 @@ cd "${build_path}" log "building image in ${build_path}" echo "env --ignore-environment PATH=/usr/bin:/bin:${PWD}/spack/bin make store.squashfs -j64" -env --ignore-environment PATH=/usr/bin:/bin:${PWD}/spack/bin make store.squashfs -j64 +env --ignore-environment PATH=/usr/bin:/bin:${PWD}/spack/bin HOME=$HOME https_proxy=$https_proxy http_proxy=$http_proxy no_proxy="$no_proxy" make store.squashfs -j64 if [ ! $? -eq 0 ]; then log "TODO: save WIP of build an store it for later inspection" @@ -171,8 +173,6 @@ fi ## rego=jfrog.svc.cscs.ch/uenv -#repo_base=build/${system}/${uarch}/${name}/${build_id} -#repo=${repo_base}:latest repo_base=build/${system}/${uarch}/${name} repo=${repo_base}:${build_id}