Fixed some issues in build system detected using Clang. (#339)
parent
0829ac5a18
commit
ad3bf97304
|
@ -93,7 +93,8 @@ AS_IF([test "$ac_cv_header_cuda_runtime_h" = "yes"], [
|
||||||
[AC_MSG_ERROR([Library containing cudaMalloc symbol not found])])
|
[AC_MSG_ERROR([Library containing cudaMalloc symbol not found])])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
AM_CONDITIONAL([USE_CUDA], [test x$with_cuda = xyes])
|
AM_CONDITIONAL([HAVE_CUDA], [test x$with_cuda = xyes])
|
||||||
|
AM_COND_IF([HAVE_CUDA],[AC_DEFINE([HAVE_CUDA], [], [CUDA GPU API found])])
|
||||||
|
|
||||||
# Check for GPUDirect
|
# Check for GPUDirect
|
||||||
AC_ARG_WITH([gpuDirect],
|
AC_ARG_WITH([gpuDirect],
|
||||||
|
@ -116,7 +117,7 @@ AS_IF([test "$ac_cv_header_cufile_h" = "yes"], [
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
AM_CONDITIONAL([HAVE_GPU_DIRECT], [test x$with_gpuDirect = xyes])
|
AM_CONDITIONAL([HAVE_GPU_DIRECT], [test x$with_gpuDirect = xyes])
|
||||||
|
AM_COND_IF([HAVE_GPU_DIRECT],[AC_DEFINE([HAVE_GPU_DIRECT], [], [GPUDirect API found])])
|
||||||
|
|
||||||
|
|
||||||
# Check for system capabilities
|
# Check for system capabilities
|
||||||
|
|
|
@ -41,10 +41,14 @@ extraLDFLAGS += -L/opt/hadoop-2.2.0/lib/native
|
||||||
extraLDADD += -lhdfs
|
extraLDADD += -lhdfs
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if USE_CUDA
|
if HAVE_CUDA
|
||||||
extraLDADD += -lcudart
|
extraLDADD += -lcudart
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if HAVE_GPU_DIRECT
|
||||||
|
extraLDADD += -lcufile
|
||||||
|
endif
|
||||||
|
|
||||||
if USE_HDF5_AIORI
|
if USE_HDF5_AIORI
|
||||||
extraSOURCES += aiori-HDF5.c
|
extraSOURCES += aiori-HDF5.c
|
||||||
extraLDADD += -lhdf5 -lz
|
extraLDADD += -lhdf5 -lz
|
||||||
|
@ -164,5 +168,5 @@ libaiori_a_CPPFLAGS = $(extraCPPFLAGS)
|
||||||
.PHONY: build.conf
|
.PHONY: build.conf
|
||||||
all-local: build.conf
|
all-local: build.conf
|
||||||
build.conf:
|
build.conf:
|
||||||
@echo LDFLAGS=$(LDFLAGS) $(extraLDFLAGS) $(extraLDADD) > build.conf
|
@echo LDFLAGS=$(LDFLAGS) $(extraLDFLAGS) $(extraLDADD) $(LIBS) > build.conf
|
||||||
@echo CFLAGS=$(CFLAGS) $(extraCPPFLAGS) >> build.conf
|
@echo CFLAGS=$(CFLAGS) $(extraCPPFLAGS) >> build.conf
|
||||||
|
|
|
@ -86,7 +86,7 @@ void update_write_memory_pattern(uint64_t item, char * buf, size_t bytes, int bu
|
||||||
void generate_memory_pattern(char * buf, size_t bytes, int buff_offset, int rank){
|
void generate_memory_pattern(char * buf, size_t bytes, int buff_offset, int rank){
|
||||||
uint64_t * buffi = (uint64_t*) buf;
|
uint64_t * buffi = (uint64_t*) buf;
|
||||||
// first half of 64 bits use the rank
|
// first half of 64 bits use the rank
|
||||||
const uint64_t ranki = (uint64_t)(rank + 1) << 32 + buff_offset;
|
const uint64_t ranki = ((uint64_t)(rank + 1) << 32) + buff_offset;
|
||||||
const size_t size = bytes / 8;
|
const size_t size = bytes / 8;
|
||||||
// the first 8 bytes are set to item number
|
// the first 8 bytes are set to item number
|
||||||
for(size_t i=1; i < size; i++){
|
for(size_t i=1; i < size; i++){
|
||||||
|
@ -106,7 +106,7 @@ int verify_memory_pattern(int item, char * buffer, size_t bytes, int buff_offset
|
||||||
|
|
||||||
uint64_t * buffi = (uint64_t*) buffer;
|
uint64_t * buffi = (uint64_t*) buffer;
|
||||||
// first half of 64 bits use the rank, here need to apply rank shifting
|
// first half of 64 bits use the rank, here need to apply rank shifting
|
||||||
uint64_t rank_mod = (uint64_t)(pretendRank + 1) << 32 + buff_offset;
|
uint64_t rank_mod = ((uint64_t)(pretendRank + 1) << 32) + buff_offset;
|
||||||
// the first 8 bytes are set to item number
|
// the first 8 bytes are set to item number
|
||||||
for(size_t i=1; i < bytes/8; i++){
|
for(size_t i=1; i < bytes/8; i++){
|
||||||
uint64_t exp = (i + 1) + rank_mod;
|
uint64_t exp = (i + 1) + rank_mod;
|
||||||
|
|
Loading…
Reference in New Issue