Skip to content

Commit

Permalink
No need link libsundials_nvecparallel.a
Browse files Browse the repository at this point in the history
  • Loading branch information
nrnhines committed May 17, 2023
1 parent 7176f4a commit 824732b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
7 changes: 4 additions & 3 deletions src/nrniv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,13 @@ endif()
find_package(SUNDIALS)
add_dependencies(nrniv_lib SUNDIALS)

# Note that none of the following libsundials...a depend on MPI.
# In particular we supply an alternative MPI_DYNAMIC capable version
# of nvector_parallel.c so libsundials_nvecparallel.a is not needed.
target_link_libraries(
nrniv_lib ${SUNDIALS_LIB_DIR}/libsundials_ida.a ${SUNDIALS_LIB_DIR}/libsundials_cvode.a
${SUNDIALS_LIB_DIR}/libsundials_nvecserial.a ${SUNDIALS_LIB_DIR}/libsundials_nvecpthreads.a)
if(NRN_ENABLE_MPI)
target_link_libraries(nrniv_lib ${SUNDIALS_LIB_DIR}/libsundials_nvecparallel.a)
endif()

set_property(TARGET nrniv_lib PROPERTY OUTPUT_NAME nrniv)

# =============================================================================
Expand Down
5 changes: 0 additions & 5 deletions src/nrnmpi/nrnmpi_dynam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ extern "C" {

extern "C" {
void* nrnmpi_p_comm; // set to address of MPI_Comm nrnmpi_comm
// Only works if caller is compiled with same MPI version that is
// dynamically loaded.
// Sundials N_VNew_Parallel needs nrnmpi_comm as first arg.
// The caller (nrnwrap_N_VNew_Parallel) will cast nrnmpi_p_comm to MPI_Comm*
}

#include "nrnmpi_dynam_wrappers.inc" /* autogenerated file */
#include "nrnmpi_dynam_stubs.cpp"
Expand Down

0 comments on commit 824732b

Please sign in to comment.