Clapack_dtrtri

Hello,

Please, i have used this function in my code :

int clapack_dtrtri(const enum ATLAS_ORDER Order,const enum ATLAS_UPLO Uplo, 
                   const enum ATLAS_DIAG Diag,const int N, double *A, const int lda); 
#include <stdio.h>
#include <stdlib.h>
#include "clapack.h"
#include "cblas.h"

int main(int argc, char **argv)
{

    double *a;
    double nsec,rap,ordre;
    int i,j,k,n,inc,dim,id;
    struct timespec start, end;
    int lda;
    double alpha=1.0;


    dim=atoi(argv[1]);
    //inc=atoi(argv[2]);
    lda=dim;

    a=(double *) malloc(dim*dim*sizeof(double));
    for(i=0;i<dim;i++)
         for(j=0;j<dim;j++)
          a[i*dim+j]= i*j;

    clapack_dtrtri(CblasRowMajor,CblasUpper,CblasNonUnit ,dim, a,lda);
    free(a);
    return(0);

}

but i have this error when i compile:

cc im.c -o im /usr/lib/liblapack_atlas.a /usr/lib/libcblas.a /usr/lib/libatlas.a
im.c:3:21: fatal error: clapack.h: No such file or directory
#include "clapack.h"
                     ^
compilation terminated.

Have you an idea please ?
Thanks a lot.
Best Regards.

Thanks a lot.
Best Regards.

It probably means what it says -- it couldn't find that file.

Do you have that file?

1 Like

i have done:

cp /usr/include/atlas/clapack.h /usr/include/

and it works fine :slight_smile:

Thanks a lot.
Bests.

You shouldn't have done that.

Just compile with -I/usr/include/atlas/

Or just change your file into #include <atlas/clapack.h>

1 Like