cblacs routines

cblacs routines

Hi,

I try to create a grid with Cblacs subroutines. I found an example from the net. A part of it like this:

***********************************************************/
#include
#include
#include
#include
#include

/** Header files for Blacs and Pblas are not available from Intel Mkl */
void Cblacs_pinfo(int*, int*);
void Cblacs_get(int, int, int*);
void Cblacs_gridinit(int*, char*, int, int);
void Cblacs_gridinfo(int, int*, int*, int*, int*);
void Cblacs_barrier(int , char*);
void Cblacs_gridexit(int);

int main(int argc, char* argv[])
{
...

/* Start MPI */

MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);

Cblacs_pinfo(&rank,&nprocs);
if (rank==0 && nprocs<4)
{ printf("\\n Number of processors should be at least 4\\n");
return 0;
}
Cblacs_get(0,0,&ctxt);
Cblacs_gridinit(&ctxt,"Row-major",nprow,npcol);

Cblacs_gridinfo(ctxt,&nprow,&npcol,&myrow,&mycol);

Cblacs_gridexit(ctxt);
MPI_Finalize();

return 0;
}

I compiledthe codelike this:

mpiicc -o ben.exe ben_pblas.c -I/RS/progs/intel/mkl/10.1.1.019/include -L/RS/progs/intel/mkl/10.1.1.019/lib/em64t -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64 -lmkl_lapack -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_lapack -lmkl_core -liomp5 -lpthread

I have no error while compiling, it creates .exe file. but when I run the.exe file it gives the error:

error while loading shared libraries: libmkl_scalapack_lp64.so: cannot open shared object file: No such file or directory

I couldn't achieve to use mkl library. if you help me,I will be very happy

Regards

3 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Quoting oguren

error while loading shared libraries: libmkl_scalapack_lp64.so: cannot open shared object file: No

Apparently, you didn't set the LD_LIBRARY_PATH for your run time. This is among the tasks performed by sourcing the compiler environment script, if you are using the MKL distributed with the compiler.

Ummm, I am new at coding using the NETLIB packages (I am training myself as a part of my doctoral research), and that leads me to ask: Shouldn't you also need to invoque  

Cblacs_exit(int);
right before the code ends:

  (...)
  /*! Finalize BLACS: */
  Cblacs_gridexit(context);
  Cblacs_exit(EXIT_SUCCESS);
  return EXIT_SUCCESS;
}

I am also new to this forum, so please excuse any style-related flaws.

Thanks in advanced!

Eduardo J. Sanchez P.

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!