Skip to content

Commit

Permalink
refs #6: Fix a critical memory overlapping bug.
Browse files Browse the repository at this point in the history
 * Yes, now CUDA (>= 6.5) supports C++11 and we can get rid of the
   macro value mismatch!
  • Loading branch information
achimnol committed May 27, 2015
1 parent 1fad3ee commit 9e209ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ if v: CFLAGS += ' -DNBA_RANDOM_PORT_ACCESS'
# NVIDIA CUDA configurations
if USE_CUDA:
CUDA_ARCHS = compilelib.get_cuda_arch()
NVCFLAGS = '-O2 -g --use_fast_math -I/usr/local/cuda/include'
NVCFLAGS = '-O2 -g -std=c++11 --use_fast_math -I/usr/local/cuda/include'
CFLAGS += ' -I/usr/local/cuda/include'
LIBS += ' -L/usr/local/cuda/lib64 -lcudart' #' -lnvidia-ml'
print(CUDA_ARCHS)
if os.getenv('DEBUG', 0):
NVCFLAGS = '-O0 --device-debug -g -G --use_fast_math -I/usr/local/cuda/include --ptxas-options=-v'
NVCFLAGS = '-O0 --device-debug -g -G -std=c++11 --use_fast_math -I/usr/local/cuda/include --ptxas-options=-v'
if len(CUDA_ARCHS) == 0:
NVCFLAGS += ' -DMP_USE_64BIT=0' \
+ ' -gencode arch=compute_10,code=sm_10' \
Expand Down
8 changes: 7 additions & 1 deletion engines/cuda/compat.hh
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#ifndef __NBA_ENGINES_CUDA_COMPAT_HH__
#define __NBA_ENGINES_CUDA_COMPAT_HH__

#define NBA_MAX_COPROC_PPDEPTH (256u)
/*
* This header is included by .cu sources.
* We put only relevant data structures here for use in CUDA codes.
* Note that the nvcc should support C++11 (CUDA v6.5 or higher).
*/

#include "../../lib/config.hh"

struct datablock_kernel_arg {
uint32_t total_item_count_in;
Expand Down

0 comments on commit 9e209ab

Please sign in to comment.