Closed jjellio closed 1 year ago
@jjellio, the last commit I can find related to complex return times is dc26ca9db2695d5998916cc2cab3367de557fa03 6 years ago. Looks the solution is to use float _Complex
and double _Complex
?
Now that C++11 is required (for many years now), perhaps all of the BLAS and LAPACK wrappers that return complex types should just be hard-coded to use float _Complex
and double _Complex
?
Oh interesting. So, this is a side effect of moving to CXX=14 or 17? I didn't realzie HAVE_TEUCHOSCORE_CXX11
was not defined. Maybe, that macro should be HAVE_TEUCHOSCORE_ATLEAST_CXX11
or something? Or just define HAVE_TEUCHOSCORE_CXX11
if CXX>= 11 is used?
That should be defining HAVE_TEUCHOSCORE_CXX11
- so why would my build be evaluating the off Branch... I have a CMakeCache posted around here somewhere..
HAVE_TEUCHOSCORE_CXX11
is not defined in my CMakeCache.txt (Attached)
tuechos-cxx11-CmakeCache.txt
Oh interesting. So, this is a side effect of moving to CXX=14 or 17? I didn't realzie
HAVE_TEUCHOSCORE_CXX11
was not defined. Maybe, that macro should beHAVE_TEUCHOSCORE_ATLEAST_CXX11
or something? Or just defineHAVE_TEUCHOSCORE_CXX11
if CXX>= 11 is used?
Or just take the ifdefs out all together and hard-code the branch that works with C++11+. There is actually a tool that will do that: unifdef.
But why isn't it being defined? The logic should be defining it.
And I agree - subtractive changes are as-good or better than additive. (e.g., let's delete things) - But it looks like something fundamental is wrong if that define is not present.
Doh, I was confused. I see where the problem is https://github.com/trilinos/Trilinos/blob/dc26ca9db2695d5998916cc2cab3367de557fa03/packages/teuchos/numerics/src/Teuchos_BLAS_wrappers.hpp#L198
It seems this could just be set to double _Complex
or float _Complex
. I can put a PR for that
@bartlettroscoe this still hasn't gone through, and I don't think "RETEST" will fix it, as the problem appears to be perpetually broken tests. Is my read on this correct? Should we add retest?
@jjellio, you mean for PR #11013? I don't think you will see those test failures anymore (except for the random test on the 'vortex' build that will always be possible and there is nothing we can do about, see #11109).
Question
@trilinos/teuchos
I've got alot of spam (warnings) about C-linkage and return values of complex blas functions. E.g.,
Is there a feature in Teuchos' wrappers that handles the return type better? I skimmed the code/cmake and didn't see anything. Intel discusses this, e.g., Calling complex blas through C++. And they aren't using the return value of the blas calls. I think Trilinos prefers to call the Fortran symbols directly, so it requires C-linkages for those.
@bartlettroscoe