-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExternalProject SUNDIALS 3.2.1 #1960
base: master
Are you sure you want to change the base?
Changes from 110 commits
4581ab4
0a3692c
d38f489
f36e64a
daf0008
857bd86
152e86f
e613da1
f2c6b4d
5c5ae92
3341256
9a38810
e0b3ef1
5a11a3f
aeb1684
00b2c66
174036f
554b326
56a1134
7e6761c
7176f4a
824732b
a2044cb
5e0162b
c60a3eb
fe5c851
d0bf3e7
65b13f5
12ddfb5
84f05af
ffdb5fb
34062f3
dbfc76f
06f2bc3
ff9bb0f
1a84a72
910d9ac
7e9ddf1
5ac7685
009a914
53683bf
9d6b033
7dbf02f
6f92bd5
6a4e401
0eda725
f9749ca
cfe9ef1
6279e08
858b829
67b677c
3777c05
8f17f69
93be65e
30ee751
8c46a46
9414fb6
7cf79d6
be164eb
b40997a
30c9890
d7c2d10
fe1260f
cf0ccb1
f26fc9d
8368752
ca98ce5
eb5e85a
0d4cc21
21c7826
95b5cca
52cd8b8
97b1089
3277919
02c9d51
8b4d2c2
a66cc8f
6910d0a
932bdff
a8e8b85
50b1163
73c8c79
71a629c
4d4889e
befbb64
083a1c8
4c5905b
ce227b4
e6017d3
4267638
befec84
8099fd1
7c670b7
e0a6bc2
8ab1989
5bdaf5e
9870f3f
f0d233a
710c2c2
45e0fc9
9db5f29
5de9b21
4464390
5614e5d
285dada
f17e9a8
ac12c82
34b82a7
4e12ea1
b398627
68bc030
1c2308c
82c2f25
1204452
11afb3b
c084919
f96ebe3
a5f2b48
7286d43
a89f3e4
0467293
d38be72
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# ============================================================================= | ||
# Sundials | ||
# ============================================================================= | ||
|
||
include(ExternalProject) | ||
set(SUNDIALS_PREFIX "${THIRD_PARTY_DIRECTORY}/sundials") | ||
set(SUNDIALS_INCLUDE_DIR "${SUNDIALS_PREFIX}/include") | ||
set(SUNDIALS_LIB_DIR "${SUNDIALS_PREFIX}/lib") | ||
make_directory(${SUNDIALS_INCLUDE_DIR}) | ||
|
||
set(SUNDIALS_C_FLAGS ${CMAKE_C_FLAGS}) | ||
list(REMOVE_ITEM SUNDIALS_C_FLAGS "-tp=haswell") | ||
set(SUNDIALS_CXX_FLAGS ${CMAKE_CXX_FLAGS}) | ||
list(REMOVE_ITEM SUNDIALS_CXX_FLAGS "-tp=haswell") | ||
include(ExternalProject) | ||
ExternalProject_Add( | ||
sundials-external | ||
PREFIX "${SUNDIALS_PREFIX}" | ||
# cmake-format: off | ||
# GIT_REPOSITORY https://github.com/LLNL/sundials.git | ||
# Forked to following, to allow RPowerR to use hoc_pow | ||
GIT_REPOSITORY https://github.com/neuronsimulator/sundials.git | ||
# GIT_TAG e2f29c34f324829302037a1492db480be8828084 6.2.0 -> CVodeMem no longer "visible" GIT_TAG | ||
# c09e732080a214694b209032ec627c93fed45340 4 | ||
#GIT_TAG 811234254d37652954daff0ccdb7af9813736846 # 3.2.1 | ||
GIT_TAG 71b3daec18ce66a7c011be9501a31567aa5c09b6 # 3.2.1 hines/hoc_pow | ||
# GIT_TAG 7ed895fd102226dbc52225e6b2c6e26ef1cafa0e #2.7.0 | ||
# cmake-format: on | ||
GIT_SHALLOW ON | ||
GIT_PROGRESS ON | ||
# UPDATE_COMMAND "" | ||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> | ||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} | ||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} | ||
-DCMAKE_C_FLAGS=${SUNDIALS_C_FLAGS} | ||
-DCMAKE_CXX_FLAGS=${SUNDIALS_CXX_FLAGS} | ||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} | ||
-DEXAMPLES_INSTALL=OFF | ||
-DBUILD_ARKODE=OFF | ||
-DBUILD_CVODES=OFF | ||
-DBUILD_IDAS=OFF | ||
-DBUILD_KINSOL=OFF | ||
-DEXAMPLES_ENABLE_C=OFF | ||
-DMPI_ENABLE=OFF | ||
-DPTHREAD_ENABLE=ON | ||
-DSUNDIALS_PRECISION=double | ||
-DUSE_GENERIC_MATH=ON | ||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON | ||
-DBUILD_SHARED_LIBS=OFF | ||
-DMPI_C_COMPILER=${MPI_C_COMPILER} | ||
-DCMAKE_INSTALL_LIBDIR=${SUNDIALS_LIB_DIR} | ||
BUILD_BYPRODUCTS | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI: this is needed for Ninja |
||
<INSTALL_DIR>/lib/libsundials_ida.a <INSTALL_DIR>/lib/libsundials_cvode.a | ||
<INSTALL_DIR>/lib/libsundials_nvecserial.a <INSTALL_DIR>/lib/libsundials_nvecpthreads.a | ||
<INSTALL_DIR>/lib/libsundials_nvecparallel.a) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My experience with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm all in for ExternalProject_Add 🚀 given that we can do custom build/configure commands, it will be definitely useful for upgrading to newer sundials. |
||
|
||
add_library(SUNDIALS INTERFACE IMPORTED) | ||
add_dependencies(SUNDIALS sundials-external) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nrnhines : is this LLNL/sundials@main...neuronsimulator:sundials:hines/hoc_pow only change that we need to have? Indeed it's look very trivial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is correct for Sundials version 3. We'll eventually see if changes need to be more substantial for later versions. There is some question about where to put the 10 nrn/src/nrniv/nvector_* files. They distinguish between (serial, thread, mpi) and (double, longdouble) and I don't think the changes are relevant to sundials as they have details that depend on how NEURON uses threads and mpi and NRN_ENABLE_MPI_DYNAMIC. At the moment, when
NRN_ENABLE_MPI_DYNAMIC=ON, then
nm libnrniv.so | grep MPI
shows nothing that points into libmpi. Instead, many things point into mpi specific interface libraries such as libnrnmpi_mpich.so and libnrnmpi_ompi.so . I think the worst case, ultimately, is that sundials gets built for each ```-DNRN_MPI_DYNAMIC="mpi;versions" and then all of sundials gets linked into each of the various libnrnmpi_.so