CULA SPARSE Linking error

Support for issues specific to the Linux operating systems.

CULA SPARSE Linking error

Postby vivekb05 » Tue Jun 03, 2014 2:31 am

Hi,

This is the line I am using for compiling
vivek@vivek-desktop:~/MTP$ gcc ex2.c -o output -I$CULASPARSE_INC_PATH -L$CULASPARSE_LIB_PATH_32 -L$CUBLAS_LIB_PATH -L$CUDART_LIB_PATH -L$CUSPARSE_LIB_PATH -lcula_sparse -lcublas -lcudart -lcusparse -liomp5 -lcolamd

and these are the errors that I get are:
/tmp/ccoh4SZk.o: In function `MeetsMinimumCulaRequirements':
ex2.c:(.text+0x7): undefined reference to `culaGetCudaMinimumVersion'
ex2.c:(.text+0xf): undefined reference to `culaGetCudaRuntimeVersion'
ex2.c:(.text+0x17): undefined reference to `culaGetCudaDriverVersion'
ex2.c:(.text+0x1f): undefined reference to `culaGetCublasMinimumVersion'
ex2.c:(.text+0x27): undefined reference to `culaGetCublasRuntimeVersion'
ex2.c:(.text+0x2f): undefined reference to `culaGetCusparseMinimumVersion'
ex2.c:(.text+0x37): undefined reference to `culaGetCusparseRuntimeVersion'
collect2: ld returned 1 exit status

The source code is:

Code: Select all
#include <stdio.h>
#include <cula_sparse.h>

int MeetsMinimumCulaRequirements()
{
int cudaMinimumVersion = culaGetCudaMinimumVersion();
int cudaRuntimeVersion = culaGetCudaRuntimeVersion();
int cudaDriverVersion = culaGetCudaDriverVersion();
int cublasMinimumVersion = culaGetCublasMinimumVersion();
int cublasRuntimeVersion = culaGetCublasRuntimeVersion();
int cusparseMinimumVersion = culaGetCusparseMinimumVersion();
int cusparseRuntimeVersion = culaGetCusparseRuntimeVersion();
if(cudaRuntimeVersion < cudaMinimumVersion)
{
printf("CUDA runtime version is insufficient; "
"version %d or greater is required\n", cudaMinimumVersion);
return 0;
}
if(cudaDriverVersion < cudaMinimumVersion)
{

printf("CUDA driver version is insufficient; "
"version %d or greater is required\n", cudaMinimumVersion);
return 0;
}
if(cublasRuntimeVersion < cublasMinimumVersion)
{
printf("CUBLAS runtime version is insufficient; "
"version %d or greater is required\n", cublasMinimumVersion);
return 0;
}
if(cusparseRuntimeVersion < cusparseMinimumVersion)
{
printf("CUSPARSE runtime version is insufficient; "
"version %d or greater is required\n", cusparseMinimumVersion);
return 0;
}
return 1;
}

int main()
{
   int a = MeetsMinimumCulaRequirements();
   return 0;
}


I followed the steps mentioned in http://www.culatools.com/cula_sparse_pr ... nvironment

Please tell me where I am going wrong here.

Kind Regards,
Vivek Bangera
vivekb05
 
Posts: 1
Joined: Thu May 29, 2014 2:57 am

Return to Linux Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron