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

Commit 83ad5ee

Browse files
authored
Cherry-pick for 8.2.1: Link to libdl.so to avoid linking issues with mpich on centos7 (#856) (#862)
* Link to libdl.so to avoid linking issues with mpich on centos7 (#856) The main coreneuron library needs to be linked to libdl.so only in case of dynamic mpi build. But on an old system like centos7, we saw mpich library requires explicit ink to `libdl.so`. See neuronsimulator/nrn-build-ci#51 * update PR template for 8.2 release
1 parent 5fe0f39 commit 83ad5ee

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ nrnivmodl mod
3939
These values for NEURON, nmodl and Spack are the defaults and are given
4040
for illustrative purposes; they can safely be removed.
4141
-->
42-
CI_BRANCHES:NEURON_BRANCH=master,NMODL_BRANCH=master,SPACK_BRANCH=develop
42+
CI_BRANCHES:NEURON_BRANCH=release/8.2,NMODL_TAG=0.4,SPACK_BRANCH=develop

coreneuron/CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,15 @@ if(CORENRN_ENABLE_MPI AND NOT CORENRN_ENABLE_MPI_DYNAMIC)
169169
target_link_libraries(coreneuron ${MPI_CXX_LIBRARIES})
170170
endif()
171171

172+
# ~~~
173+
# main coreneuron library needs to be linked to libdl.so only in case of dynamic mpi build. But on
174+
# old system like centos7, we saw mpich library require explici link to libdl.so. See
175+
# https://github.com/neuronsimulator/nrn-build-ci/pull/51
176+
# ~~~
177+
target_link_libraries(coreneuron ${CMAKE_DL_LIBS})
178+
172179
# this is where we handle dynamic mpi library build
173180
if(CORENRN_ENABLE_MPI AND CORENRN_ENABLE_MPI_DYNAMIC)
174-
# ~~~
175-
# main coreneuron library needs to be linked to libdl.so and
176-
# and should be aware of shared library suffix on different platforms.
177-
# ~~~
178-
target_link_libraries(coreneuron ${CMAKE_DL_LIBS})
179181

180182
# store mpi library targets that will be built
181183
list(APPEND corenrn_mpi_targets "")

0 commit comments

Comments
 (0)