"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.