473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Q: lapackpp v2.2.0 lib usuage

H W
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
Jul 23 '05 #1
5 2848
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
Jul 23 '05 #2
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

Jul 23 '05 #3
H W
"Paul Schneider" <pa*******@uboot.com> wrote in message
news:d3**********@trane.wu-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
Jul 23 '05 #4
H W
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" <h_******************@yahoo.com> wrote in message
news:d4**********@pump1.york.ac.uk...
"Paul Schneider" <pa*******@uboot.com> wrote in message
news:d3**********@trane.wu-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

Jul 23 '05 #5
lqkhai
1
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" <h_wang_dcsNOSUCHWORD@yahoo.com> wrote in message
news:d4140k$lbp$1@pump1.york.ac.uk...[color=blue]
> "Paul Schneider" <paulibaer@uboot.com> wrote in message
> news:d3vt3t$b75$1@trane.wu-wien.ac.at...[color=green]
> > H W wrote:[color=darkred]
> > > Dear Everyone,
> > >
> > > I was trying to use Lapack++ v2.2.0 on my Linux (slackware 10) , the[/color][/color]
> command[color=green][color=darkred]
> > > is like this:
> > >
> > > gcc -o test Mat.o
> > >[/color][/color]
>[/color]
test.o -L/local/d0p1/hw/lapackpp-2.2.0/lib -L/local/d0p1/hw/LAPACK -llapackp[color=blue][color=green][color=darkred]
> > > p -llapack_LINUX -lblas_LINUX -lm
> > >
> > > but got the following error message:
> > >
> > > /local/d0p1/hw/LAPACK/liblapack_LINUX.a(ilaenv.o)(.text+0x4c): In[/color][/color]
> function[color=green][color=darkred]
> > > `ilaenv_': undefined reference to `s_copy'
> > > /local/d0p1/hw/LAPACK/liblapack_LINUX.a(ilaenv.o)(.text+0xe2): In[/color][/color]
> function[color=green][color=darkred]
> > > `ilaenv_': undefined reference to `s_copy'
> > > ...
> > > /local/d0p1/hw/LAPACK/liblapack_LINUX.a(dormbr.o)(.text+0xb5): In[/color][/color]
> function[color=green][color=darkred]
> > > `dormbr_': undefined reference to `s_cat'
> > > ...
> > > /local/d0p1/hw/LAPACK/liblapack_LINUX.a(dormlq.o)(.text+0x569): In[/color][/color]
> function[color=green][color=darkred]
> > > `dormlq_': undefined reference to `s_cat'
> > > ...
> > > ...
> > > /local/d0p1/hw/lapackpp-2.2.0/lib/liblapackpp.so: undefined reference[/color][/color][/color]
to[color=blue][color=green][color=darkred]
> > > `d_sign'
> > > collect2: ld returned 1 exit status
> > > make: *** [test] Error 1.
> > >
> > > Does anyone have any idea why this happened? The blas and lapack[/color][/color][/color]
library[color=blue][color=green][color=darkred]
> > > files are under directory /local/d0p1/hw/LAPACK, named libblas_LINUX.a[/color][/color]
> and[color=green][color=darkred]
> > > 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[/color][/color]
> compiling[color=green][color=darkred]
> > > the packages was g77. The 'make check' reports 'all passed'.
> > >
> > > The code actually only has a variable declaration in it (of cause[/color][/color][/color]
other[color=blue][color=green][color=darkred]
> > > lines, and had my own matrix class in it, but they were running[/color][/color]
> correctly[color=green][color=darkred]
> > > before and didn't use any of the lapack stuff):
> > > #include "gmd.h"
> > >[/color]
> > Try giving the linker the following flag
> >
> > -lg2c
> >
> >
> > p[/color]
>
> Thank you for you reply. Used the flag, and got the following error[/color]
message:[color=blue]
>
> ./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
>
>[/color]

LD_LIBRARY_PATH=/local/d0p1/hw/lapackpp-2.2.0/lib:/local/d0p1/hw/LAPACK

Dear,
No have lib folder in lapackpp-2.2.0 folder.
Please check it again.
Anyway, I have installed lappackpp successful in my debian linux. After I compiled my lapackpp c++ file, I executed the out file. The system told that
Segmentation fault

#include "iostream"
#include "fstream"
#include "lapackpp.h"

#define N 3

using namespace std;

void out1DArray(LaVectorDouble a,double n);
void input2DArray(LaGenMatDouble &a,double n);
void input1DArray(LaVectorDouble &a,double n);
void createMatrixA(LaSymmMatDouble &a);
void createMatrixA(LaGenMatDouble &a);

int main()
{
//LaSymmMatDouble A(N,N);
LaGenMatDouble A(N,N);
LaVectorDouble vreal(N);
LaVectorDouble vimag(N);
//LaVectorComplex v(N);
LaGenMatDouble V(N,N);

//input2DArray(A,N);

createMatrixA(A);
cout << A << endl;

LaEigSolve(A,vreal,vimag,V);
cout << "chua co loi" << endl;
cout << "The eigenvalues" << endl;
//out1DArray(v,3);
cout << vreal << endl;
cout << endl;
cout << vimag << endl;
cout << "The corresponding eigenvectors" << endl;
cout << V << endl;
ofstream EigV("EigVector.txt");
EigV << V << endl;
return 0;
}

void createMatrixA(LaSymmMatDouble &a)
{
int i,j;
a(0,0)=1.0;
for(i=1;i<N;i++)
{
for(j=1;j<N;j++)
{
if(j!=i) a(i,j+2)=0.0;
if(j==i)
{
a(i,j)=1.0;
a(i,j+1)=2.0;
a(i,j+2)=1.0;
}
}
}
}

void createMatrixA(LaGenMatDouble &a)
{
int i,j;
a(0,0)=1.0;
for(i=0;i<N;i++)
for(j=0;j<N;j++)
{
if(j!=i) a(i,j+2)=0.0;
if(j==i)
{
a(i,j)=1.0;
a(i,j+1)=2.0;
a(i,j+2)=1.0;
}
}
}

void input2DArray(LaGenMatDouble &a,double n)
{
int i,j;
for(i=0;i<n;i++)
for(j=0;j<n;j++)
{
cout << "Input a[" << i << "][" << j << "]= ";
cin >> a(i,j);
}
}


void input1DArray(LaVectorDouble &a,double n)
{
int i,j;
for(i=0;i<n;i++)
{
cout << "Input B[" << i << "]= ";
cin >> a(i);
cout << endl;
}
}

void out1DArray(LaVectorDouble a,double n)
{
int i;
for(i=0;i<n;i++)
cout << a(i) << " " << endl;
}
Please help me.

Thank in advance

lqkhai
Jul 28 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: A.A. Fussy | last post by:
How would I display the current system resources leveland amount of physical nmemory available towindows on a VB.NET form?
2
by: WhiskRomeo | last post by:
I am running Windows 2003 Server and IIS 6. ADO.exe is using 99% of the of the CPU cycles. Does anyone know what is going on here?
8
by: lurker | last post by:
If a compiled exe project is under 400kb, why does it take up 15Mb when running? Is this normal? If not, how do I restrict the amount of memory it can consume? Secondly, does anyone have a bit...
3
by: Bhargavan | last post by:
Hey Group, I just found that the memory usuage for my .NET windows application drops significantly whenever I minimize my application. Also I noticed when I maximize the application again, the...
1
by: Cy Huckaba | last post by:
We are running our company website on a win2k server running .NET framework 1.0 and IIS 5. The pages consist of mostly static content built from a combination of custom controls (dll is only 148k...
2
by: Srini | last post by:
Hi everybody , A Couple of weeks back I had asked some practicle scenarios for using the sigleton pattern. Most people use the singleton pattern for storing configuration related data . Would...
12
by: bufu18 | last post by:
hi all, I've downloaded (unpack etc) lapckpp library from http://sourceforge.net/projects/lapackpp/ I want to use it but I have problems with including it. I have included main file ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.