Skip to content

Commit

Permalink
addding more new structure for crusher ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Danehy committed Oct 30, 2023
1 parent a30f88f commit e3b709b
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 18 deletions.
29 changes: 29 additions & 0 deletions .gitlab/ornl/crusher.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Crusher Variables
.crusher_rules:
rules:
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PINELINE_SOURCE == "schedule"
- when: never

.crusher_variables:
# Only for slurm tagged jobs...
variables:
SCHEDULER_PARAMETERS: "-N 1 -A CSC359 --time=60"
WORKDIR: /gpfs/alpine/csc359/proj-shared/ci/${CI_PIPELINE_ID}

# Crusher Jobs
Crusher Build:
stage: build
tags: [crusher, shell]
script:
- mkdir -p "$WORKDIR"
- cp -r . "$WORKDIR"
- cd "$WORKDIR"
- export srcdir=$WORKDIR builddir=$WORKDIR/build installdir=$WORKDIR/install
- MY_CLUSTER=crusher ./buildsystem/build.sh --build-only --job=clang-hip
- res=$?
- exit $res
extends:
- .crusher_rules
- .crusher_variables

2 changes: 0 additions & 2 deletions buildsystem/crusher-env.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
source /etc/profile.d/modules.sh
module purge
module load gcc/10.3.0
module load rocm/5.6.0
source ./buildsystem/spack/crusher/modules/dependencies.sh
21 changes: 11 additions & 10 deletions buildsystem/spack/crusher/env.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
#!/bin/bash

#
module purge

# Load system python
module load cray-python/3.10.10
# Load tcl modules that configure env vars
module load gcc/10.3
module load git/2.31.1

# Define environment variables for where spack stores key files
# For now, SPACK_INSTALL is the path where everything spack related is installed
# If you want to modify the module install path, edit the spack.yaml manually
BASE=/qfs/projects/exasgd/resolve/spack-ci
export SPACK_INSTALL=$BASE/install
export SPACK_CACHE=$BASE/../$(whoami)/spack-cache
export SPACK_DISABLE_LOCAL_CONFIG=1
export SPACK_PYTHON=$(which python)
BASE=/lustre/orion/csc359/proj-shared/resolve/spack-ci-crusher

export tempdir=$SPACK_CACHE
export TMP=$SPACK_CACHE
export TMPDIR=$SPACK_CACHE
export SPACK_INSTALL=/lustre/orion/csc359/proj-shared/resolve/spack-ci-crusher
export SPACK_MODULES=modules
export SPACK_CACHE=$BASE/spack-cache
export SPACK_MIRROR=$BASE/spack-mirror
export SPACK_PYTHON=$CRAY_PYTHON_PREFIX
export SPACK_DISABLE_LOCAL_CONFIG=1
26 changes: 20 additions & 6 deletions buildsystem/spack/crusher/install.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
#!/bin/bash
#SBATCH -A exasgd
#SBATCH -p incline
#SBATCH -A CSC359
#SBATCH -W 1:30
#SBATCH -N 1
#SBATCH -n 3
#SBATCH --gres=gpu:1
#SBATCH -p batch
#SBATCH -J resolve_spack
#SBATCH -alloc_flags maximizegpfs
#SBATCH -o spack_install.%J.output
#SBATCH -e spack_install.%J.output
#SBTACH -t 240
#SBATCH -t 240

# Configure https proxy because spack is going to do some things with git
export all_proxy="socks://proxy.ccs.ornl.gov:3128"
export ftp_proxy="ftp://proxy.ccs.ornl.gov:3128"
export http_proxy="http://proxy.ccs.ornl.gov:3128"
export https_proxy="http://proxy.ccs.ornl.gov:3128"
export HTTP_PROXY="http://proxy.ccs.ornl.gov:3128"
export HTTPS_PROXY="http://proxy.ccs.ornl.gov:3128"
export proxy="proxy.ccs.ornl.gov:3128"
export no_proxy='localhost,127.0.0.0/8,*.ccs.ornl.gov,*.olcf.ornl.gov,*.ncrc.gov'

export MY_CLUSTER=crusher
. buildsystem/load-spack.sh &&
spack mirror add local file://$SPACK_MIRROR &&
# This is necessary?
spack mirror add spack-public file://$SPACK_MIRROR &&
spack mirror list &&
spack develop --no-clone --path=$(pwd) resolve@develop &&
./buildsystem/configure-modules.sh 64
srun -n 1 ./buildsystem/configure-modules.sh 40
1 change: 1 addition & 0 deletions buildsystem/spack/crusher/modules/dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module use -a /lustre/orion/csc359/proj-shared/resolve/spack-ci-crusher/modules/linux-sles15-zen3
50 changes: 50 additions & 0 deletions buildsystem/spack/crusher/spack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.
spack:
# add package specs to the `specs` list
specs:
- resolve
view: false
concretizer:
unify: when_possible
reuse: true
config:
concretizer: clingo
install_tree:
root: $SPACK_INSTALL
source_cache: $SPACK_CACHE/source
misc_cache: $SPACK_CACHE/misc
build_stage: $SPACK_CACHE/build
modules:
default:
roots:
tcl: $SPACK_INSTALL/modules
compilers:
- compiler:
spec: gcc@=10.3.0
paths:
cc: /opt/cray/pe/gcc/10.3.0/bin/gcc
cxx: /opt/cray/pe/gcc/10.3.0/bin/g++
f77: /opt/cray/pe/gcc/10.3.0/bin/gfortran
fc: /opt/cray/pe/gcc/10.3.0/bin/gfortran
flags: {}
operating_system: sles15
target: x86_64
modules: []
environment: {}
extra_rpaths: []
- compiler:
spec: gcc@=7.5.0
paths:
cc: /usr/bin/gcc
cxx: /usr/bin/g++
f77: /usr/bin/gfortran
fc: /usr/bin/gfortran
flags: {}
operating_system: sles15
target: x86_64
modules: []
environment: {}
extra_rpaths: []

0 comments on commit e3b709b

Please sign in to comment.