Skip to content

Commit

Permalink
Merge pull request #582 from CamStan/master
Browse files Browse the repository at this point in the history
Merge dev branch into master for release 0.9.1
  • Loading branch information
adammoody authored Dec 3, 2020
2 parents 821b19f + 21a9334 commit 3decb0a
Show file tree
Hide file tree
Showing 240 changed files with 30,257 additions and 13,706 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- [ ] Performance enhancement (non-breaking change which improves efficiency)
- [ ] Code cleanup (non-breaking change which makes code smaller or more readable)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Testing (addition of new tests or update to current tests)
- [ ] Documentation (a change to man pages or other documentation)

### Checklist:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ examples/src/*-static
t/sys/open.t
t/test-results/
t/unifyfs_unmount.t
t/seg_tree_test.t
t/test_run_env.sh
deps
install
194 changes: 99 additions & 95 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,80 @@
# Both testing stages depend on the build stage. By using the "needs"
# keyword, we prevent the testing stages from blocking, in favor of a
# DAG.
stages:
- init
- build
- test-unit
- test-integ

cache:
paths:
- spack_ci/
##### System Templates #####

##### Templates #####
# Generic system templates used to contruct the final jobs on specific
# systems within their respective <system>.yml file. Currently
# these are LLNL specific, but can be adjusted or added to as new
# systems become available.
#
# The NNODES, WALL_TIME, and STORAGE_SIZE variables can be altered in
# Gitlab interface if/when the defaults need to be changed.

.quartz-template: &quartz_template
tags:
- quartz
- shell
variables:
LLNL_SERVICE_USER: "unifysrv"
.base-template:
retry:
max: 1
when:
- unknown_failure
- stuck_or_timeout_failure

.butte-template: &butte_template
tags:
- butte
- shell
.slurm-single-node-template:
variables:
LLNL_SERVICE_USER: "unifysrv"
retry:
max: 1
when:
- unknown_failure
- stuck_or_timeout_failure
JOB_LAUNCH_COMMAND: "srun -N1 -n1"
LLNL_SLURM_SCHEDULER_PARAMETERS: "-N 1 -p $QUEUE -t $UNIT_WALL_TIME -J unifyfs-unit-tests"

.build-template: &build_template
.slurm-multi-node-template:
variables:
LLNL_SLURM_SCHEDULER_PARAMETERS: "-N $NNODES -p $QUEUE -t $INTEG_WALL_TIME -J unifyfs-integ-tests"

.lsf-single-node-template:
variables:
JOB_LAUNCH_COMMAND: "jsrun -r1 -n1"
LLNL_LSF_SCHEDULER_PARAMETERS: "-nnodes 1 -q $QUEUE -W $UNIT_WALL_TIME -J unifyfs-unit-tests"
SCHEDULER_PARAMETERS: "-nnodes 1 -P $PROJECT_ID -W $UNIT_WALL_TIME -J unifyfs-unit-tests"

.lsf-multi-node-template:
variables:
LLNL_LSF_SCHEDULER_PARAMETERS: "-nnodes $NNODES $STAGE_STORAGE -q $QUEUE -W $INTEG_WALL_TIME -J unifyfs-integ-tests"
SCHEDULER_PARAMETERS: "-nnodes $NNODES -P $PROJECT_ID -W $INTEG_WALL_TIME -J unifyfs-integ-tests"

##### Job Templates #####

# Only use this template in a pre-build job if needing to clone and
# run subsequent jobs from a non-default location.
# The WORKING_DIR envar needs to be defined in the job variables.
#
# The before_script section here overrides the default before_script
# for jobs using this template.
.init-template:
stage: init
before_script:
- mkdir -pv $WORKING_DIR
- cd $WORKING_DIR
script:
- git clone -b ${CI_COMMIT_BRANCH} --depth=1 ${CI_REPOSITORY_URL} $WORKING_DIR

# Build script used by each system. The CC and FC variables are set in
# the specific job scripts and evaluated in the before_script in order
# to customize which compiler will be used for each job.
# An artifact is created to pass on to the testing stages. The
# test-unit stage requires the unifyfs-build/ files and the test-integ
# stage requires the unifyfs-install/ files.
.build-template:
stage: build
script:
- ./autogen.sh
- mkdir -p unifyfs-build unifyfs-install && cd unifyfs-build
- ../configure --prefix=$CI_PROJECT_DIR/unifyfs-install --enable-fortran --disable-silent-rules
- ../configure CC=$CC_PATH FC=$FC_PATH --prefix=${WORKING_DIR}/unifyfs-install --enable-fortran --disable-silent-rules
- make V=1
- make V=1 install
needs: []
artifacts:
name: "${CI_JOB_NAME}-${CI_PIPELINE_ID}"
untracked: true
Expand All @@ -49,84 +83,54 @@ cache:
- unifyfs-build/
- unifyfs-install/

.unit-test-template: &unit_test_template
.unit-test-template:
stage: test-unit
script:
- cd unifyfs-build/t && make check
- cd unifyfs-build/t && $JOB_LAUNCH_COMMAND make check
after_script:
- rm -rf /tmp/unify* /tmp/tmp.* /tmp/mdhim* /tmp/na_sm

.quartz-batch-variables:
variables: &quartz_batch_variables
LLNL_SLURM_SCHEDULER_PARAMETERS: "-N $NNODES -p pbatch -t $WALL_TIME"
LLNL_SERVICE_USER: "unifysrv"
CI_PROJDIR: "$CI_PROJECT_DIR"
UNIFYFS_INSTALL: "$CI_PROJECT_DIR/unifyfs-install"
CI_NPROCS: "$NPROCS"
- rm -rf /tmp/unify* /tmp/tmp.* /tmp/mdhim* /tmp/na_sm | true

.butte-batch-variables:
variables: &butte_batch_variables
LLNL_LSF_SCHEDULER_PARAMETERS: "-nnodes $NNODES -q pbatch -W $WALL_TIME"
LLNL_SERVICE_USER: "unifysrv"
CI_PROJDIR: "$CI_PROJECT_DIR"
UNIFYFS_INSTALL: "$CI_PROJECT_DIR/unifyfs-install"
CI_NPROCS: "$NPROCS"
# Variables here are used for the integration test suite and can be
# adjusted in the Gitlab interface. See our testing documentation for
# full details.
.integ-test-template:
stage: test-integ
script:
- cd t/ci && prove -v RUN_CI_TESTS.sh

##### Jobs #####

# Since Gitlab currently runs in the user's home environment, the
# before_script is currently only set up to load the proper Spack
# modules, if they are available, to prevent changing the user's
# environment. Install any needed modules in the user's environment
# prior to running when new compilers or architectures need to be
# tested.
#
# For jobs running in the not-default location, change directories
# to the WORKING_DIR directory. Otherwise, set WORKING_DIR to be the
# CI_PROJECT_DIR for the build step.
#
# The COMPILER, CC_PATH, and FC_PATH variables are evaluated here. Set
# them in their specific job scripts.
# SPACK_COMPILER and SPACK_ARCH are then set to load the matching
# dependencies for the desired compiler.
before_script:
# HERE BE DRAGONS!: Since on HPC and running as user, Spack might already
# exist and can get complicated if we install it again.
#
# check for sourced spack || check for unsourced spack in $HOME/spack and
# source it || check for cached spack, clone if none, and source it
- which spack || ((cd $HOME/spack && git describe) && . $HOME/spack/share/spack/setup-env.sh) || (((cd spack_ci && git describe) || git clone https://github.com/CamStan/spack spack_ci) && . spack_ci/share/spack/setup-env.sh)
- SPACK_ARCH=$(spack arch)
- spack install leveldb && spack load leveldb arch=$SPACK_ARCH
- spack install [email protected] && spack load [email protected] arch=$SPACK_ARCH
- spack install flatcc && spack load flatcc arch=$SPACK_ARCH
- spack install margo^mercury+bmi~boostsys && spack load argobots arch=$SPACK_ARCH && spack load mercury arch=$SPACK_ARCH && spack load margo arch=$SPACK_ARCH

build-quartz:
<<: *quartz_template
<<: *build_template

build-butte:
<<: *butte_template
<<: *build_template

unit-test-quartz:
<<: *quartz_template
<<: *unit_test_template
dependencies:
- build-quartz

unit-test-butte:
<<: *butte_template
<<: *unit_test_template
dependencies:
- build-butte

#integ-test-quartz:
# <<: *quartz_template
# stage: test-integ
# tags:
# - quartz
# - batch
# variables: *quartz_batch_variables
# script:
# - cd t/ci && prove -v RUN_CI_TESTS.sh
# dependencies:
# - build-quartz

integ-test-butte:
<<: *butte_template
stage: test-integ
tags:
- butte
- batch
variables: *butte_batch_variables
script:
- cd t/ci && prove -v RUN_CI_TESTS.sh
dependencies:
- build-butte
- which spack || ((cd $HOME/spack && git describe) && . $HOME/spack/share/spack/setup-env.sh)
- if [[ -d $WORKING_DIR ]]; then cd ${WORKING_DIR}; else export WORKING_DIR=${CI_PROJECT_DIR}; fi
- module load $COMPILER
- CC_PATH=$($CC_COMMAND)
- FC_PATH=$($FC_COMMAND)
- SPACK_COMPILER=${COMPILER//\//@}
- SPACK_ARCH="$(spack arch -p)-$(spack arch -o)-$(uname -m)"
- spack load gotcha %$SPACK_COMPILER arch=$SPACK_ARCH
- spack load argobots %$SPACK_COMPILER arch=$SPACK_ARCH
- spack load mercury %$SPACK_COMPILER arch=$SPACK_ARCH
- spack load margo %$SPACK_COMPILER arch=$SPACK_ARCH
- spack load spath %$SPACK_COMPILER arch=$SPACK_ARCH

# System specific jobs
include:
- local: .gitlab/ascent.yml
- local: .gitlab/catalyst.yml
- local: .gitlab/lassen.yml
54 changes: 54 additions & 0 deletions .gitlab/ascent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
##### Ascent Templates #####

# The WORKING_DIR envar is defined to allow the init job to clone the
# git repo to a different location than the default. Subsequent jobs
# will then `cd` to this directory during their before_script stage.
# The WORKING_DIR_BASE envar is definied in the Gitlab UI.
#
# The RUN_ASCENT variable can be toggled in the Gitlab interface to
# toggle whether jobs should be run on this system.
.ascent-template:
variables:
WORKING_DIR: ${WORKING_DIR_BASE}/${CI_PIPELINE_ID}/source
extends: .base-template
rules:
- if: '$RUN_ASCENT != "ON"'
when: never
- when: on_success

.ascent-shell-template:
extends: .ascent-template
tags: [nobatch]

.ascent-batch-template:
extends: .ascent-template
tags: [batch]

##### All Ascent Jobs #####

ascent-gcc-4_8_5-init:
extends: [.ascent-shell-template, .init-template]

ascent-gcc-4_8_5-build:
variables:
COMPILER: gcc/4.8.5
CC_COMMAND: "which gcc"
FC_COMMAND: "which gfortran"
extends: [.ascent-shell-template, .build-template]
needs: ["ascent-gcc-4_8_5-init"]

ascent-gcc-4_8_5-unit-test:
variables:
COMPILER: gcc/4.8.5
CC_COMMAND: "which gcc"
FC_COMMAND: "which gfortran"
extends: [.lsf-single-node-template, .ascent-batch-template, .unit-test-template]
needs: ["ascent-gcc-4_8_5-build"]

ascent-gcc-4_8_5-integ-test:
variables:
COMPILER: gcc/4.8.5
CC_COMMAND: "which gcc"
FC_COMMAND: "which gfortran"
extends: [.lsf-multi-node-template, .ascent-batch-template, .integ-test-template]
needs: ["ascent-gcc-4_8_5-build"]
47 changes: 47 additions & 0 deletions .gitlab/catalyst.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Catalyst Templates

# The RUN_CATALYST variable can be toggled in the Gitlab interface to
# toggle whether jobs should be run on this system.
.catalyst-template:
extends: .base-template
rules:
- if: '$RUN_CATALYST != "ON"'
when: never
- when: on_success

.catalyst-shell-template:
extends: .catalyst-template
tags:
- catalyst
- shell

.catalyst-batch-template:
extends: .catalyst-template
tags:
- catalyst
- batch

##### All Catalyst Jobs #####

catalyst-gcc-4_9_3-build:
variables:
COMPILER: gcc/4.9.3
CC_COMMAND: "which gcc"
FC_COMMAND: "which gfortran"
extends: [.catalyst-shell-template, .build-template]

catalyst-gcc-4_9_3-unit-test:
variables:
COMPILER: gcc/4.9.3
CC_COMMAND: "which gcc"
FC_COMMAND: "which gfortran"
extends: [.slurm-single-node-template, .catalyst-batch-template, .unit-test-template]
needs: ["catalyst-gcc-4_9_3-build"]

catalyst-gcc-4_9_3-integ-test:
variables:
COMPILER: gcc/4.9.3
CC_COMMAND: "which gcc"
FC_COMMAND: "which gfortran"
extends: [.slurm-multi-node-template, .catalyst-batch-template, .integ-test-template]
needs: ["catalyst-gcc-4_9_3-build"]
47 changes: 47 additions & 0 deletions .gitlab/lassen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
##### Lassen Templates #####

# The RUN_LASSEN variable can be toggled in the Gitlab interface to
# toggle whether jobs should be run on this system.
.lassen-template:
extends: .base-template
rules:
- if: '$RUN_LASSEN != "ON"'
when: never
- when: on_success

.lassen-shell-template:
extends: .lassen-template
tags:
- lassen
- shell

.lassen-batch-template:
extends: .lassen-template
tags:
- lassen
- batch

##### All Lassen Jobs #####

lassen-gcc-4_9_3-build:
variables:
COMPILER: gcc/4.9.3
CC_COMMAND: "which gcc"
FC_COMMAND: "which gfortran"
extends: [.lassen-shell-template, .build-template]

lassen-gcc-4_9_3-unit-test:
variables:
COMPILER: gcc/4.9.3
CC_COMMAND: "which gcc"
FC_COMMAND: "which gfortran"
extends: [.lsf-single-node-template, .lassen-batch-template, .unit-test-template]
needs: ["lassen-gcc-4_9_3-build"]

lassen-gcc-4_9_3-integ-test:
variables:
COMPILER: gcc/4.9.3
CC_COMMAND: "which gcc"
FC_COMMAND: "which gfortran"
extends: [.lsf-multi-node-template, .lassen-batch-template, .integ-test-template]
needs: ["lassen-gcc-4_9_3-build"]
Loading

0 comments on commit 3decb0a

Please sign in to comment.