Closed andlaus closed 2 years ago
The declarations look identical to me from a type perspective, are we not allowed to declare the same function multiple times in C?
Not with different return types.
1) differeing return types 2) we disabled it by default, but it can still be enabled. superlu in bionic is broken, it is prototyping blas functions wrongly. blas never had return values. 3) yes some include level workaround should probably be employed.
Not with different return types.
Ah, thanks! According to this (somewhat randomly googled) page:
http://www.netlib.org/clapack/cblas/dgemm.c
... it looks like perhaps we should go for int rather than void in blas_lapack.h as well => problem solved?
blas never had return values.
Not in Fortran, but from C it is less clear to me how it should be done, is the link I posted also using the wrong prototype?
looks like perhaps we should go for
int
rather thanvoid
in blas_lapack.h as well
We're not allowed to. BLAS subroutines don't have return values in the traditional sense. Declaring an int
return type means we assume that the underlying implementation is CBLAS rather than reference BLAS or, say, GotoBLAS.
there are two ways to do blas from C, either by importing the fortran interface, or by using the f2c'd style interface, which gives you 'cblas', wrapping stuff and having return values. this is afaict the blas iface, so it's messy.
is there a problem with just not using BLAS anymore and remove that header? as far as I can see, the stuff that flow_legacy
uses can be quite easily be replaced by the dense linear algebra classes of dune-common.
... can be quite easily be replaced by the dense linear algebra classes of dune-common.
BTW: I'm pretty sure that this would even come with a small speedup if the objects in question are small.
I just checked: the only places where any BLAS functionality is used are TransTpfa_impl.hpp
, some (probably) long unused code that uses the old fluid properties interface and some old C stuff that was inherited from opm-core. the C stuff is probably unused even for flow_legacy
and TransTpfa
only uses dgemm_()
Closing as I doubt that it still applies (packages build correctly at least).
when trying to compile opm-simulators on my ubuntu 18.04 laptop, I get this:
this is due to conflicting forward declarations of the BLAS function
dgemm_
by superlu and opm-common'sopm-common/opm/common/utility/numeric/blas_lapack.h
. since as far as I'm aware, BLAS is not used by non-legacy flow, I propose to remove the functionality or if the fallout turns out to be too much work, make it possible to compileflow
without having to compile any legacy code.Also note that it is quite easy to trigger this error: starting on a vanilla ubuntu 18.04, the following has been done to install the prerequisites: