Makefile library issues: gsl and lapack

In summary, the conversation discusses the issue of running a code written in C++ that links to gsl and lapack. The code also uses a gsl minimizer and another gsl function. The individual is running the code on a school computer but also wants to run a smaller version on their home computer, which is running Debian Wheezy. They have downloaded gsl and lapack and are trying to compile the code, but are encountering issues with linking to the correct libraries. They are seeking advice and resources to help resolve the issue.
  • #1
DrewD
529
28
I don't have all of the info at my finger tips because I had to come to work and leave my comp at home, but here is my issue and I can post extra info if anyone has questions:

I am working with a professor who has me running his code (C++) that links to gsl and lapack. Specifically, the code itself has a file that is the interface between the fortran lapack and the C++ code he wrote. The code also uses the gsl minimizer and another gsl function that I don't recall right now.
I am running the big program on a school machine that I ssh into, but it is helpful to run a smaller version on my home computer. I just bought a new computer which is running Debian Wheezy (could this be part of the problem? it isn't fully stable, but development is frozen). I downloaded gsl and followed the GNU installation steps. Then I downloaded lapack, unpacked and ran make -install for both lapack and BLAS.
In my makefile, I have

LIBRARIES = -L/usr/lib -lgsl -lblas -llapack

in /usr/lib the files liblapack.o.3 and libblas.o.3 (or something like that. I forget the exact file ending) exist. When I ran this on my old computer, a Mac laptop, the analogous directory was the correct one to use. However, Macintosh computers ship with veclib which takes the place of lapack, so the makefile is fairly different.

If anyone has any advice or knows a good place to look, let me know. The professor has other things to deal with, so I think this is my problem.

PS the lapack and gsl sites have tons of excellent information, but it all assumes that you are not a moron... and has therefore not been helpful to me
 
Physics news on Phys.org
  • #2
Not that I am going to be able to help; but I thought I'd warn you that your post is not that clear...can you go ahead and ,clearly and explicitly, ask a separate question or two? and don't ask double-barreled questions, either.
 
  • #3
If I had a specific question, a quick google search pretty much always finds the answer since it seems that linux users post everything that happens. The amount of information that I would need to post to ask a specific question would be rude. I'm sure that I'm linking to the wrong library or I'm missing something, but if I knew which part to ask the question about, I wouldn't have the question. I'm really just hoping for some resources, and if nobody has any, I'll figure it out eventually.

I don't think that this is a double barreled question since gsl uses lapack and blas. In fact, the problem may be that I did not have CBLAS installed, which I'm working on.
 
  • #4
It sounds like you're on the right track. So what happens when you try to compile it? If you get specific error messages, post these and we'll try to help you figure it out. I usually find that when I am installing a large piece of software, I am in for a few hours of work getting all of the libraries installed and all of the compiler directives right.
 
  • #5
I did not accused you of asking double-barreled question, just warn you to be careful not to do it when you ask a question; in fact, you did not have a single question in your original post, nor the second...hence, my request for at least one.

As far as amount of info, it is the other way around...the amount of information needed if you had a specific question would actually be pretty minimal.

Nevertheless, it looks like we may be going somewhere...

In you second post you say that your are linking to the wrong library...

So, do you have any error messages when you link?
Or, do you have any error messages when you run after what might seem a succesfull link?
 

1. What is a Makefile library?

A Makefile library is a collection of files and functions that are used to build and manage software projects. It includes instructions for compiling and linking source code, as well as managing dependencies and creating executable programs.

2. What is GSL and LAPACK?

GSL (GNU Scientific Library) and LAPACK (Linear Algebra Package) are two popular libraries used for scientific computing. GSL provides a wide range of mathematical functions and algorithms, while LAPACK is specifically designed for solving linear algebra problems.

3. Why are GSL and LAPACK commonly used in Makefile libraries?

GSL and LAPACK are commonly used in Makefile libraries because they provide efficient and reliable algorithms for complex mathematical computations. They are also cross-platform compatible, making them ideal for use in various operating systems.

4. How do I install GSL and LAPACK on my computer?

The installation process for GSL and LAPACK may vary depending on your operating system. However, they can typically be installed through package managers or by downloading the source code and compiling them manually. It is important to ensure that the correct versions are installed for compatibility with your Makefile library.

5. Are there any common issues or errors when using GSL and LAPACK in a Makefile library?

Yes, there can be common issues or errors when using GSL and LAPACK in a Makefile library. These can include compatibility issues with other libraries, incorrect installation, or missing dependencies. It is important to carefully follow the instructions for installing and using these libraries to avoid any potential errors.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
888
  • Programming and Computer Science
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
6K
  • Programming and Computer Science
Replies
1
Views
2K
  • Programming and Computer Science
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
367
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
7K
  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
2
Views
304
  • Programming and Computer Science
Replies
6
Views
2K
Back
Top