cusolverSP: missing cusolver.h ?

Hi,

I am trying to compile and run:
7.0.18-19128344//doc/html/cusolver/index.html#csrqrbatch-example1

but i can not find:

#include <cusolver.h>

I’ve created my own cusolver.h:
#include “cusolverSp.h”

but then compilation fails:

/apps/nvidia/7.0.18/bin/nvcc -w -ccbin gcc -m64 -gencode arch=compute_20,code=compute_20 -c docex1.c -I.

docex1.c: In function ‘main’:
docex1.c:49:5: error: variable-sized object may not be initialized
const int csrRowPtrA[m+1] = { 1, 2, 3, 4, 8};

My question is:
what should i put in cusolver.h ?
how to compile csrqrbatch-example1 ?

Thanks for your help, jg.

gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)

Sorry for the documentation error.

In that example, change:

#include <cusolver.h>

to:

#include <cusolverSp.h>

and be sure to add:

-lcusolver -lcusparse

when compiling/linking.

Hi,

Just a quick update. To be able to compile, i have to replace:
const int csrRowPtrA[m+1] = { 1, 2, 3, 4, 8};
const int csrColIndA[nnzA] = { 1, 2, 3, 1, 2, 3, 4};
const double csrValA[nnzA] = { 1.0, 2.0, 3.0, 0.1, 0.1, 0.1, 4.0};
const double b[m] = {1.0, 1.0, 1.0, 1.0};
with
int csrRowPtrA[m+1];
csrRowPtrA[0]=1;
csrRowPtrA[1]=2;
csrRowPtrA[2]=3;
csrRowPtrA[3]=4;
csrRowPtrA[4]=8;
etc…

Otherwise, i get this error message:

Error1: docex1.c:73:5: error: variable-sized object may not be initialized

Otherwise the code is running fine.

jg.