NVIDIA/cnmem

make compilation gets errors

Opened this issue · 0 comments

I run make and get this config:

-- The C compiler identification is GNU 7.2.1       
-- The CXX compiler identification is GNU 7.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /media/ephemeral0/cnmem/build

Then make

/media/ephemeral0/cnmem/src/cnmem.cpp: In member function ‘cnmemStatus_t cnmem::Manager::allocateBlockUnsafe(cnmem::Block*&, cnmem::Block*&, std::size_t)’:
/media/ephemeral0/cnmem/src/cnmem.cpp:513:59: error: too few arguments to function ‘cudaError_t cudaMallocManaged(void**, size_t, unsigned int)’
             CNMEM_CHECK_CUDA(cudaMallocManaged(&data, size));
                                                           ^
/media/ephemeral0/cnmem/src/cnmem.cpp:133:30: note: in definition of macro ‘CNMEM_CHECK_CUDA’
     cudaError_t cudaError = (call); \
                              ^~~~
In file included from /media/ephemeral0/cnmem/include/cnmem.h:35:0,
                 from /media/ephemeral0/cnmem/src/cnmem.cpp:29:
/usr/local/cuda-7.5/include/cuda_runtime_api.h:2938:58: note: declared here
 extern __host__ __cudart_builtin__ cudaError_t CUDARTAPI cudaMallocManaged(void **devPtr, size_t size, unsigned int flags);
                                                          ^~~~~~~~~~~~~~~~~
/media/ephemeral0/cnmem/src/cnmem.cpp:514:30: error: ‘cudaMemPrefetchAsync’ was not declared in this scope
             CNMEM_CHECK_CUDA(cudaMemPrefetchAsync(data, size, mDevice));
                              ^
/media/ephemeral0/cnmem/src/cnmem.cpp:133:30: note: in definition of macro ‘CNMEM_CHECK_CUDA’
     cudaError_t cudaError = (call); \
                              ^~~~
/media/ephemeral0/cnmem/src/cnmem.cpp:514:30: note: suggested alternative: ‘cudaMemset3DAsync’
             CNMEM_CHECK_CUDA(cudaMemPrefetchAsync(data, size, mDevice));
                              ^
/media/ephemeral0/cnmem/src/cnmem.cpp:133:30: note: in definition of macro ‘CNMEM_CHECK_CUDA’
     cudaError_t cudaError = (call); \
                              ^~~~
make[2]: *** [CMakeFiles/cnmem.dir/src/cnmem.cpp.o] Error 1
make[1]: *** [CMakeFiles/cnmem.dir/all] Error 2
make: *** [all] Error 2