Lapack/ CLapack

E

eri

Hi all
I need to convert a Fortran program I wrote some months ago. I need
BLAS / LAPACK routines and it seems to be very difficult to make it
work under Win + MingW32 + DevCPP; so I wonder if there is someone who
has managed to install them and has written a sort of HOWTO.

I've already downloaded the .zip packages from netlib. What I couldn't
find is how to fit them to my needs: I mean, which libs are needed,
which header, how to link them, where to find documentation.

Maybe I can try and retry until something works, but I am really short
on time, so if I could find directions or a no-src-but-many-docs
package, that would be great.

P.S: my previous code was fortran 90, so f2c is not useful

Moreover, is it better to use the original LAPACK compiled from Fortran
(how? how to link functions?) or the f2c-ed CLapack which should be
less performant?

Thanks all
 
T

Tim Prince

eri said:
Hi all
I need to convert a Fortran program I wrote some months ago. I need
BLAS / LAPACK routines and it seems to be very difficult to make it
work under Win + MingW32 + DevCPP; so I wonder if there is someone who
has managed to install them and has written a sort of HOWTO.

P.S: my previous code was fortran 90, so f2c is not useful

Moreover, is it better to use the original LAPACK compiled from Fortran
(how? how to link functions?) or the f2c-ed CLapack which should be
less performant?
You're trying to take this far afield from Standard C. CPP looks like C++
to me; if that's what makes it "very difficult," you'll get no sympathy
here.
There aren't many headers involved, compared with typical C projects;
probably just one for BLAS and one for LAPACK. If you choose to link the
original Fortran libraries, it is sufficient to translate those calls to C.
If you are having difficulty learning the C to Fortran interface, you can
easily make a short dummy f77 function with the calls you need, and use f2c
to see how it's done. No need to translate an entire application for that
purpose.
I can't imagine that you've used anywhere near a full cross section of BLAS
and LAPACK, so the idea that a C version is "less performant" is an
unjustified generalization. I'm not certain how effective restrict keyword
will be in your setting; otherwise, it is the one missing feature in f2c
which would enable most of the functions to maintain performance.
You may not be able to get by easily without Google, just use it.
If you are willing to face a small level of difficulty, you may be able to
use commercial libraries like Intel MKL. Then you may find it necessary to
look at the name mangling conventions, which would be easier to do with an
nm or dumpbin utility. The CDECL version may have the string length
arguments placement in agreement with f2c; go find out.
You've probably already figured out that other newsgroups would advise you
there's nothing wrong with using f90 and C together, and the topicality
police will jump on that here.
 
E

eri

You're trying to take this far afield from Standard C. CPP looks
like C++
to me; if that's what makes it "very difficult," you'll get no sympathy
here.

DevCPP is just the name of the editor. I'm developing ANSI C on a
windows machine. I can see the difference between C and C++ and I'm
defintely not interested in the second, at the moment.
There aren't many headers involved, compared with typical C projects;
probably just one for BLAS and one for LAPACK. If you choose to link the
original Fortran libraries, it is sufficient to translate those calls to C.
If you are having difficulty learning the C to Fortran interface, you can
easily make a short dummy f77 function with the calls you need, and use f2c
to see how it's done. No need to translate an entire application for that
purpose.

Unfortunately I have to solve a problem quickly, so I'm looking for a
quick solution. You say "probably just one for BLAS and one for
LAPACK": even I can say "probably", but I was asking for experiences,
which are certain, not probable. I thank you for the time you spent
writing this reply, but sure you didn't help me much.

Other ideas?
 
A

Alan Balmer

DevCPP is just the name of the editor. I'm developing ANSI C on a
windows machine. I can see the difference between C and C++ and I'm
defintely not interested in the second, at the moment.



Unfortunately I have to solve a problem quickly, so I'm looking for a
quick solution. You say "probably just one for BLAS and one for
LAPACK": even I can say "probably", but I was asking for experiences,
which are certain, not probable. I thank you for the time you spent
writing this reply, but sure you didn't help me much.

Other ideas?

Yes. Post your question in an appropriate newsgroup. None of BLAS /
LAPACK, Win, MingW32, or DevCPP are topical here. I can't suggest
which newsgroup, but you can try searching Google groups.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,157
Messages
2,570,879
Members
47,414
Latest member
djangoframe

Latest Threads

Top