Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Q: lapackpp v2.2.0 lib usuage

Reply
Thread Tools

Q: lapackpp v2.2.0 lib usuage

 
 
H W
Guest
Posts: n/a
 
      04-17-2005
Dear Everyone,

I was trying to use Lapack++ v2.2.0 on my Linux (slackware 10) , the command
is like this:

gcc -o test Mat.o
test.o -L/local/d0p1/hw/lapackpp-2.2.0/lib -L/local/d0p1/hw/LAPACK -llapackp
p -llapack_LINUX -lblas_LINUX -lm

but got the following error message:

/local/d0p1/hw/LAPACK/liblapack_LINUX.a(ilaenv.o)(.text+0x4c): In function
`ilaenv_': undefined reference to `s_copy'
/local/d0p1/hw/LAPACK/liblapack_LINUX.a(ilaenv.o)(.text+0xe2): In function
`ilaenv_': undefined reference to `s_copy'
....
/local/d0p1/hw/LAPACK/liblapack_LINUX.a(dormbr.o)(.text+0xb5): In function
`dormbr_': undefined reference to `s_cat'
....
/local/d0p1/hw/LAPACK/liblapack_LINUX.a(dormlq.o)(.text+0x569): In function
`dormlq_': undefined reference to `s_cat'
....
....
/local/d0p1/hw/lapackpp-2.2.0/lib/liblapackpp.so: undefined reference to
`d_sign'
collect2: ld returned 1 exit status
make: *** [test] Error 1.

Does anyone have any idea why this happened? The blas and lapack library
files are under directory /local/d0p1/hw/LAPACK, named libblas_LINUX.a and
liblapack_LINUX.a, respectively. Lapackpp 2.2.0 is installed under
/local/d0p1/hw/lapackpp-2.2.0, and so the lib files are under
/local/d0p1/hw/lapackpp-2.2.0/lib. The fortran compiler used for compiling
the packages was g77. The 'make check' reports 'all passed'.

The code actually only has a variable declaration in it (of cause other
lines, and had my own matrix class in it, but they were running correctly
before and didn't use any of the lapack stuff):
#include "gmd.h"

....
LaMatGenDouble myMatrix(3,4);
....

And the error messages were the same even without this declaration.

Any advice is appreciated. Thank you very much,

Hongfang


 
Reply With Quote
 
 
 
 
Paul Schneider
Guest
Posts: n/a
 
      04-18-2005
H W wrote:
> Dear Everyone,
>
> I was trying to use Lapack++ v2.2.0 on my Linux (slackware 10) , the command
> is like this:
>
> gcc -o test Mat.o
> test.o -L/local/d0p1/hw/lapackpp-2.2.0/lib -L/local/d0p1/hw/LAPACK -llapackp
> p -llapack_LINUX -lblas_LINUX -lm
>
> but got the following error message:
>
> /local/d0p1/hw/LAPACK/liblapack_LINUX.a(ilaenv.o)(.text+0x4c): In function
> `ilaenv_': undefined reference to `s_copy'
> /local/d0p1/hw/LAPACK/liblapack_LINUX.a(ilaenv.o)(.text+0xe2): In function
> `ilaenv_': undefined reference to `s_copy'
> ...
> /local/d0p1/hw/LAPACK/liblapack_LINUX.a(dormbr.o)(.text+0xb5): In function
> `dormbr_': undefined reference to `s_cat'
> ...
> /local/d0p1/hw/LAPACK/liblapack_LINUX.a(dormlq.o)(.text+0x569): In function
> `dormlq_': undefined reference to `s_cat'
> ...
> ...
> /local/d0p1/hw/lapackpp-2.2.0/lib/liblapackpp.so: undefined reference to
> `d_sign'
> collect2: ld returned 1 exit status
> make: *** [test] Error 1.
>
> Does anyone have any idea why this happened? The blas and lapack library
> files are under directory /local/d0p1/hw/LAPACK, named libblas_LINUX.a and
> liblapack_LINUX.a, respectively. Lapackpp 2.2.0 is installed under
> /local/d0p1/hw/lapackpp-2.2.0, and so the lib files are under
> /local/d0p1/hw/lapackpp-2.2.0/lib. The fortran compiler used for compiling
> the packages was g77. The 'make check' reports 'all passed'.
>
> The code actually only has a variable declaration in it (of cause other
> lines, and had my own matrix class in it, but they were running correctly
> before and didn't use any of the lapack stuff):
> #include "gmd.h"
>
> ...
> LaMatGenDouble myMatrix(3,4);
> ...
>
> And the error messages were the same even without this declaration.
>
> Any advice is appreciated. Thank you very much,
>
> Hongfang
>
>

Try giving the linker the following flag

-lg2c


p
 
Reply With Quote
 
 
 
 
Lionel B
Guest
Posts: n/a
 
      04-18-2005
H W wrote:
> Dear Everyone,
>
> I was trying to use Lapack++ v2.2.0 on my Linux (slackware 10) , the
> command is like this:
>
> gcc -o test Mat.o
> test.o -L/local/d0p1/hw/lapackpp-2.2.0/lib -L/local/d0p1/hw/LAPACK
> -llapackpp -llapack_LINUX -lblas_LINUX -lm


Just a guess, but the Lapack++ home page gives a linking example as:

gcc -L/usr/local/lib -llapackpp -lblas -llapack foo.o

Note that -lblas comes /before/ -llapack. Maybe try changeing the link
order (and perhaps libm is not required...)

Regards,

--
Lionel B

 
Reply With Quote
 
H W
Guest
Posts: n/a
 
      04-18-2005
"Paul Schneider" <(E-Mail Removed)> wrote in message
news:d3vt3t$b75$(E-Mail Removed)-wien.ac.at...
> H W wrote:
> > Dear Everyone,
> >
> > I was trying to use Lapack++ v2.2.0 on my Linux (slackware 10) , the

command
> > is like this:
> >
> > gcc -o test Mat.o
> >

test.o -L/local/d0p1/hw/lapackpp-2.2.0/lib -L/local/d0p1/hw/LAPACK -llapackp
> > p -llapack_LINUX -lblas_LINUX -lm
> >
> > but got the following error message:
> >
> > /local/d0p1/hw/LAPACK/liblapack_LINUX.a(ilaenv.o)(.text+0x4c): In

function
> > `ilaenv_': undefined reference to `s_copy'
> > /local/d0p1/hw/LAPACK/liblapack_LINUX.a(ilaenv.o)(.text+0xe2): In

function
> > `ilaenv_': undefined reference to `s_copy'
> > ...
> > /local/d0p1/hw/LAPACK/liblapack_LINUX.a(dormbr.o)(.text+0xb5): In

function
> > `dormbr_': undefined reference to `s_cat'
> > ...
> > /local/d0p1/hw/LAPACK/liblapack_LINUX.a(dormlq.o)(.text+0x569): In

function
> > `dormlq_': undefined reference to `s_cat'
> > ...
> > ...
> > /local/d0p1/hw/lapackpp-2.2.0/lib/liblapackpp.so: undefined reference to
> > `d_sign'
> > collect2: ld returned 1 exit status
> > make: *** [test] Error 1.
> >
> > Does anyone have any idea why this happened? The blas and lapack library
> > files are under directory /local/d0p1/hw/LAPACK, named libblas_LINUX.a

and
> > liblapack_LINUX.a, respectively. Lapackpp 2.2.0 is installed under
> > /local/d0p1/hw/lapackpp-2.2.0, and so the lib files are under
> > /local/d0p1/hw/lapackpp-2.2.0/lib. The fortran compiler used for

compiling
> > the packages was g77. The 'make check' reports 'all passed'.
> >
> > The code actually only has a variable declaration in it (of cause other
> > lines, and had my own matrix class in it, but they were running

correctly
> > before and didn't use any of the lapack stuff):
> > #include "gmd.h"
> >

> Try giving the linker the following flag
>
> -lg2c
>
>
> p


Thank you for you reply. Used the flag, and got the following error message:

../test error while loading shared libraries: liblapackpp.so.1: cannot open
shared object file: no such file or directory.

Could you please give me some hint of this?

Thanks a lot,

Hongfang


 
Reply With Quote
 
H W
Guest
Posts: n/a
 
      04-18-2005
Solved!

first, add -lg2c when linking
second, set environment variable:
export
LD_LIBRARY_PATH=/local/d0p1/hw/lapackpp-2.2.0/lib:/local/d0p1/hw/LAPACK

cheers.

Hongfang

"H W" <(E-Mail Removed)> wrote in message
news:d4140k$lbp$(E-Mail Removed)...
> "Paul Schneider" <(E-Mail Removed)> wrote in message
> news:d3vt3t$b75$(E-Mail Removed)-wien.ac.at...
> > H W wrote:
> > > Dear Everyone,
> > >
> > > I was trying to use Lapack++ v2.2.0 on my Linux (slackware 10) , the

> command
> > > is like this:
> > >
> > > gcc -o test Mat.o
> > >

>

test.o -L/local/d0p1/hw/lapackpp-2.2.0/lib -L/local/d0p1/hw/LAPACK -llapackp
> > > p -llapack_LINUX -lblas_LINUX -lm
> > >
> > > but got the following error message:
> > >
> > > /local/d0p1/hw/LAPACK/liblapack_LINUX.a(ilaenv.o)(.text+0x4c): In

> function
> > > `ilaenv_': undefined reference to `s_copy'
> > > /local/d0p1/hw/LAPACK/liblapack_LINUX.a(ilaenv.o)(.text+0xe2): In

> function
> > > `ilaenv_': undefined reference to `s_copy'
> > > ...
> > > /local/d0p1/hw/LAPACK/liblapack_LINUX.a(dormbr.o)(.text+0xb5): In

> function
> > > `dormbr_': undefined reference to `s_cat'
> > > ...
> > > /local/d0p1/hw/LAPACK/liblapack_LINUX.a(dormlq.o)(.text+0x569): In

> function
> > > `dormlq_': undefined reference to `s_cat'
> > > ...
> > > ...
> > > /local/d0p1/hw/lapackpp-2.2.0/lib/liblapackpp.so: undefined reference

to
> > > `d_sign'
> > > collect2: ld returned 1 exit status
> > > make: *** [test] Error 1.
> > >
> > > Does anyone have any idea why this happened? The blas and lapack

library
> > > files are under directory /local/d0p1/hw/LAPACK, named libblas_LINUX.a

> and
> > > liblapack_LINUX.a, respectively. Lapackpp 2.2.0 is installed under
> > > /local/d0p1/hw/lapackpp-2.2.0, and so the lib files are under
> > > /local/d0p1/hw/lapackpp-2.2.0/lib. The fortran compiler used for

> compiling
> > > the packages was g77. The 'make check' reports 'all passed'.
> > >
> > > The code actually only has a variable declaration in it (of cause

other
> > > lines, and had my own matrix class in it, but they were running

> correctly
> > > before and didn't use any of the lapack stuff):
> > > #include "gmd.h"
> > >

> > Try giving the linker the following flag
> >
> > -lg2c
> >
> >
> > p

>
> Thank you for you reply. Used the flag, and got the following error

message:
>
> ./test error while loading shared libraries: liblapackpp.so.1: cannot open
> shared object file: no such file or directory.
>
> Could you please give me some hint of this?
>
> Thanks a lot,
>
> Hongfang
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with inluding lapackpp bufu18@wp.pl C++ 12 03-02-2007 06:08 PM
what's this usuage? asdf C++ 2 08-26-2006 05:53 PM
Re:Q:lapackpp v2.2.0 lib usuage H W C++ 0 04-18-2005 03:45 PM
Singleton Usuage Srini ASP .Net 2 10-24-2003 12:53 AM
AspNet Process Memory Issue on Win2k Server - Peformance is fine - Memory usuage doesn't stop growing Cy Huckaba ASP .Net 1 06-26-2003 04:00 AM



Advertisments