blis icon indicating copy to clipboard operation
blis copied to clipboard

Implemented `--omit-symbols=LIST` `configure` option.

Open fgvanzee opened this issue 1 year ago • 3 comments

Details:

  • Added a new option to configure that allows the user to specify a list of symbols to omit from the library. The format of the option is --omit-symbols=LIST where LIST is a comma-separated list of symbol names (excluding any trailing underscore). This list is parsed into a list of #define directives that causes the relevant parts of BLIS to be ignored (or not). As such, the nature of this option is to only support omitting symbols which have been pre-identified as potential troublemakers when linking BLIS with other libraries such as LAPACK or ScaLAPACK. (This list may grow in the future as additional symbols are identified.)
  • Re-implemented the --enable-scalapack-compat configure option to utilize the underlying --omit-symbols=LIST infrastructure.
  • Implemented an --enable-lapack-compat option, which omits all of the known problematic symbols currently supported for omission.
  • This commit addresses Issue #816. Thanks to Timo Betcke for bringing it to our attention and to Devin Matthews for his advice and for his initial implementation of --enable-scalapack-compat (PR #813).
  • CREDITS file update.

cc @tbetcke

fgvanzee avatar Aug 01 '24 22:08 fgvanzee

I'm working on fixing some oversights in the original commit.

Separately, we'll need to decide whether omitting a symbol should also cause blis.h to omit its function prototype. Normally I'd say yes, but in the cases of lsame_() and xerbla_(), omitting prototypes causes a lot of warnings due to invocations of those functions the BLAS compatibility _check() functions. 🤔 (Naturally, if those symbols are omitted from the library, we won't be able to link against the [shared] library as-is, but it'd be nice if it at least compiled cleanly.)

fgvanzee avatar Aug 01 '24 23:08 fgvanzee

Separately, we'll need to decide whether omitting a symbol should also cause blis.h to omit its function prototype. Normally I'd say yes, but in the cases of lsame_() and xerbla_(), omitting prototypes causes a lot of warnings due to invocations of those functions the BLAS compatibility _check() functions.

I'd be OK making an exception to the "no symbol, no prototype" rule just for those two functions.

devinamatthews avatar Aug 02 '24 00:08 devinamatthews

@tbetcke Since you were involved in #816, can you give this PR a try?

Take a look at configure --help to see the new symbol omission / compat options. Thanks for your help.

fgvanzee avatar Aug 03 '24 21:08 fgvanzee

@devinamatthews Given that we haven't heard from @tbetcke, I'm okay with merging this commit if you are.

fgvanzee avatar Oct 15 '24 21:10 fgvanzee

Good with me.

devinamatthews avatar Oct 15 '24 21:10 devinamatthews