LAPACK without Fortran Compiler

Post here if you have having problem using the Makefile build process.

LAPACK without Fortran Compiler

Postby V1cSt0ne » Wed Nov 18, 2015 7:59 pm

I'm trying to crosscompile for a Tile64 like architecture. Unforutunately, the dev environment that I use to compile for the target architecture doesn't have a fortran compiler. My development is all in c, but, as far as I can tell, building CBLAS, ATLAS, or LAPACK all require a fortran compiler. Is there any way around this?
Posts: 4
Joined: Wed Nov 18, 2015 7:48 pm

Re: LAPACK without Fortran Compiler

Postby kurzak » Thu Nov 19, 2015 8:07 pm

It's not hopeless.
Get Netlib BLAS and try to translate it to C yourself using F2C.
Then you can compile it using a C compiler.
It will still provide the FORTRAN interface (calling convention, i.e., passing by reference).
Then you can put Netlib CBLAS on top of it.
BTW, you can compile Netlib CBLAS even without the BLAS.
It's only a set of wrappers that provide C interface over the FORTRAN interface.
You cannot build tests without the actual BLAS, but you can always build the wrapper library.
Alternatively, look at the GNU scientific library.
I am pretty sure it contains C implementation of CBLAS (the actual thing, not just wrappers).
Then you need LAPACK.
I don't think you can successfully F2C the whole LAPACK any more.
But if you just need a routine, or a handful of routines, you can just try to F2C those.
ATLAS probably only requires Fortran for building the Fortran interface.
If you don't need the FORTRAN interface to BLAS, you can probably build ATLAS without FORTRAN.
Probably not an option anyways for that architecture, but why not try.
Actually, get in touch with Clint Whaley. He may have interest in that architecture.
Finally, I want to point out that if you manage to get LAPACK working, LAPACKE is a nice C interface for it.
Also, if you say a little more about your specific problem, you may get a more targeted answer.
You seem to be on the bleeding edge.
Good luck.
Posts: 9
Joined: Mon Aug 14, 2006 11:23 am

Re: LAPACK without Fortran Compiler

Postby V1cSt0ne » Sun Nov 22, 2015 3:04 pm

Thanks. I am using a section of code used for benchmarking a machine, and this code has been used for other machines, we want to keep as similar as possible. I'm guessing that compiling using C and subsequently compiling would have an effect on performance. Unfortunately, my dev environment doesn't have F2C installed, and I lack root privileges, so I might be SOL on that front. That being said, there are only 4 BLAS functions I need, so GNU scientific library may be a good stand in for now, but eventually I would want to actually use BLAS. A colleague remember using a no FORTRAN option for BLAS, but if I can't build the actual tests, it seems less than stellar.

I think for now, I'll look into building the wrapper library, and see what happens from there. I guess if I just need those 4 function, I don't necessarily need LAPACK. If atlas doesn't need FORTRAN, that's another avenue,with Clint.

Anyway, thanks for your help.
Posts: 4
Joined: Wed Nov 18, 2015 7:48 pm

Return to Makefile

Who is online

Users browsing this forum: No registered users and 1 guest