Open cournape opened 7 years ago
Could you try out if including -fuse-ld=ld
in the linker options solves the issue for you?
I recommend just compiling BLAS/LAPACK with Flang. They are open-source. OpenBLAS and BLIS both accept a Fortran compiler argument if you want a high-performance BLAS library.
It is possible that BLIS does not yet know about the Flang ABI for DOT but that's a trivial bug to fix if it's reported (e.g. https://github.com/flame/blis/pull/637).
Binaries and .mod
files produced with Flang are not compatible with those produced with gfortran. You have to build the application and all libraries with the same toolchain.
Is there documentation on the Flange ABI? The original post mentioned scipy. Users like Julia and Python need to know the ABI in order to call fortran applications.
If the ABI is consistent with gfortran that makes our lives easier.
At least part of it is described in https://releases.llvm.org/11.0.1/tools/flang/docs/Calls.html but I don't think that answers all the questions, in particular, the one here.
I built a recent master of flang and tried to build a non trivial piece of fortran code, scipy. The build went well, and I could even run some of the tests, but then the test suite crashes when calling BLAS
dotu
function. I suspect this is because the default BLAS/LAPACK on my debian system is built with the gfortran ABI. Is there a way to control the ABI for emitted code by flang ?