Page 1 of 1
calling fortran from c++
Posted: March 12th, 2012, 5:44 am
by stonybrooknick
any one have any tips or sound advice calling for calling FORTRAN from C++
calling fortran from c++
Posted: March 12th, 2012, 6:56 am
by SierpinskyJanitor
many possibilities, but why would you do that (this backfiring question will spring to everyone´s mind)?If you compile your Fortran as DLLs/*.libs then you can actually link these into your projects (Windows/Unix).
calling fortran from c++
Posted: March 12th, 2012, 10:53 am
by spv205
NAG has quite a lot of info on the process...
http://www.nag.co.uk/numeric/MSC++.asph ... doc.htmleg translations of argument types, STDCALL, rowmajor vs column major..., naming conventions...you might also want to download depends.exe a program that lists functions exported form dll.. (assuming you want to use dll's/windows) - very useful for debugging ( eg identifying missing dependent DLL library, name mangling)
calling fortran from c++
Posted: March 12th, 2012, 7:19 pm
by stonybrooknick
@SierpinskyJanitor I'm in Linux either with PGI/INTEL and GCC at my disposable and i'm trying to call fortran libraries like scalapack from C++@spv205 thank you for the information
calling fortran from c++
Posted: March 12th, 2012, 8:14 pm
by SierpinskyJanitor
Cheers StonyBrookNick, just a question though: why bother scalapacking when you have the same libraries ported to C++? Check out:
http://en.wikipedia.org/wiki/List_of_nu ... nd_C.2B.2B
calling fortran from c++
Posted: March 12th, 2012, 10:36 pm
by stonybrooknick
QuoteOriginally posted by: SierpinskyJanitorCheers StonyBrookNick, just a question though: why bother scalapacking when you have the same libraries ported to C++? Check out:
http://en.wikipedia.org/wiki/List_of_nu ... _C.2B.2BOf this list i've tried Petsc and I've also tried writing my own routines with MPI for gsl to some success , however the Scalapack has beaten the competition( of what i've tried) in term's of speed and all methods contain a very good deal of accuracy. I just need a few specific linear algebra function's and tested randomly generated matrices. Such as Inversion of symmetric positive definite matrix and a few others tasks , no serious eigen value solvers. My problem size requires me to use parallel computing. The hypre and Trilinos libraries in the list looks very promising , thank you for introducing these to me