Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Support for shared libraries in GPU execution (python launch support) #795

Merged
merged 129 commits into from
Aug 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
306cd1a
Support for shared libraries in GPU execution (python launch support)
pramodk Apr 3, 2022
045b9cd
Pass Memb_list* as an argument for all common prototypes in order
pramodk Apr 20, 2022
ccb8b6b
Add link to libscopmath in neuron as well
pramodk Apr 20, 2022
b2fcc72
Memb_list for pattern.mod should be calloc'd for zero-initialisation
pramodk Apr 21, 2022
59d6d96
Add global_variables per membrane list and cleanup for GPU
pramodk Apr 22, 2022
12dabf1
redefine nrn_ghk with celsius as an argument
pramodk Apr 23, 2022
1139a74
Reorganise unit definitions, inline functions.
olupton Apr 22, 2022
e2585be
Build a shared library
olupton Apr 22, 2022
11785bc
fudge
olupton Apr 22, 2022
49953ff
fudge
olupton Apr 25, 2022
edf3608
scopmath and coreneuron are inside corenrnmech
olupton Apr 25, 2022
b79cab7
fast_imem may be in unified memory
olupton Apr 25, 2022
5090beb
cleanup
olupton Apr 25, 2022
5f86115
don't cudaFree things allocated by NEURON
olupton Apr 25, 2022
6acc288
random123 hackery
olupton Apr 25, 2022
7ceaff6
homegrown present table to avoid dynamic loading + acc_deviceptr limi…
olupton Apr 25, 2022
8b2ffa7
Cleanup
olupton Apr 26, 2022
bf3a0bc
generate some more ringtests
olupton Jul 6, 2022
d933c04
clang-format
olupton Jul 12, 2022
d0e7b2c
cmake-format
olupton Jul 12, 2022
52951c7
Don't delete threads from the GPU if we didn't copy them there. Disab…
olupton Jul 12, 2022
90dd823
use -gpu=nordc and make #pragma acc routine seq functions inline
olupton Jul 14, 2022
6cca56f
fix handing of empty suffix
olupton Jul 14, 2022
258ef94
revert hack to compile/link main() with g++
olupton Jul 15, 2022
708864c
revert to -gpu=rdc and put the random123 global state back in .cpp be…
olupton Jul 15, 2022
6a74cf9
promise we will never try and allocate from the device
olupton Jul 15, 2022
5dabb36
drop -lscopmath as its folded in elsewhere
olupton Jul 15, 2022
532b8ad
random123 header reorganisation
olupton Jul 15, 2022
e193d31
revert a different allocation workaround.
olupton Jul 15, 2022
986e82e
clang-format
olupton Jul 15, 2022
f03cdfd
build system tmpcommit
olupton Jul 19, 2022
6bb5fe9
cleanup unit test cmake
olupton Jul 19, 2022
bddef61
more cmake
olupton Jul 19, 2022
7456766
cleanup
olupton Jul 19, 2022
9557193
drop .libs stuff
olupton Jul 19, 2022
e5b1240
format
olupton Jul 19, 2022
2e40b11
Fixes nvhpc didn't care about.
olupton Jul 19, 2022
0b17c68
more fixes from CI errors.
olupton Jul 19, 2022
71e1895
OpenACC + shared tests in GitLab CI.
olupton Jul 19, 2022
3492fe4
Try and cleanup CLI11 handling.
olupton Jul 19, 2022
61e3fad
try and consolidate build logic more
olupton Jul 19, 2022
a05830c
format
olupton Jul 19, 2022
c504a87
fix static linking
olupton Jul 19, 2022
5d61ca2
linking fixups
olupton Jul 19, 2022
c147425
minor tweaks
olupton Jul 19, 2022
6a7c824
One more tweak
olupton Jul 19, 2022
fc2b572
ar: avoid --output
olupton Jul 26, 2022
0e9f713
Try and fix macOS linking.
olupton Jul 26, 2022
3dc6884
Try and fix Caliper in GitLab CI.
olupton Jul 26, 2022
d41e82b
simplify: +caliper in all CoreNEURON builds
olupton Jul 26, 2022
acd5a7e
Disable present table when unified memory enabled.
olupton Jul 26, 2022
2a07e14
Shuffle Random123 + GPU yet again for 22.3
olupton Jul 26, 2022
93af3f3
Some CORENEURON_ -> CORENRN_ for consistency. Export OpenACC flags to…
olupton Jul 26, 2022
bd10048
cmake fixups
olupton Jul 26, 2022
b0b7451
Explicit random123 global state data transfer.
olupton Jul 26, 2022
179af80
random123 global state v59
olupton Jul 26, 2022
fb8018e
random123 global state v73
olupton Jul 27, 2022
66a3938
fix prototype for _check_table_thread
pramodk Jul 27, 2022
ad634e9
add more GPU builds
olupton Jul 27, 2022
9ce83c2
avoid if target (nv::target::is_device)
olupton Jul 28, 2022
202a5f5
submodule
olupton Jul 28, 2022
c77d7c2
tweaks
olupton Jul 28, 2022
d6d9c0c
submodule
olupton Jul 28, 2022
1eabb56
fix non-dynamic MPI + caliper
olupton Aug 2, 2022
fb36084
clang-format
olupton Aug 2, 2022
ca98719
libcoreneuron.so -> libcorenrnmech.so, try and fix static builds
olupton Aug 3, 2022
f33d56e
fixups
olupton Aug 3, 2022
b2e7f30
typo
olupton Aug 3, 2022
d3545ff
add fallback logic for cmake<3.18
olupton Aug 3, 2022
8db9162
Do not enable OpenMP in shared/OpenACC builds.
olupton Aug 4, 2022
fc46594
Add rpaths inside nrnivmodl-core.
olupton Aug 4, 2022
9c96a36
accept a private destructor function pointer from generated mechanisms
olupton Aug 4, 2022
37b9291
Support private constructor.
olupton Aug 4, 2022
a13f67b
try and fix table statements
olupton Aug 4, 2022
8124239
submodule
olupton Aug 5, 2022
cd499d7
reduce diff
olupton Aug 5, 2022
341e89c
nmodl attempt
olupton Aug 5, 2022
5ee91a6
fix build dependencies
olupton Aug 10, 2022
9597257
Try and fix partial_piv_lu.cu linking.
olupton Aug 10, 2022
c0862b7
fix shutdown with NMODL
olupton Aug 10, 2022
4f3c5df
try and fix all the things
olupton Aug 11, 2022
f706029
one more openmp fix
olupton Aug 11, 2022
adead78
clang-format
olupton Aug 11, 2022
de70877
clang-format
olupton Aug 16, 2022
8c73756
nmodl submodule
olupton Aug 16, 2022
56b573a
cmake-format
olupton Aug 16, 2022
b8f2665
Boost unit tests are built in header-only mode now
olupton Aug 16, 2022
4944c75
Drop ${TEST_EXEC_PREFIX} that was causing simple tests to be executed…
olupton Aug 16, 2022
9d2ce47
submodule
olupton Aug 17, 2022
467f132
CORENEURON_GPU_DEBUG: add environment variable that enables cnrn_targ…
olupton Aug 17, 2022
b23acd7
avoid sizeof(void)
olupton Aug 17, 2022
26c394b
try and fix ispc
olupton Aug 17, 2022
d74796a
drop ispc_celsius
olupton Aug 17, 2022
1c23826
ispc fix
olupton Aug 17, 2022
d1757eb
submodule
olupton Aug 17, 2022
2df364f
lots more coreneuron builds, presumably temporarily
olupton Aug 17, 2022
da8d64f
cleanup on mod2c side
olupton Aug 18, 2022
be420bf
nmodl submodule
olupton Aug 18, 2022
8dcb601
nmodl submodule, eigen shim comments
olupton Aug 19, 2022
a11b461
submodules
olupton Aug 19, 2022
1cce3af
swap order so needs_foo.o comes before libfoo.so
olupton Aug 19, 2022
188a935
submodule
olupton Aug 19, 2022
195e75d
revert some incomplete unified memory changes, add comments, private …
olupton Aug 19, 2022
52de49e
nmodl
olupton Aug 22, 2022
94fef75
mod2c
olupton Aug 22, 2022
dbd53fc
set CORENRN_ENABLE_SHARED as global property
olupton Aug 22, 2022
30ba4b0
re-add global_variables[_size] and more helpers
olupton Aug 23, 2022
9c28e3d
reference counting in private present table
olupton Aug 23, 2022
89f3e67
explicit copyin/update/copyout for celsius/pi/secondorder
olupton Aug 23, 2022
fbde41c
submodules
olupton Aug 23, 2022
c728fab
ispc fix
olupton Aug 24, 2022
0adad8b
submodule
olupton Aug 24, 2022
dc8d86b
OpenMP: support cnrn_target_is_present
olupton Aug 24, 2022
d75d5d4
submodule
olupton Aug 24, 2022
d8ea959
omp_target_is_present has problems in nvhpc 22.3
olupton Aug 24, 2022
6c44dd7
Merge branch 'master' into pramodk/exclude-global-vars
olupton Aug 25, 2022
74e5f0a
Update GitLab CI config
olupton Aug 25, 2022
6b96330
tweak nmodl+cpu builds
olupton Aug 25, 2022
d72ecde
tweak mod2c+gpu build
olupton Aug 25, 2022
977779e
swap debug/relwithdebinfo for nmodl+gpu builds
olupton Aug 25, 2022
08031b2
fixup
olupton Aug 25, 2022
aa893f6
disable OpenMP in CPU builds
olupton Aug 25, 2022
f71b6fd
submodules
olupton Aug 25, 2022
b214ad0
submodule
olupton Aug 25, 2022
f53901e
submodule
olupton Aug 25, 2022
c647a08
submodule
olupton Aug 25, 2022
2857e2d
make all intel builds debug
olupton Aug 26, 2022
0e24755
keep some optimisation of partial_piv_lu.cpp in debug builds
olupton Aug 26, 2022
567bd21
update nmodl and mod2c submodule
pramodk Aug 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 126 additions & 74 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,127 +81,179 @@ build:nmodl:
SPACK_PACKAGE_COMPILER: gcc

# Build CoreNEURON
build:coreneuron:mod2c:nvhpc:acc:
extends: [.build, .spack_nvhpc]
variables:
SPACK_PACKAGE: coreneuron
# See https://github.com/BlueBrain/CoreNeuron/issues/518 re: build_type
SPACK_PACKAGE_SPEC: +gpu+openmp+tests~legacy-unit build_type=RelWithDebInfo

# Build CoreNEURON with Unified Memory on GPU
build:coreneuron:mod2c:nvhpc:acc:unified:
extends: [.build, .spack_nvhpc]
variables:
SPACK_PACKAGE: coreneuron
# See https://github.com/BlueBrain/CoreNeuron/issues/518 re: build_type
SPACK_PACKAGE_SPEC: +gpu+unified+openmp+tests~legacy-unit build_type=RelWithDebInfo

.build_coreneuron_nmodl:
.build_coreneuron:
extends: [.build]
variables:
SPACK_PACKAGE: coreneuron
# NEURON depends on py-mpi4py, most of whose dependencies are pulled in by
# nmodl%gcc, with the exception of MPI, which is pulled in by
# coreneuron%{nvhpc,intel}. hpe-mpi is an external package anyway, so
# setting its compiler is just changing how it is labelled in the
# dependency graph and not changing which installation is used, but this
# means that in the NEURON step an existing py-mpi4py%gcc can be used.
# Otherwise a new py-mpi4py with hpe-mpi%{nvhpc,intel} will be built.
# caliper: papi%nvhpc does not build; use the caliper from the deployment
# TODO: fix this more robustly so we don't have to play so many games.
SPACK_PACKAGE_DEPENDENCIES: ^hpe-mpi%gcc
SPACK_PACKAGE_DEPENDENCIES: ^hpe-mpi%gcc ^caliper%gcc+cuda cuda_arch=70

build:coreneuron:nmodl:nvhpc:omp:
extends: [.build_coreneuron_nmodl, .spack_nvhpc]
# TODO: improve coverage by switching an Intel build to be statically linked
# TODO: improve coverage by switching an Intel build to RelWithDebInfo
# TODO: improve coverage by enabling +openmp on an Intel build
build:coreneuron:mod2c:intel:shared:debug:
extends: [.build_coreneuron, .spack_intel]
variables:
SPACK_PACKAGE: coreneuron
# See https://github.com/BlueBrain/CoreNeuron/issues/518 re: build_type
SPACK_PACKAGE_SPEC: +nmodl+openmp+gpu+tests~legacy-unit~sympy build_type=RelWithDebInfo
SPACK_PACKAGE_SPEC: +caliper~gpu~legacy-unit~nmodl~openmp+shared+tests~unified build_type=Debug

build:coreneuron:nmodl:intel:debug:legacy:
extends: [.build_coreneuron, .spack_intel]
needs: ["build:nmodl"]
variables:
SPACK_PACKAGE_SPEC: +caliper~gpu~legacy-unit+nmodl~openmp~shared~sympy+tests~unified build_type=Debug

build:coreneuron:nmodl:nvhpc:acc:
extends: [.build_coreneuron_nmodl, .spack_nvhpc]
# Disable caliper to improve coverage
build:coreneuron:nmodl:intel:shared:debug:
extends: [.build_coreneuron, .spack_intel]
needs: ["build:nmodl"]
variables:
SPACK_PACKAGE: coreneuron
# See https://github.com/BlueBrain/CoreNeuron/issues/518 re: build_type
# Sympy + OpenMP target offload does not currently work with NVHPC
SPACK_PACKAGE_SPEC: +nmodl~openmp+gpu+tests~legacy-unit+sympy build_type=RelWithDebInfo
SPACK_PACKAGE_DEPENDENCIES: ^hpe-mpi%gcc
SPACK_PACKAGE_SPEC: ~caliper~gpu~legacy-unit+nmodl~openmp+shared+sympy+tests~unified build_type=Debug

# Not linked to a NEURON build+test job, see
# https://github.com/BlueBrain/CoreNeuron/issues/594
build:coreneuron:mod2c:nvhpc:acc:debug:unified:
extends: [.build_coreneuron, .spack_nvhpc]
variables:
SPACK_PACKAGE_SPEC: +caliper+gpu~legacy-unit~nmodl+openmp~shared+tests+unified build_type=Debug

# Shared + OpenACC + OpenMP host threading has problems
build:coreneuron:mod2c:nvhpc:acc:shared:
extends: [.build_coreneuron, .spack_nvhpc]
variables:
SPACK_PACKAGE_SPEC: +caliper+gpu~legacy-unit~nmodl~openmp+shared+tests~unified build_type=RelWithDebInfo

build:coreneuron:nmodl:nvhpc:acc:debug:legacy:
extends: [.build_coreneuron, .spack_nvhpc]
needs: ["build:nmodl"]
variables:
SPACK_PACKAGE_SPEC: +caliper+gpu~legacy-unit+nmodl~openmp~shared~sympy+tests~unified build_type=Debug

build:coreneuron:mod2c:intel:
extends: [.build, .spack_intel]
build:coreneuron:nmodl:nvhpc:acc:shared:
extends: [.build_coreneuron, .spack_nvhpc]
needs: ["build:nmodl"]
variables:
SPACK_PACKAGE: coreneuron
SPACK_PACKAGE_SPEC: +tests~legacy-unit build_type=Debug
SPACK_PACKAGE_SPEC: +caliper+gpu~legacy-unit+nmodl~openmp+shared+sympy+tests~unified build_type=RelWithDebInfo

build:coreneuron:nmodl:intel:
extends: [.build_coreneuron_nmodl, .spack_intel]
build:coreneuron:nmodl:nvhpc:omp:legacy:
extends: [.build_coreneuron, .spack_nvhpc]
needs: ["build:nmodl"]
variables:
SPACK_PACKAGE: coreneuron
SPACK_PACKAGE_SPEC: +nmodl+tests~legacy-unit build_type=Debug
SPACK_PACKAGE_SPEC: +caliper+gpu~legacy-unit+nmodl+openmp~shared~sympy+tests~unified build_type=RelWithDebInfo

build:coreneuron:nmodl:nvhpc:omp:debug:
extends: [.build_coreneuron, .spack_nvhpc]
needs: ["build:nmodl"]
variables:
SPACK_PACKAGE_SPEC: +caliper+gpu~legacy-unit+nmodl+openmp~shared+sympy+tests~unified build_type=Debug

# Build NEURON
build:neuron:mod2c:nvhpc:acc:
build:neuron:mod2c:intel:shared:debug:
extends: [.build_neuron, .spack_intel]
needs: ["build:coreneuron:mod2c:intel:shared:debug"]

build:neuron:nmodl:intel:debug:legacy:
extends: [.build_neuron, .spack_intel]
needs: ["build:coreneuron:nmodl:intel:debug:legacy"]

build:neuron:nmodl:intel:shared:debug:
extends: [.build_neuron, .spack_intel]
needs: ["build:coreneuron:nmodl:intel:shared:debug"]

build:neuron:mod2c:nvhpc:acc:shared:
extends: [.build_neuron, .spack_nvhpc]
needs: ["build:coreneuron:mod2c:nvhpc:acc"]
needs: ["build:coreneuron:mod2c:nvhpc:acc:shared"]

build:neuron:nmodl:nvhpc:omp:
build:neuron:nmodl:nvhpc:acc:debug:legacy:
extends: [.build_neuron, .spack_nvhpc]
needs: ["build:coreneuron:nmodl:nvhpc:omp"]
needs: ["build:coreneuron:nmodl:nvhpc:acc:debug:legacy"]

build:neuron:nmodl:nvhpc:acc:
build:neuron:nmodl:nvhpc:acc:shared:
extends: [.build_neuron, .spack_nvhpc]
needs: ["build:coreneuron:nmodl:nvhpc:acc"]
needs: ["build:coreneuron:nmodl:nvhpc:acc:shared"]

build:neuron:mod2c:intel:
extends: [.build_neuron, .spack_intel]
needs: ["build:coreneuron:mod2c:intel"]
build:neuron:nmodl:nvhpc:omp:legacy:
extends: [.build_neuron, .spack_nvhpc]
needs: ["build:coreneuron:nmodl:nvhpc:omp:legacy"]

build:neuron:nmodl:intel:
extends: [.build_neuron, .spack_intel]
needs: ["build:coreneuron:nmodl:intel"]
build:neuron:nmodl:nvhpc:omp:debug:
extends: [.build_neuron, .spack_nvhpc]
needs: ["build:coreneuron:nmodl:nvhpc:omp:debug"]

# Test CoreNEURON
test:coreneuron:mod2c:nvhpc:acc:
test:coreneuron:mod2c:intel:shared:debug:
extends: [.ctest]
needs: ["build:coreneuron:mod2c:intel:shared:debug"]

test:coreneuron:nmodl:intel:debug:legacy:
extends: [.ctest]
needs: ["build:coreneuron:nmodl:intel:debug:legacy"]

test:coreneuron:nmodl:intel:shared:debug:
extends: [.ctest]
needs: ["build:coreneuron:nmodl:intel:shared:debug"]

test:coreneuron:mod2c:nvhpc:acc:debug:unified:
extends: [.ctest, .gpu_node]
needs: ["build:coreneuron:mod2c:nvhpc:acc"]
needs: ["build:coreneuron:mod2c:nvhpc:acc:debug:unified"]

test:coreneuron:mod2c:nvhpc:acc:unified:
test:coreneuron:mod2c:nvhpc:acc:shared:
extends: [.ctest, .gpu_node]
needs: ["build:coreneuron:mod2c:nvhpc:acc:unified"]
needs: ["build:coreneuron:mod2c:nvhpc:acc:shared"]

test:coreneuron:nmodl:nvhpc:omp:
test:coreneuron:nmodl:nvhpc:acc:debug:legacy:
extends: [.ctest, .gpu_node]
needs: ["build:coreneuron:nmodl:nvhpc:omp"]
needs: ["build:coreneuron:nmodl:nvhpc:acc:debug:legacy"]

test:coreneuron:nmodl:nvhpc:acc:
test:coreneuron:nmodl:nvhpc:acc:shared:
extends: [.ctest, .gpu_node]
needs: ["build:coreneuron:nmodl:nvhpc:acc"]
needs: ["build:coreneuron:nmodl:nvhpc:acc:shared"]

test:coreneuron:mod2c:intel:
extends: [.ctest]
needs: ["build:coreneuron:mod2c:intel"]
test:coreneuron:nmodl:nvhpc:omp:legacy:
extends: [.ctest, .gpu_node]
needs: ["build:coreneuron:nmodl:nvhpc:omp:legacy"]

test:coreneuron:nmodl:intel:
extends: [.ctest]
needs: ["build:coreneuron:nmodl:intel"]
test:coreneuron:nmodl:nvhpc:omp:debug:
extends: [.ctest, .gpu_node]
needs: ["build:coreneuron:nmodl:nvhpc:omp:debug"]

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

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

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

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

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

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

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

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