LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   lapack++ compile code (https://www.linuxquestions.org/questions/linux-software-2/lapack-compile-code-759891/)

vielmaj 10-05-2009 04:07 PM

lapack++ compile code
 
I installed lapack++ version 2.5.3 for matrix multiplication in C++. After I configure, then make, and then make install, it puts the c includes files in /usr/local/include/lapackpp/ which are given below

arch.h bmd.h gmf.h lapackc.h lautil.h spdmd.h ultgmd.h
bfd.h f2c.h gmi.h lapackd.h lavc.h spdtrmd.h utgmd.h
blas1.h fmd.h gmli.h lapack.h lavd.h sybfd.h uutgmd.h
blas1pp.h genmd.h lacomplex lapackpp.h laversion.h sybmd.h vc.h
blas2.h gfd.h lacomplex.h laprefs.h lavi.h syfd.h vd.h
blas2pp.h gfqrc.h lacvd.h larvd.h lavli.h symd.h vf.h
blas3.h gfqrd.h laexcp.h laslv.h ltgmd.h sytrmd.h vi.h
blas3pp.h gmc.h lafnames.h lasvd.h spdbmd.h trfd.h vli.h
blaspp.h gmd.h laindex.h latmpl.h spdfd.h trmd.h

and also the following files in /usr/local/lib

-rwxr-xr-x 1 root root 884 2009-10-05 10:34 liblapackpp.la
lrwxrwxrwx 1 root root 21 2009-10-05 10:34 liblapackpp.so -> liblapackpp.so.14.2.0
lrwxrwxrwx 1 root root 21 2009-10-05 10:34 liblapackpp.so.14 -> liblapackpp.so.14.2.0
-rwxr-xr-x 1 root root 2579202 2009-10-05 10:34 liblapackpp.so.14.2.0

Now I try to compile using, (g++-4.3 example.cpp), the very simple code of

#include "lapackpp/lapackpp.h"
int main() {

return 0;
}

and I get the following output.

In file included from /usr/local/include/lapackpp/lapackc.h:14,
from /usr/local/include/lapackpp/lapack.h:10,
from /usr/local/include/lapackpp/lapackpp.h:16,
from example.cpp:1:
/usr/local/include/lapackpp/lacomplex.h:45:23: error: laversion.h: No such file or directory
/usr/local/include/lapackpp/lacomplex.h:48:17: error: f2c.h: No such file or directory
In file included from /usr/local/include/lapackpp/lapackpp.h:47,
from example.cpp:1:
/usr/local/include/lapackpp/latmpl.h:36:22: error: lafnames.h: No such file or directory

I am not sure what I am doing wrong.

Jason

lutusp 10-06-2009 12:02 PM

Quote:

Originally Posted by vielmaj (Post 3708740)

[ snip ]
from example.cpp:1:
/usr/local/include/lapackpp/latmpl.h:36:22: error: lafnames.h: No such file or directory

I am not sure what I am doing wrong.

Jason

The installation failed to provide these headers in the right order and the right locations. Any chance you could get "lapack" ready-made for your platform? It happens to be readily available in precompiled form on many distributions:

Code:

# yum list | grep lapack
lapack.i586                          3.2.1-3.fc11                updates
lapack-devel.i586                    3.2.1-3.fc11                updates
scalapack.i586                        1.7.5-5.fc11                fedora
scalapack-devel.i586                  1.7.5-5.fc11                fedora


knudfl 10-06-2009 04:44 PM

May be
Code:

#include <lapackpp/lapackpp.h>
int main() {

return 0;
}

#include <lapackpp/lapackpp.h> .. means a system location.
#include "lapackpp/lapackpp.h" .. same directory as the code.

But definitely ...
g++ example.cpp -I /usr/local/include/lapackpp/
.. which will create ' a.out '.
.....

vielmaj 10-07-2009 10:10 PM

Other Lapack++ problem
 
I did get the code to compile when I ran the following program

//////////////////////////////////////////////////////////////
//g++-4.3 test.cpp -I /usr/local/include/lapackpp
#include <lapackpp/lapackpp.h>

int main() {

LaGenMatDouble A();
return 0;
}
//////////////////////////////////////////////////////////////

But when I run the following program,

//g++-4.3 test.cpp -I /usr/local/include/lapackpp
#include <lapackpp/lapackpp.h>

int main() {

LaGenMatDouble A(5,5);
return 0;
}

/////////////////////////////////////////////////////////////

I get the following error.

$ g++-4.3 test.cpp -I /usr/local/include/lapackpp /tmp/ccgUstyh.o: In function `main':
test.cpp:(.text+0x85): undefined reference to LaGenMatDouble::LaGenMatDouble(int, int)'
test.cpp:(.text+0x95): undefined reference to `LaGenMatDouble::~LaGenMatDouble()'
collect2: ld returned 1 exit status

Here is the web location of the class I am trying to use.
http://lapackpp.sourceforge.net/html...MatDouble.html

I guess I need a little more help.
Thanks,

Jason


All times are GMT -5. The time now is 01:54 AM.