Skip to content

Commit 3decb0a

Browse files
authored
Merge pull request #582 from CamStan/master
Merge dev branch into master for release 0.9.1
2 parents 821b19f + 21a9334 commit 3decb0a

File tree

240 files changed

+30257
-13706
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+30257
-13706
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- [ ] Performance enhancement (non-breaking change which improves efficiency)
2121
- [ ] Code cleanup (non-breaking change which makes code smaller or more readable)
2222
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
23+
- [ ] Testing (addition of new tests or update to current tests)
2324
- [ ] Documentation (a change to man pages or other documentation)
2425

2526
### Checklist:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ examples/src/*-static
7171
t/sys/open.t
7272
t/test-results/
7373
t/unifyfs_unmount.t
74+
t/seg_tree_test.t
7475
t/test_run_env.sh
7576
deps
7677
install

.gitlab-ci.yml

Lines changed: 99 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,80 @@
1+
# Both testing stages depend on the build stage. By using the "needs"
2+
# keyword, we prevent the testing stages from blocking, in favor of a
3+
# DAG.
14
stages:
5+
- init
26
- build
37
- test-unit
48
- test-integ
59

6-
cache:
7-
paths:
8-
- spack_ci/
10+
##### System Templates #####
911

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

12-
.quartz-template: &quartz_template
13-
tags:
14-
- quartz
15-
- shell
16-
variables:
17-
LLNL_SERVICE_USER: "unifysrv"
20+
.base-template:
1821
retry:
1922
max: 1
2023
when:
2124
- unknown_failure
2225
- stuck_or_timeout_failure
2326

24-
.butte-template: &butte_template
25-
tags:
26-
- butte
27-
- shell
27+
.slurm-single-node-template:
2828
variables:
29-
LLNL_SERVICE_USER: "unifysrv"
30-
retry:
31-
max: 1
32-
when:
33-
- unknown_failure
34-
- stuck_or_timeout_failure
29+
JOB_LAUNCH_COMMAND: "srun -N1 -n1"
30+
LLNL_SLURM_SCHEDULER_PARAMETERS: "-N 1 -p $QUEUE -t $UNIT_WALL_TIME -J unifyfs-unit-tests"
3531

36-
.build-template: &build_template
32+
.slurm-multi-node-template:
33+
variables:
34+
LLNL_SLURM_SCHEDULER_PARAMETERS: "-N $NNODES -p $QUEUE -t $INTEG_WALL_TIME -J unifyfs-integ-tests"
35+
36+
.lsf-single-node-template:
37+
variables:
38+
JOB_LAUNCH_COMMAND: "jsrun -r1 -n1"
39+
LLNL_LSF_SCHEDULER_PARAMETERS: "-nnodes 1 -q $QUEUE -W $UNIT_WALL_TIME -J unifyfs-unit-tests"
40+
SCHEDULER_PARAMETERS: "-nnodes 1 -P $PROJECT_ID -W $UNIT_WALL_TIME -J unifyfs-unit-tests"
41+
42+
.lsf-multi-node-template:
43+
variables:
44+
LLNL_LSF_SCHEDULER_PARAMETERS: "-nnodes $NNODES $STAGE_STORAGE -q $QUEUE -W $INTEG_WALL_TIME -J unifyfs-integ-tests"
45+
SCHEDULER_PARAMETERS: "-nnodes $NNODES -P $PROJECT_ID -W $INTEG_WALL_TIME -J unifyfs-integ-tests"
46+
47+
##### Job Templates #####
48+
49+
# Only use this template in a pre-build job if needing to clone and
50+
# run subsequent jobs from a non-default location.
51+
# The WORKING_DIR envar needs to be defined in the job variables.
52+
#
53+
# The before_script section here overrides the default before_script
54+
# for jobs using this template.
55+
.init-template:
56+
stage: init
57+
before_script:
58+
- mkdir -pv $WORKING_DIR
59+
- cd $WORKING_DIR
60+
script:
61+
- git clone -b ${CI_COMMIT_BRANCH} --depth=1 ${CI_REPOSITORY_URL} $WORKING_DIR
62+
63+
# Build script used by each system. The CC and FC variables are set in
64+
# the specific job scripts and evaluated in the before_script in order
65+
# to customize which compiler will be used for each job.
66+
# An artifact is created to pass on to the testing stages. The
67+
# test-unit stage requires the unifyfs-build/ files and the test-integ
68+
# stage requires the unifyfs-install/ files.
69+
.build-template:
3770
stage: build
3871
script:
3972
- ./autogen.sh
4073
- mkdir -p unifyfs-build unifyfs-install && cd unifyfs-build
41-
- ../configure --prefix=$CI_PROJECT_DIR/unifyfs-install --enable-fortran --disable-silent-rules
74+
- ../configure CC=$CC_PATH FC=$FC_PATH --prefix=${WORKING_DIR}/unifyfs-install --enable-fortran --disable-silent-rules
4275
- make V=1
4376
- make V=1 install
77+
needs: []
4478
artifacts:
4579
name: "${CI_JOB_NAME}-${CI_PIPELINE_ID}"
4680
untracked: true
@@ -49,84 +83,54 @@ cache:
4983
- unifyfs-build/
5084
- unifyfs-install/
5185

52-
.unit-test-template: &unit_test_template
86+
.unit-test-template:
5387
stage: test-unit
5488
script:
55-
- cd unifyfs-build/t && make check
89+
- cd unifyfs-build/t && $JOB_LAUNCH_COMMAND make check
5690
after_script:
57-
- rm -rf /tmp/unify* /tmp/tmp.* /tmp/mdhim* /tmp/na_sm
58-
59-
.quartz-batch-variables:
60-
variables: &quartz_batch_variables
61-
LLNL_SLURM_SCHEDULER_PARAMETERS: "-N $NNODES -p pbatch -t $WALL_TIME"
62-
LLNL_SERVICE_USER: "unifysrv"
63-
CI_PROJDIR: "$CI_PROJECT_DIR"
64-
UNIFYFS_INSTALL: "$CI_PROJECT_DIR/unifyfs-install"
65-
CI_NPROCS: "$NPROCS"
91+
- rm -rf /tmp/unify* /tmp/tmp.* /tmp/mdhim* /tmp/na_sm | true
6692

67-
.butte-batch-variables:
68-
variables: &butte_batch_variables
69-
LLNL_LSF_SCHEDULER_PARAMETERS: "-nnodes $NNODES -q pbatch -W $WALL_TIME"
70-
LLNL_SERVICE_USER: "unifysrv"
71-
CI_PROJDIR: "$CI_PROJECT_DIR"
72-
UNIFYFS_INSTALL: "$CI_PROJECT_DIR/unifyfs-install"
73-
CI_NPROCS: "$NPROCS"
93+
# Variables here are used for the integration test suite and can be
94+
# adjusted in the Gitlab interface. See our testing documentation for
95+
# full details.
96+
.integ-test-template:
97+
stage: test-integ
98+
script:
99+
- cd t/ci && prove -v RUN_CI_TESTS.sh
74100

75101
##### Jobs #####
76102

103+
# Since Gitlab currently runs in the user's home environment, the
104+
# before_script is currently only set up to load the proper Spack
105+
# modules, if they are available, to prevent changing the user's
106+
# environment. Install any needed modules in the user's environment
107+
# prior to running when new compilers or architectures need to be
108+
# tested.
109+
#
110+
# For jobs running in the not-default location, change directories
111+
# to the WORKING_DIR directory. Otherwise, set WORKING_DIR to be the
112+
# CI_PROJECT_DIR for the build step.
113+
#
114+
# The COMPILER, CC_PATH, and FC_PATH variables are evaluated here. Set
115+
# them in their specific job scripts.
116+
# SPACK_COMPILER and SPACK_ARCH are then set to load the matching
117+
# dependencies for the desired compiler.
77118
before_script:
78-
# HERE BE DRAGONS!: Since on HPC and running as user, Spack might already
79-
# exist and can get complicated if we install it again.
80-
#
81-
# check for sourced spack || check for unsourced spack in $HOME/spack and
82-
# source it || check for cached spack, clone if none, and source it
83-
- 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)
84-
- SPACK_ARCH=$(spack arch)
85-
- spack install leveldb && spack load leveldb arch=$SPACK_ARCH
86-
- spack install [email protected] && spack load [email protected] arch=$SPACK_ARCH
87-
- spack install flatcc && spack load flatcc arch=$SPACK_ARCH
88-
- spack install margo^mercury+bmi~boostsys && spack load argobots arch=$SPACK_ARCH && spack load mercury arch=$SPACK_ARCH && spack load margo arch=$SPACK_ARCH
89-
90-
build-quartz:
91-
<<: *quartz_template
92-
<<: *build_template
93-
94-
build-butte:
95-
<<: *butte_template
96-
<<: *build_template
97-
98-
unit-test-quartz:
99-
<<: *quartz_template
100-
<<: *unit_test_template
101-
dependencies:
102-
- build-quartz
103-
104-
unit-test-butte:
105-
<<: *butte_template
106-
<<: *unit_test_template
107-
dependencies:
108-
- build-butte
109-
110-
#integ-test-quartz:
111-
# <<: *quartz_template
112-
# stage: test-integ
113-
# tags:
114-
# - quartz
115-
# - batch
116-
# variables: *quartz_batch_variables
117-
# script:
118-
# - cd t/ci && prove -v RUN_CI_TESTS.sh
119-
# dependencies:
120-
# - build-quartz
121-
122-
integ-test-butte:
123-
<<: *butte_template
124-
stage: test-integ
125-
tags:
126-
- butte
127-
- batch
128-
variables: *butte_batch_variables
129-
script:
130-
- cd t/ci && prove -v RUN_CI_TESTS.sh
131-
dependencies:
132-
- build-butte
119+
- which spack || ((cd $HOME/spack && git describe) && . $HOME/spack/share/spack/setup-env.sh)
120+
- if [[ -d $WORKING_DIR ]]; then cd ${WORKING_DIR}; else export WORKING_DIR=${CI_PROJECT_DIR}; fi
121+
- module load $COMPILER
122+
- CC_PATH=$($CC_COMMAND)
123+
- FC_PATH=$($FC_COMMAND)
124+
- SPACK_COMPILER=${COMPILER//\//@}
125+
- SPACK_ARCH="$(spack arch -p)-$(spack arch -o)-$(uname -m)"
126+
- spack load gotcha %$SPACK_COMPILER arch=$SPACK_ARCH
127+
- spack load argobots %$SPACK_COMPILER arch=$SPACK_ARCH
128+
- spack load mercury %$SPACK_COMPILER arch=$SPACK_ARCH
129+
- spack load margo %$SPACK_COMPILER arch=$SPACK_ARCH
130+
- spack load spath %$SPACK_COMPILER arch=$SPACK_ARCH
131+
132+
# System specific jobs
133+
include:
134+
- local: .gitlab/ascent.yml
135+
- local: .gitlab/catalyst.yml
136+
- local: .gitlab/lassen.yml

.gitlab/ascent.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
##### Ascent Templates #####
2+
3+
# The WORKING_DIR envar is defined to allow the init job to clone the
4+
# git repo to a different location than the default. Subsequent jobs
5+
# will then `cd` to this directory during their before_script stage.
6+
# The WORKING_DIR_BASE envar is definied in the Gitlab UI.
7+
#
8+
# The RUN_ASCENT variable can be toggled in the Gitlab interface to
9+
# toggle whether jobs should be run on this system.
10+
.ascent-template:
11+
variables:
12+
WORKING_DIR: ${WORKING_DIR_BASE}/${CI_PIPELINE_ID}/source
13+
extends: .base-template
14+
rules:
15+
- if: '$RUN_ASCENT != "ON"'
16+
when: never
17+
- when: on_success
18+
19+
.ascent-shell-template:
20+
extends: .ascent-template
21+
tags: [nobatch]
22+
23+
.ascent-batch-template:
24+
extends: .ascent-template
25+
tags: [batch]
26+
27+
##### All Ascent Jobs #####
28+
29+
ascent-gcc-4_8_5-init:
30+
extends: [.ascent-shell-template, .init-template]
31+
32+
ascent-gcc-4_8_5-build:
33+
variables:
34+
COMPILER: gcc/4.8.5
35+
CC_COMMAND: "which gcc"
36+
FC_COMMAND: "which gfortran"
37+
extends: [.ascent-shell-template, .build-template]
38+
needs: ["ascent-gcc-4_8_5-init"]
39+
40+
ascent-gcc-4_8_5-unit-test:
41+
variables:
42+
COMPILER: gcc/4.8.5
43+
CC_COMMAND: "which gcc"
44+
FC_COMMAND: "which gfortran"
45+
extends: [.lsf-single-node-template, .ascent-batch-template, .unit-test-template]
46+
needs: ["ascent-gcc-4_8_5-build"]
47+
48+
ascent-gcc-4_8_5-integ-test:
49+
variables:
50+
COMPILER: gcc/4.8.5
51+
CC_COMMAND: "which gcc"
52+
FC_COMMAND: "which gfortran"
53+
extends: [.lsf-multi-node-template, .ascent-batch-template, .integ-test-template]
54+
needs: ["ascent-gcc-4_8_5-build"]

.gitlab/catalyst.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Catalyst Templates
2+
3+
# The RUN_CATALYST variable can be toggled in the Gitlab interface to
4+
# toggle whether jobs should be run on this system.
5+
.catalyst-template:
6+
extends: .base-template
7+
rules:
8+
- if: '$RUN_CATALYST != "ON"'
9+
when: never
10+
- when: on_success
11+
12+
.catalyst-shell-template:
13+
extends: .catalyst-template
14+
tags:
15+
- catalyst
16+
- shell
17+
18+
.catalyst-batch-template:
19+
extends: .catalyst-template
20+
tags:
21+
- catalyst
22+
- batch
23+
24+
##### All Catalyst Jobs #####
25+
26+
catalyst-gcc-4_9_3-build:
27+
variables:
28+
COMPILER: gcc/4.9.3
29+
CC_COMMAND: "which gcc"
30+
FC_COMMAND: "which gfortran"
31+
extends: [.catalyst-shell-template, .build-template]
32+
33+
catalyst-gcc-4_9_3-unit-test:
34+
variables:
35+
COMPILER: gcc/4.9.3
36+
CC_COMMAND: "which gcc"
37+
FC_COMMAND: "which gfortran"
38+
extends: [.slurm-single-node-template, .catalyst-batch-template, .unit-test-template]
39+
needs: ["catalyst-gcc-4_9_3-build"]
40+
41+
catalyst-gcc-4_9_3-integ-test:
42+
variables:
43+
COMPILER: gcc/4.9.3
44+
CC_COMMAND: "which gcc"
45+
FC_COMMAND: "which gfortran"
46+
extends: [.slurm-multi-node-template, .catalyst-batch-template, .integ-test-template]
47+
needs: ["catalyst-gcc-4_9_3-build"]

.gitlab/lassen.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
##### Lassen Templates #####
2+
3+
# The RUN_LASSEN variable can be toggled in the Gitlab interface to
4+
# toggle whether jobs should be run on this system.
5+
.lassen-template:
6+
extends: .base-template
7+
rules:
8+
- if: '$RUN_LASSEN != "ON"'
9+
when: never
10+
- when: on_success
11+
12+
.lassen-shell-template:
13+
extends: .lassen-template
14+
tags:
15+
- lassen
16+
- shell
17+
18+
.lassen-batch-template:
19+
extends: .lassen-template
20+
tags:
21+
- lassen
22+
- batch
23+
24+
##### All Lassen Jobs #####
25+
26+
lassen-gcc-4_9_3-build:
27+
variables:
28+
COMPILER: gcc/4.9.3
29+
CC_COMMAND: "which gcc"
30+
FC_COMMAND: "which gfortran"
31+
extends: [.lassen-shell-template, .build-template]
32+
33+
lassen-gcc-4_9_3-unit-test:
34+
variables:
35+
COMPILER: gcc/4.9.3
36+
CC_COMMAND: "which gcc"
37+
FC_COMMAND: "which gfortran"
38+
extends: [.lsf-single-node-template, .lassen-batch-template, .unit-test-template]
39+
needs: ["lassen-gcc-4_9_3-build"]
40+
41+
lassen-gcc-4_9_3-integ-test:
42+
variables:
43+
COMPILER: gcc/4.9.3
44+
CC_COMMAND: "which gcc"
45+
FC_COMMAND: "which gfortran"
46+
extends: [.lsf-multi-node-template, .lassen-batch-template, .integ-test-template]
47+
needs: ["lassen-gcc-4_9_3-build"]

0 commit comments

Comments
 (0)