Skip to content

Commit

Permalink
Coreneuron dynamic MPI integration
Browse files Browse the repository at this point in the history
Update coreneuron to BlueBrain/CoreNeuron#634
  • Loading branch information
pramodk committed Oct 13, 2021
1 parent d95474e commit fec3a76
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 36 deletions.
73 changes: 38 additions & 35 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,41 @@ else()
set(USE_PTHREAD 0)
endif()

# =============================================================================
# Profiler/Instrumentation Options
# =============================================================================
if(NRN_ENABLE_PROFILING)
add_definitions("-DNRN_PROFILING")
if(NRN_PROFILER STREQUAL "caliper")
find_package(caliper REQUIRED)
include_directories(${caliper_INCLUDE_DIR})
add_definitions("-DNRN_CALIPER")
set(CALIPER_LIB "caliper")
elseif(NRN_PROFILER STREQUAL "likwid")
find_package(likwid REQUIRED)
include_directories(${likwid_INCLUDE_DIRS})
add_definitions("-DLIKWID_PERFMON")
endif()
endif()

# =============================================================================
# Set library type
# =============================================================================
if(NRN_ENABLE_SHARED)
set(NRN_LIBRARY_TYPE "SHARED")
else()
set(NRN_LIBRARY_TYPE "STATIC")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()

# =============================================================================
# Add helpder CMake modules AFTER setting options
# =============================================================================
include(NeuronFileLists)
include(MPIDynamicHelper)
include(ConfigFileSetting)
include(PythonDynamicHelper)

# =============================================================================
# Enable CoreNEURON support
# =============================================================================
Expand All @@ -429,6 +464,9 @@ if(NRN_ENABLE_CORENEURON)
if(NOT DEFINED CORENRN_ENABLE_MPI)
set(CORENRN_ENABLE_MPI ${NRN_ENABLE_MPI} CACHE BOOL "" FORCE)
endif()
if(NOT DEFINED CORENRN_ENABLE_MPI_DYNAMIC)
set(CORENRN_ENABLE_MPI_DYNAMIC ${NRN_ENABLE_MPI_DYNAMIC} CACHE BOOL "" FORCE)
endif()
add_external_project(coreneuron)
set(CORENEURON_DIR ${PROJECT_SOURCE_DIR}/external/coreneuron)
# By default `nrnivmodl` should look for `nrnivmodl-core` in the NEURON install prefix.
Expand All @@ -440,41 +478,6 @@ if(NRN_ENABLE_CORENEURON)
endif()
endif()

# =============================================================================
# Profiler/Instrumentation Options
# =============================================================================
if(NRN_ENABLE_PROFILING)
add_definitions("-DNRN_PROFILING")
if(NRN_PROFILER STREQUAL "caliper")
find_package(caliper REQUIRED)
include_directories(${caliper_INCLUDE_DIR})
add_definitions("-DNRN_CALIPER")
set(CALIPER_LIB "caliper")
elseif(NRN_PROFILER STREQUAL "likwid")
find_package(likwid REQUIRED)
include_directories(${likwid_INCLUDE_DIRS})
add_definitions("-DLIKWID_PERFMON")
endif()
endif()

# =============================================================================
# Set library type
# =============================================================================
if(NRN_ENABLE_SHARED)
set(NRN_LIBRARY_TYPE "SHARED")
else()
set(NRN_LIBRARY_TYPE "STATIC")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()

# =============================================================================
# Add helpder CMake modules AFTER setting options
# =============================================================================
include(NeuronFileLists)
include(MPIDynamicHelper)
include(ConfigFileSetting)
include(PythonDynamicHelper)

# =============================================================================
# Set install location for libraries (before src/nrniv)
# =============================================================================
Expand Down

0 comments on commit fec3a76

Please sign in to comment.