Dear all,
I’m trying to compile the CUSPARSE example in the NVIDIA CUSPARSE library documentation and am running into a problem: none of the cusparse calls work. I then tried writing the most basic CUSPARSE I think of (called test_CUSPARSE_context.cu):
#include <stdio.h>
#include <cuda_runtime.h>
#include “cusparse.h”
int main() {
// Initializing the cusparse library
cusparseHandle_t handle = 0;
cusparseCreate( &handle );
}
I then compiled it using:
nvcc ./test_CUSPARSE_context.cu -o ./bin/test_CUSPARSE_context
And then I receive the following error:
/tmp/tmpxft_00000dee_00000000-13_test_CUSPARSE_context.o: In function main': tmpxft_00000dee_00000000-1_test_CUSPARSE_context.cudafe1.cpp:(.text+0x18): undefined reference to
cusparseCreate’
collect2: ld returned 1 exit status
I receive similar errors if I call other cusparse functions.
I have CUDA 3.2 RC installed. The compiler is able to interpret the cusparse data types (I don’t receive any errors associated with them). Does anyone have any advice on how to proceed?
Sincerely,
Fares