Skip to content

Spack package repository maintained by Student Cluster Competition Team @ Sun Yat-sen University.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

SYSU-SCC/sysu-scc-spack-repo

 
 

Repository files navigation

sysu-scc-spack-repo

Spack package repository maintained by Student Cluster Competition Team @ Sun Yat-sen University.

由中山大学超算队维护的 spack package repository;同时,我们也向上游提交了包括 antlr4-completeantlr4-cpp-runtimecutlasspy-altairpy-vl-convert-pythonpy-cairosvgpy-cssselect2 在内的 package,并已合并入主线。

同时提供了一个面向超算竞赛的环境部署脚本,旨在比赛期间快速构建一个可以使用的 spack 环境,其中包括:

  1. 从 spack 官方镜像下载一个预编译的编译器,重新源码自编译一遍作为默认编译器。
  2. 基于 spack environments 快速安装必要的软件环境,例如 mpi 等。
    • 需要注意的是,此处的 spack.yaml 仅作为示例,并非中大超算队在比赛中使用的版本。可以参照 spack 文档spack-configs,打包符合实际需要的软件环境。
  3. 基于 GitHub Actions 的构建测试,保障脚本的代码质量。

同样欢迎其他学校使用,欢迎StarsIssuesIssues-pr!友好的超算比赛环境,由你我共建~

How to use

使用预编译的环境

docker run \
   --name sccenv \
   wukan0621/sccenv
# 请提前将 sccenv 挂载到目标位置
docker cp sccenv:/sccenv /
docker rm sccenv

从零开始

最小化配置一个可以使用的 spack,需要的软件依赖可以参考 Dockerfile

python3 -c "from tarfile import open;from urllib.request import urlopen;open(mode='r|gz',fileobj=urlopen('https://github.com/SYSU-SCC/sysu-scc-spack-repo/archive/refs/tags/v0.22.1.13.2.0.12.20240705.tar.gz')).extractall()"

# 只依赖这一个环境变量,可以放进 ~/.bashrc
export SCC_SETUP_ENV=$(realpath sysu-scc-spack-repo-0.22.1.13.2.0.12.20240705/share/sysu-scc-spack-repo/setup-env.sh)

# 初始化
$(dirname $SCC_SETUP_ENV)/init-env.sh v0.22.1

# 后续每次只需要执行这一句即可使用配好的环境
. $SCC_SETUP_ENV

# 从 spack 官方镜像下载一个预编译的编译器,重新源码自编译一遍作为默认编译器
# see <https://cache.spack.io/package/v0.22.1/gcc/specs/>
$(dirname $SCC_SETUP_ENV)/init-default-compiler.sh "builtin.gcc@13.2.0 target=x86_64_v3 os=ubuntu18.04" "gcc@13.2.0%gcc@13.2.0+binutils" "gcc@13.2.0"

集成进已有的 spack 环境

python3 -c "from tarfile import open;from urllib.request import urlopen;open(mode='r|gz',fileobj=urlopen('https://github.com/SYSU-SCC/sysu-scc-spack-repo/archive/refs/heads/latest.tar.gz')).extractall()"
spack repo add --scope=site sysu-scc-spack-repo-latest

# A Simple Test
spack env create sccenv sysu-scc-spack-repo-latest/spack.yaml
spack env activate -p sccenv
spack install
spack env deactivate

测试是否能用

spack install sccenv.hpl-ai ^blaspp+openmp ^openblas threads=openmp ^mpich
spack load hpl-ai
cp $(spack location -i hpl-ai)/bin/HPL.dat HPL.dat
OMP_NUM_THREADS=2 $(which mpirun) -n 4 xhpl_ai

License

This project is part of Spack. Spack is distributed under the terms of both the MIT license and the Apache License (Version 2.0). Users may choose either license, at their option.

All new contributions must be made under both the MIT and Apache-2.0 licenses.

See LICENSE-MIT, LICENSE-APACHE, COPYRIGHT, and NOTICE for details.

SPDX-License-Identifier: (Apache-2.0 OR MIT)

LLNL-CODE-811652

About

Spack package repository maintained by Student Cluster Competition Team @ Sun Yat-sen University.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 94.5%
  • Dockerfile 3.2%
  • Shell 2.3%