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

Commit 250d0b8

Browse files
committed
Update NMODL submodule and update comments
1 parent abe2e4a commit 250d0b8

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

CMake/OpenAccHelper.cmake

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,47 @@
55
# =============================================================================
66

77
if(CORENRN_ENABLE_GPU)
8-
8+
# openacc needs to build static library in order to have global/routines
9+
# working. See https://www.pgroup.com/userforum/viewtopic.php?t=5350
910
set(COMPILE_LIBRARY_TYPE "STATIC")
1011

12+
# cuda unified memory support
1113
if(CORENRN_ENABLE_CUDA_UNIFIED_MEMORY)
1214
add_definitions(-DUNIFIED_MEMORY)
1315
endif()
1416

17+
# if user don't specify host compiler, use gcc from $PATH
1518
if(NOT CUDA_HOST_COMPILER)
1619
find_program(GCC_BIN gcc)
1720
set(CUDA_HOST_COMPILER ${GCC_BIN} CACHE FILEPATH "" FORCE)
1821
endif()
1922

23+
# various flags for PGI compiler with GPU build
2024
if(${CMAKE_C_COMPILER_ID} STREQUAL "PGI")
25+
# workaround for old PGI version
2126
add_definitions(-DPG_ACC_BUGS)
2227
set(ACC_FLAGS "-acc")
28+
# disable very verbose diagnosis messages
2329
set(PGI_DIAG_FLAGS "--diag_suppress 177")
30+
# some of the mod files can have too many functions, increase inline level
2431
set(PGI_INLINE_FLAGS "-Minline=size:200,levels:10")
32+
# C/C++ compiler flags
2533
set(CMAKE_C_FLAGS "${ACC_FLAGS} ${CMAKE_C_FLAGS}")
2634
set(CMAKE_CXX_FLAGS "${ACC_FLAGS} ${CMAKE_CXX_FLAGS} ${PGI_DIAG_FLAGS}")
35+
# avoid PGI adding standard compliant "-A" flags
2736
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION --c++11)
2837
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION --c++14)
2938
else()
3039
message(WARNING "Non-PGI compiler : make sure to add required compiler flags to enable OpenACC")
3140
endif()
3241

42+
# find_cuda produce verbose messages : use new behavior to use _ROOT variables
3343
if(POLICY CMP0074)
3444
cmake_policy(SET CMP0074 NEW)
3545
endif()
3646
find_package(CUDA 5.0 REQUIRED)
3747
set(CUDA_SEPARABLE_COMPILATION ON)
3848
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
39-
4049
add_definitions(-DCUDA_PROFILING)
4150
else(CORENRN_ENABLE_GPU)
4251
# OpenACC pragmas are not guarded, disable all unknown pragm warnings

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ if(CORENRN_ENABLE_NMODL)
192192
set(CORENRN_NMODL_INCLUDE ${CMAKE_BINARY_DIR}/include)
193193
endif()
194194
include_directories(${CORENRN_NMODL_INCLUDE})
195+
# set correct arguments for nmodl for cpu/gpu target
195196
if(CORENRN_ENABLE_GPU)
196197
set(CORENRN_NMODL_FLAGS "acc --oacc" CACHE STRING "Extra NMODL options such as passes")
197198
else()

coreneuron/mpi/nrnmpi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,10 @@ int nrnmpi_local_rank() {
242242
}
243243

244244
/**
245-
* Return number of ranks launched on single shared memory node
245+
* Return number of ranks running on single shared memory node
246246
*
247247
* We use MPI 3 MPI_Comm_split_type function and MPI_COMM_TYPE_SHARED key to
248-
* determine number of mpi ranks within a shared memory node..
248+
* determine number of mpi ranks within a shared memory node.
249249
*/
250250
int nrnmpi_local_size() {
251251
int local_size = 1;

external/nmodl

Submodule nmodl updated 87 files

0 commit comments

Comments
 (0)