Trilinos icon indicating copy to clipboard operation
Trilinos copied to clipboard

Teuchos: Can we just always build with Complex?

Open csiefer2 opened this issue 5 years ago • 14 comments

Because if it doesn't work, your blas is broken...

Thoughts?

csiefer2 avatar Mar 14 '19 19:03 csiefer2

@mhoemmen @bartlettroscoe : Opinions?

csiefer2 avatar Mar 14 '19 20:03 csiefer2

So few customers use complex numbers and it increase the build time and binaries by enough I would say we should not. But we have several builds testing with complex turned on and off I think we should be safe. What I think we can't support very well is having some packages enable complex and some disable it. We can't test all of those permutations so we are asking for broken code.

bartlettroscoe avatar Mar 14 '19 20:03 bartlettroscoe

Here's the idea:

  1. @csiefer2 says that neither Teuchos_ENABLE_COMPLEX by itself, nor Trilinos_ENABLE_COMPLEX_DOUBLE, have any effect on Thyra or Stratimikos instantiations, independent of Tpetra's own complex arithmetic options.
  2. Enabling Teuchos_ENABLE_COMPLEX all the time costs little.
  3. If complex-arithmetic BLAS doesn't work, your BLAS is broken anyway.
  4. Therefore, why not just enable Teuchos_ENABLE_COMPLEX all the time, and get rid of the option?

mhoemmen avatar Mar 14 '19 20:03 mhoemmen

@bartlettroscoe wrote:

So few customers use complex numbers

  1. Sierra builds with complex arithmetic enabled, and some Sierra products use it.
  2. Users who don't want to enable complex arithmetic solvers can set Trilinos_ENABLE_COMPLEX_DOUBLE=OFF etc.

Solvers have their own options for Scalar types. That's where all the building and testing cost goes. Things like Teuchos::ScalarTraits specializations for std::complex<double> don't cost so much.

mhoemmen avatar Mar 14 '19 20:03 mhoemmen

@mhoemmen asked:

Therefore, why not just enable Teuchos_ENABLE_COMPLEX all the time, and get rid of the option?

I guess I don't care too much but we have seen broken complex functions in BLAS and LAPACK.

bartlettroscoe avatar Mar 14 '19 20:03 bartlettroscoe

@bartlettroscoe wrote:

we have seen broken complex functions in BLAS and LAPACK.

You can't enable complex solvers without complex Teuchos. If complex-arithmetic LAPACK is broken, then many solvers would no longer work. MueLu depends on LAPACK, for example. The fall-back Teuchos::BLAS implementation for unsupported Scalar types won't suffice.

This suggests that complex BLAS and LAPACK need to work if Trilinos_ENABLE_COMPLEX_*=ON. Otherwise, we should error out at configure time. Users who don't care about complex arithmetic can always set Trilinos_ENABLE_COMPLEX_*=OFF to work around a broken BLAS and LAPACK.

mhoemmen avatar Mar 14 '19 20:03 mhoemmen

@mhoemmen said:

Users who don't care about complex arithmetic can always set Trilinos_ENABLE_COMPLEX_*=OFF to work around a broken BLAS and LAPACK.

So you want to just remove Teuchos_ENABLE_COMPLEX and have it respond directly to ${PROJECT_NAME}_ENABLE_COMPLEX? I am fine with that.

bartlettroscoe avatar Mar 14 '19 20:03 bartlettroscoe

@bartlettroscoe wrote:

So you want to just remove Teuchos_ENABLE_COMPLEX and have it respond directly to ${PROJECT_NAME}_ENABLE_COMPLEX? I am fine with that.

That's right! The idea is to remove ways in which users can break the build by setting options weirdly.

mhoemmen avatar Mar 15 '19 00:03 mhoemmen

This issue has had no activity for 365 days and is marked for closure. It will be closed after an additional 30 days of inactivity. If you would like to keep this issue open please add a comment and/or remove the MARKED_FOR_CLOSURE label. If this issue should be kept open even with no activity beyond the time limits you can add the label DO_NOT_AUTOCLOSE. If it is ok for this issue to be closed, feel free to go ahead and close it. Please do not add any comments or change any labels or otherwise touch this issue unless your intention is to reset the inactivity counter for an additional year.

github-actions[bot] avatar Aug 18 '21 12:08 github-actions[bot]

revive

mhoemmen avatar Aug 18 '21 17:08 mhoemmen

Any news on this? I keep having to rebuild Trilinos everywhere to enable Teuchos_ENABLE_COMPLEX because I have a Belos solver that depends on this. If this could be enabled by default even without any other ${PROJECT_NAME}_ENABLE_COMPLEX being enabled that would help a lot.

Sbte avatar Feb 18 '22 11:02 Sbte

This issue has had no activity for 365 days and is marked for closure. It will be closed after an additional 30 days of inactivity. If you would like to keep this issue open please add a comment and/or remove the MARKED_FOR_CLOSURE label. If this issue should be kept open even with no activity beyond the time limits you can add the label DO_NOT_AUTOCLOSE. If it is ok for this issue to be closed, feel free to go ahead and close it. Please do not add any comments or change any labels or otherwise touch this issue unless your intention is to reset the inactivity counter for an additional year.

github-actions[bot] avatar Feb 18 '23 12:02 github-actions[bot]

begot autobot

mhoemmen avatar Feb 19 '23 21:02 mhoemmen

This issue has had no activity for 365 days and is marked for closure. It will be closed after an additional 30 days of inactivity. If you would like to keep this issue open please add a comment and/or remove the MARKED_FOR_CLOSURE label. If this issue should be kept open even with no activity beyond the time limits you can add the label DO_NOT_AUTOCLOSE. If it is ok for this issue to be closed, feel free to go ahead and close it. Please do not add any comments or change any labels or otherwise touch this issue unless your intention is to reset the inactivity counter for an additional year.

github-actions[bot] avatar Feb 24 '24 12:02 github-actions[bot]

This issue was closed due to inactivity for 395 days.

github-actions[bot] avatar Mar 27 '24 12:03 github-actions[bot]