469,898 Members | 1,408 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

Lapack/ CLapack

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

Nov 14 '05 #1
3 2968

"eri" <e.*******@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
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.
Nov 14 '05 #2
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?

Nov 14 '05 #3
On 4 May 2005 07:48:41 -0700, "eri" <e.*******@gmail.com> wrote:
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?


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.

--
Al Balmer
Balmer Consulting
re************************@att.net
Nov 14 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by drife | last post: by
1 post views Thread by pervinder | last post: by
reply views Thread by Darren L. Weber | last post: by
7 posts views Thread by taoyangsjtu | last post: by
1 post views Thread by Ken Dere | last post: by
2 posts views Thread by Frédéric Degraeve | last post: by
2 posts views Thread by aberte | last post: by
1 post views Thread by Preben | last post: by
2 posts views Thread by wab4u | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.