Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented --omit-symbols=LIST configure option. #823

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

fgvanzee
Copy link
Member

@fgvanzee fgvanzee commented Aug 1, 2024

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 Not possible to link Blis and Lapack statically into the same executable #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 Add a ScaLAPACK compatibility mode. #813).
  • CREDITS file update.

cc @tbetcke

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.
@fgvanzee
Copy link
Member Author

fgvanzee commented Aug 1, 2024

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.)

@devinamatthews
Copy link
Member

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.

Details:
- Leave lsame_() and xerbla_() prototypes enabled even when their
  respective symbols are omitted from the library.
- Fixed copy-and-paste bug.
- Fixed typos in the #define directives.
@fgvanzee
Copy link
Member Author

fgvanzee commented Aug 3, 2024

@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
Copy link
Member Author

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

@devinamatthews
Copy link
Member

Good with me.

@fgvanzee fgvanzee merged commit 827c50b into master Oct 16, 2024
2 checks passed
@fgvanzee fgvanzee deleted the omit_symbols_option branch October 16, 2024 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants