Newbie - how to compile ?

Open forum for general discussions relating to PLASMA.

Newbie - how to compile ?

Postby TokyoJoe » Tue Oct 23, 2012 4:11 am

Dear all,
I have successfully installed plasma and now wish to start using it. The question
I have is how to compile a file that calls the plasma library? For reference I have
started with the example program example_dgesv_f.f , since it is the DGESV routine
I am ultimately planning to use.

(i) I am using gfortran, and built plasma against existing versions of lapack
/usr/lib/liblapack.so.3gf) , blas (/usr/lib/libblas.so.3gf) and cblas (/usr/lib/libcblas.so.3gf)

If I try the compilation:
gfortran -o trash.exe example_dgesv_f.f -L /data/work/fortran-2003-development/parallel/scalapack-test/parallel-develop/plasma/plasma-installer_2.4.6/build/plasma_2.4.6/lib -lplasma -lcoreblas /usr/lib/liblapack.so.3gf /usr/lib/libcblas.so.3gf /usr/lib/libblas.so.3gf

I get the error message (I show just the first few lines):
/data/work/fortran-2003-development/parallel/scalapack-test/parallel-develop/plasma/plasma-installer_2.4.6/build/plasma_2.4.6/lib/libplasma.a(dtile.o): In function `PLASMA_dLapack_to_Tile':
dtile.c:(.text+0x1d8): undefined reference to `QUARK_Waitall'
dtile.c:(.text+0x32e): undefined reference to `QUARK_Waitall'
/data/work/fortran-2003-development/parallel/scalapack-test/parallel-develop/plasma/plasma-installer_2.4.6/build/plasma_2.4.6/lib/libplasma.a(dtile.o): In function `PLASMA_dLapack_to_Tile_Async':
dtile.c:(.text+0x7a7): undefined reference to `QUARK_Waitall'
.
.
. <etc>

It seems that I am missing something in the compilation line? Or perhaps the order is incorrect?

(ii)The second question concerns the file plasmaf.h , which is 'included'
in this example file. I guess one must ensure that this file to be in the same directory as
example_dgesv_f.f in order to compile the code. Can / should this file be edited,
or is it enough to simply make sure it is always included in a working directory?

Many thanks,
Dan.
TokyoJoe
 
Posts: 1
Joined: Tue Oct 23, 2012 3:44 am

Re: Newbie - how to compile ?

Postby lizoni » Tue Feb 26, 2013 3:52 pm

Hello,

I think I have a similar problem, that's why I am posting in this topic.
I have installed PLASMA library and I am trying to compile the example_cgesv.c.
I have changed the header files inside the source code so as to include the paths
and when using gcc I supply the libraries.
But the result is the following:

/tmp/ccsiznnC.o: In function `main':
example_cgesv.c:(.text+0xde): undefined reference to `PLASMA_Init'
example_cgesv.c:(.text+0x10b): undefined reference to `LAPACKE_clarnv_work'
example_cgesv.c:(.text+0x197): undefined reference to `LAPACKE_clarnv_work'
example_cgesv.c:(.text+0x21f): undefined reference to `PLASMA_Alloc_Workspace_cgesv_incpiv'
example_cgesv.c:(.text+0x24d): undefined reference to `PLASMA_cgesv_incpiv'
example_cgesv.c:(.text+0x2f1): undefined reference to `PLASMA_Finalize'
/tmp/ccsiznnC.o: In function `check_solution':
example_cgesv.c:(.text+0x337): undefined reference to `LAPACKE_slamch_work'
example_cgesv.c:(.text+0x36d): undefined reference to `plasma_lapack_constants'
example_cgesv.c:(.text+0x398): undefined reference to `LAPACKE_clange_work'
example_cgesv.c:(.text+0x3aa): undefined reference to `plasma_lapack_constants'
example_cgesv.c:(.text+0x3d8): undefined reference to `LAPACKE_clange_work'
example_cgesv.c:(.text+0x3ea): undefined reference to `plasma_lapack_constants'
example_cgesv.c:(.text+0x415): undefined reference to `LAPACKE_clange_work'
example_cgesv.c:(.text+0x486): undefined reference to `cblas_cgemm'
example_cgesv.c:(.text+0x48d): undefined reference to `plasma_lapack_constants'
example_cgesv.c:(.text+0x4b8): undefined reference to `LAPACKE_clange_work'
collect2: error: ld returned 1 exit status

Could you please help me with this?
Thanks in advance.
lizoni
 
Posts: 3
Joined: Tue Feb 26, 2013 3:39 pm


Return to User discussion

Who is online

Users browsing this forum: Google [Bot], jianqayn and 1 guest

cron