SheffieldML / GPc

Gaussian process code in C++ including some implementations of GP-LVM and IVM.
MIT License
67 stars 28 forks source link

most functions in lapack.h is empty #9

Open Yvonne-Ng opened 4 years ago

Yvonne-Ng commented 4 years ago

Hi, I wonder if I am missing something but it seems like all the functions in lapack is empty and CMatrix relies on these functions to work. Are these functions expected to be used? Thanks

lawrennd commented 4 years ago

These functions are just header files for libraries that are normally in fortran, C++ needs an understanding of how to call them and (if memory serves me right!) that's what lapack.h does.

Yvonne-Ng commented 4 years ago

Hi Thanks for the answer! will you have any pointers on where I can find those fortran functions? I am trying to reuse the package but need to compile it in Cmake for it to work with my file. All of those functions are registered as not defined :/

lawrennd commented 4 years ago

I haven’t compiled in a while! So I’m scraping my memory for some of this stuff. Apologies if any of it is inaccurate.

But some separate instructions are available here on the readme (https://github.com/SheffieldML/GPc) but they’re likely out of date for many systems.

You need a fortran compiler, e.g. g77 or on OSX I think it’s best to use use gfortran.

For some clues as to where these files should be, check some of the make includes, for example:

https://github.com/SheffieldML/GPc/blob/master/make.atlas

Is looking for an installation of the LAPACK files in /usr/local/atlas/lib

Which I presume is where ATLAS puts it if you install it (http://math-atlas.sourceforge.net/atlas_install/)

However, nowadays, many different softwares will install lapack for you (e.g. R, Matlab, Octave, Anaconda). And it might be that linking to their files gives you something that’s optimised for your system.