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

Commit b440d11

Browse files
oluptonpramodk
authored andcommitted
fixups for llvm
1 parent 318e25a commit b440d11

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

CMake/OpenAccHelper.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,17 @@ if(CORENRN_ENABLE_GPU)
7373
else()
7474
message(FATAL_ERROR "${CORENRN_ACCELERATOR_OFFLOAD} not supported with NVHPC compilers")
7575
endif()
76+
set(NVHPC_ACC_COMP_FLAGS)
77+
set(NVHPC_ACC_LINK_FLAGS)
7678
# avoid PGI adding standard compliant "-A" flags
77-
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION --c++14)
79+
# set(CMAKE_CXX14_STANDARD_COMPILE_OPTION --c++14)
7880
string(APPEND CMAKE_EXE_LINKER_FLAGS " ${NVHPC_ACC_COMP_FLAGS}")
7981
# Use `-Mautoinline` option to compile .cpp files generated from .mod files only. This is
8082
# especially needed when we compile with -O0 or -O1 optimisation level where we get link errors.
8183
# Use of `-Mautoinline` ensure that the necessary functions like `net_receive_kernel` are inlined
8284
# for OpenACC code generation.
8385
set(NVHPC_CXX_INLINE_FLAGS "-Mautoinline")
86+
set(NVHPC_CXX_INLINE_FLAGS)
8487
endif()
8588

8689
# =============================================================================

CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ if(CORENRN_ENABLE_GPU)
127127
# CUDA_RESOLVE_DEVICE_SYMBOLS OFF)
128128

129129
# Fail hard and early if we don't have the PGI/NVHPC compiler.
130-
if(NOT CORENRN_HAVE_NVHPC_COMPILER)
131-
message(
132-
FATAL_ERROR
133-
"GPU support is available via OpenACC using PGI/NVIDIA compilers."
134-
" Use NVIDIA HPC SDK with -DCMAKE_C_COMPILER=nvc -DCMAKE_CUDA_COMPILER=nvcc -DCMAKE_CXX_COMPILER=nvc++"
135-
)
136-
endif()
130+
# if(NOT CORENRN_HAVE_NVHPC_COMPILER)
131+
# message(
132+
# FATAL_ERROR
133+
# "GPU support is available via OpenACC using PGI/NVIDIA compilers."
134+
# " Use NVIDIA HPC SDK with -DCMAKE_C_COMPILER=nvc -DCMAKE_CUDA_COMPILER=nvcc -DCMAKE_CXX_COMPILER=nvc++"
135+
# )
136+
# endif()
137137

138138
# Set some sensible default CUDA architectures.
139139
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)

coreneuron/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ if(CORENRN_ENABLE_MPI AND NOT CORENRN_ENABLE_MPI_DYNAMIC)
198198
target_link_libraries(coreneuron ${MPI_CXX_LIBRARIES})
199199
endif()
200200

201+
target_link_libraries(coreneuron CUDA::cudart)
202+
201203
# this is where we handle dynamic mpi library build
202204
if(CORENRN_ENABLE_MPI AND CORENRN_ENABLE_MPI_DYNAMIC)
203205
# ~~~

coreneuron/permute/cellorder.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ static void triang_interleaved2(NrnThread* nt, int icore, int ncycle, int* strid
490490
bool has_subtrees_to_compute = true;
491491

492492
// clang-format off
493+
// OL211207: check if we need an OpenMP directive here.
493494
nrn_pragma_acc(loop seq)
494495
for (; has_subtrees_to_compute; ) { // ncycle loop
495496
#ifndef CORENEURON_ENABLE_GPU
@@ -538,6 +539,7 @@ static void bksub_interleaved2(NrnThread* nt,
538539
#ifndef CORENEURON_ENABLE_GPU
539540
for (int i = root; i < lastroot; i += 1) {
540541
#else
542+
// OL211207: check if we need an OpenMP directive here.
541543
nrn_pragma_acc(loop seq)
542544
for (int i = root; i < lastroot; i += warpsize) {
543545
#endif
@@ -661,7 +663,7 @@ void solve_interleaved1(int ith) {
661663
lastnode [0:ncell],
662664
cellsize [0:ncell]) if (nt->compute_gpu)
663665
async(nt->stream_id))
664-
nrn_pragma_omp(target teams distribute parallel for simd if(nt->compute_gpu))
666+
// nrn_pragma_omp(target teams distribute parallel for simd if(nt->compute_gpu))
665667
for (int icell = 0; icell < ncell; ++icell) {
666668
int icellsize = cellsize[icell];
667669
triang_interleaved(nt, icell, icellsize, nstride, stride, lastnode);

0 commit comments

Comments
 (0)