Skip to content

Commit

Permalink
CI: enable optimisations, use master of reporting libraries (#2186)
Browse files Browse the repository at this point in the history
* libsonata-report, reportinglib: default to building master
* libsonata-report, reportinglib: single %gcc build
* neuron: no more debug variant, prefer build_type=FastDebug
* BLUECONFIGS_BRANCH: support dynamic setting
  This should be picked up from GitHub PR descriptions using the
  CI_BRANCHES syntax, or if it is set manually when launching a
  pipeline using the GitLab UI.
* [email protected] + OpenMP: fixes including for -O1
- Add explicit mapping clauses to avoid a crash in test-solver when
  compiled with optimisations enabled.
- Use an explicit if (nt->compute_gpu) block instead of relying on if
  clauses in OpenACC and OpenMP directives; nvc++ 22.3 does not seem to
  respect these clauses at least in some cases.
- To avoid code duplication, introduce a solve_interleaved2_loop_body
  function that combines the triangularisation and back substitution
  steps.
- Because the compiler cannot deal with many layers of function
  calls in device code, manually inline function calls into
  solve_interleaved2_loop_body.
* tqperf: bump past tqperf#14.
  • Loading branch information
olupton authored Jan 26, 2023
1 parent 7d905a3 commit 9531fc5
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 136 deletions.
81 changes: 53 additions & 28 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,18 @@ mac_m1_cmake_build:
- fi;

variables:
BLUECONFIGS_BRANCH:
description: Branch of blueconfigs to trigger the simulation stack pipeline from
value: main
LIBSONATA_REPORT_BRANCH:
description: Branch of libsonata-report to build BlueBrain models against in the simulation stack pipeline (LIBSONATA_REPORT_COMMIT and LIBSONATA_REPORT_TAG also possible)
value: master
NMODL_BRANCH:
description: Branch of NMODL to build CoreNEURON against (NMODL_COMMIT and NMODL_TAG also possible)
value: master
REPORTINGLIB_BRANCH:
description: Branch of reportinglib to build BlueBrain models against in the simulation stack pipeline (REPORTINGLIB_COMMIT and REPORTINGLIB_TAG also possible)
value: master
SPACK_BRANCH:
description: Branch of BlueBrain Spack to use for the CI pipeline
value: develop
Expand All @@ -112,17 +121,25 @@ variables:
# Set up Spack
spack_setup:
extends: .spack_setup_ccache
script:
- !reference [.spack_setup_ccache, script]
# try and make sure these are propagated to the simulation_stack bridge job and child pipeline
- echo "BLUECONFIGS_BRANCH=${BLUECONFIGS_BRANCH}" >> commit-mapping.env
- echo "BLUECONFIGS_BRANCH=${BLUECONFIGS_BRANCH}" >> spack_clone_variables.env
variables:
NEURON_COMMIT: ${CI_COMMIT_SHA}
# Enable fetching GitHub PR descriptions and parsing them to find out what
# branches to build of other projects.
PARSE_GITHUB_PR_DESCRIPTIONS: "true"
# BLUECONFIGS_BRANCH does not correspond to a Spack package called blueconfigs
SPACK_SETUP_IGNORE_PACKAGE_VARIABLES: BLUECONFIGS

simulation_stack:
stage: .pre
# Take advantage of GitHub PR description parsing in the spack_setup job.
needs: [spack_setup]
trigger:
branch: $BLUECONFIGS_BRANCH
project: hpc/sim/blueconfigs
# NEURON CI status depends on the BlueConfigs CI status.
strategy: depend
Expand Down Expand Up @@ -150,7 +167,7 @@ simulation_stack:
variables:
bb5_duration: "2:00:00"
SPACK_PACKAGE: neuron
SPACK_PACKAGE_SPEC: +coreneuron+debug+tests~legacy-unit~rx3d model_tests=channel-benchmark,olfactory,tqperf-heavy
SPACK_PACKAGE_SPEC: +coreneuron+tests~legacy-unit~rx3d build_type=FastDebug model_tests=channel-benchmark,olfactory,tqperf-heavy
.gpu_node:
variables:
bb5_constraint: volta
Expand Down Expand Up @@ -179,75 +196,83 @@ build:nmodl:
# avoids more rebuilding when +report is set (which it is by default)
SPACK_PACKAGE_DEPENDENCIES: ^hpe-mpi%gcc ^hdf5%gcc

build:neuron:mod2c:intel:shared:debug:
extends: [.build_neuron, .spack_intel]
.build_neuron_mod2c:
extends: [.build_neuron]
variables:
# libsonata-report and reportinglib parts avoid those libraries being
# compiled with intel, nvhpc and gcc in every pipeline; the
# hpe-mpi/python/py-setuptools parts try to avoid re-building py-mpi4py
SPACK_PACKAGE_DEPENDENCIES: ^libsonata-report%gcc ^reportinglib%gcc ^hpe-mpi%gcc ^python%gcc ^py-setuptools%gcc

build:neuron:mod2c:intel:shared:
extends: [.build_neuron_mod2c, .spack_intel]
variables:
SPACK_PACKAGE_SPEC: +debug~rx3d~caliper~gpu+coreneuron~legacy-unit~nmodl~openmp+shared+tests~unified build_type=Debug model_tests=channel-benchmark,olfactory,tqperf-heavy
SPACK_PACKAGE_SPEC: ~rx3d~caliper~gpu+coreneuron~legacy-unit~nmodl~openmp+shared+tests~unified build_type=FastDebug model_tests=channel-benchmark,olfactory,tqperf-heavy

build:neuron:nmodl:intel:debug:legacy:
build:neuron:nmodl:intel:legacy:
extends: [.build_neuron_nmodl, .spack_intel]
variables:
SPACK_PACKAGE_SPEC: +debug~rx3d~caliper~gpu+coreneuron~legacy-unit+nmodl~openmp~shared~sympy+tests~unified build_type=Debug model_tests=channel-benchmark,olfactory,tqperf-heavy
SPACK_PACKAGE_SPEC: ~rx3d~caliper~gpu+coreneuron~legacy-unit+nmodl~openmp~shared~sympy+tests~unified build_type=FastDebug model_tests=channel-benchmark,olfactory,tqperf-heavy

build:neuron:nmodl:intel:shared:debug:
build:neuron:nmodl:intel:shared:
extends: [.build_neuron_nmodl, .spack_intel]
variables:
SPACK_PACKAGE_SPEC: +debug~rx3d~caliper~gpu+coreneuron~legacy-unit+nmodl~openmp+shared+sympy+tests~unified build_type=Debug model_tests=channel-benchmark,olfactory,tqperf-heavy
SPACK_PACKAGE_SPEC: ~rx3d~caliper~gpu+coreneuron~legacy-unit+nmodl~openmp+shared+sympy+tests~unified build_type=FastDebug model_tests=channel-benchmark,olfactory,tqperf-heavy

build:neuron:mod2c:nvhpc:acc:shared:
extends: [.build_neuron, .spack_nvhpc]
extends: [.build_neuron_mod2c, .spack_nvhpc]
variables:
SPACK_PACKAGE_SPEC: +debug~rx3d~caliper+gpu+coreneuron~legacy-unit~nmodl~openmp+shared+tests~unified build_type=RelWithDebInfo model_tests=channel-benchmark,olfactory,tqperf-heavy
SPACK_PACKAGE_SPEC: ~rx3d~caliper+gpu+coreneuron~legacy-unit~nmodl~openmp+shared+tests~unified build_type=FastDebug model_tests=channel-benchmark,olfactory,tqperf-heavy

build:neuron:nmodl:nvhpc:acc:debug:legacy:
build:neuron:nmodl:nvhpc:acc:legacy:
extends: [.build_neuron_nmodl, .spack_nvhpc]
variables:
SPACK_PACKAGE_SPEC: +debug~rx3d~caliper+gpu+coreneuron~legacy-unit+nmodl~openmp~shared~sympy+tests~unified build_type=Debug model_tests=channel-benchmark,olfactory,tqperf-heavy
SPACK_PACKAGE_SPEC: ~rx3d~caliper+gpu+coreneuron~legacy-unit+nmodl~openmp~shared~sympy+tests~unified build_type=FastDebug model_tests=channel-benchmark,olfactory,tqperf-heavy

build:neuron:nmodl:nvhpc:acc:shared:
extends: [.build_neuron_nmodl, .spack_nvhpc]
variables:
SPACK_PACKAGE_SPEC: +debug~rx3d~caliper+gpu+coreneuron~legacy-unit+nmodl~openmp+shared+sympy+tests~unified build_type=RelWithDebInfo model_tests=channel-benchmark,olfactory,tqperf-heavy
SPACK_PACKAGE_SPEC: ~rx3d~caliper+gpu+coreneuron~legacy-unit+nmodl~openmp+shared+sympy+tests~unified build_type=FastDebug model_tests=channel-benchmark,olfactory,tqperf-heavy

build:neuron:nmodl:nvhpc:omp:legacy:debug:
build:neuron:nmodl:nvhpc:omp:legacy:
extends: [.build_neuron_nmodl, .spack_nvhpc]
variables:
SPACK_PACKAGE_SPEC: +debug~rx3d+caliper+gpu+coreneuron~legacy-unit+nmodl+openmp~shared~sympy+tests~unified build_type=Debug model_tests=channel-benchmark,olfactory,tqperf-heavy ^caliper+cuda%gcc cuda_arch=70
SPACK_PACKAGE_SPEC: ~rx3d+caliper+gpu+coreneuron~legacy-unit+nmodl+openmp~shared~sympy+tests~unified build_type=FastDebug model_tests=channel-benchmark,olfactory,tqperf-heavy ^caliper+cuda%gcc cuda_arch=70

build:neuron:nmodl:nvhpc:omp:debug:
build:neuron:nmodl:nvhpc:omp:
extends: [.build_neuron_nmodl, .spack_nvhpc]
variables:
SPACK_PACKAGE_SPEC: +debug~rx3d+caliper+gpu+coreneuron~legacy-unit+nmodl+openmp~shared+sympy+tests~unified build_type=Debug model_tests=channel-benchmark,olfactory,tqperf-heavy ^caliper+cuda%gcc cuda_arch=70
SPACK_PACKAGE_SPEC: ~rx3d+caliper+gpu+coreneuron~legacy-unit+nmodl+openmp~shared+sympy+tests~unified build_type=FastDebug model_tests=channel-benchmark,olfactory,tqperf-heavy ^caliper+cuda%gcc cuda_arch=70

# Test NEURON
test:neuron:mod2c:intel:shared:debug:
test:neuron:mod2c:intel:shared:
extends: [.test_neuron]
needs: ["build:neuron:mod2c:intel:shared:debug"]
needs: ["build:neuron:mod2c:intel:shared"]

test:neuron:nmodl:intel:debug:legacy:
test:neuron:nmodl:intel:legacy:
extends: [.test_neuron]
needs: ["build:neuron:nmodl:intel:debug:legacy"]
needs: ["build:neuron:nmodl:intel:legacy"]

test:neuron:nmodl:intel:shared:debug:
test:neuron:nmodl:intel:shared:
extends: [.test_neuron]
needs: ["build:neuron:nmodl:intel:shared:debug"]
needs: ["build:neuron:nmodl:intel:shared"]

test:neuron:mod2c:nvhpc:acc:shared:
extends: [.test_neuron, .gpu_node]
needs: ["build:neuron:mod2c:nvhpc:acc:shared"]

test:neuron:nmodl:nvhpc:acc:debug:legacy:
test:neuron:nmodl:nvhpc:acc:legacy:
extends: [.test_neuron, .gpu_node]
needs: ["build:neuron:nmodl:nvhpc:acc:debug:legacy"]
needs: ["build:neuron:nmodl:nvhpc:acc:legacy"]

test:neuron:nmodl:nvhpc:acc:shared:
extends: [.test_neuron, .gpu_node]
needs: ["build:neuron:nmodl:nvhpc:acc:shared"]

test:neuron:nmodl:nvhpc:omp:legacy:
extends: [.test_neuron, .gpu_node]
needs: ["build:neuron:nmodl:nvhpc:omp:legacy:debug"]
needs: ["build:neuron:nmodl:nvhpc:omp:legacy"]

test:neuron:nmodl:nvhpc:omp:debug:
test:neuron:nmodl:nvhpc:omp:
extends: [.test_neuron, .gpu_node]
needs: ["build:neuron:nmodl:nvhpc:omp:debug"]
needs: ["build:neuron:nmodl:nvhpc:omp"]
Loading

0 comments on commit 9531fc5

Please sign in to comment.