8000 avoid calls to blas routines when the data type is not compatible by pcarruscag · Pull Request #603 · su2code/SU2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

avoid calls to blas routines when the data type is not compatible #603

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

Merged
merged 3 commits into from
Nov 2, 2018

Conversation

pcarruscag
Copy link
Member

Proposed Changes

Avoid calls to external functions when compiling in AD and the datatype becomes incompatible.
(The HAVE_LAPACK flag is compatible with AD in the RBF interpolation but not in the HOM feature).
@vdweide please have a look at this.

PR Checklist

Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.

  • [X ] I am submitting my contribution to the develop branch.
  • [X ] My contribution generates no new compiler warnings (try with the '-Wall -Wextra -Wno-unused-parameter -Wno-empty-body' compiler flags).
  • [X ] My contribution is commented and consistent with SU2 style.

@pcarruscag pcarruscag requested a review from vdweide October 31, 2018 17:34
@vdweide
Copy link
Contributor
vdweide commented Oct 31, 2018

Yep, this is not tested in the regression tests, so it slipped through.

Copy link
Contributor
@vdweide vdweide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pcarruscag for taking care of this. However, a few changes are still needed.

Also CODI_FORWARD_TYPE should be added to the ifdefs, i.e. it should become

#if (defined(HAVE_MKL) || defined(HAVE_LAPACK)) && !defined(CODI_REVERSE_TYPE) && !defined(CODI_FORWARD_TYPE)

These ifdefs should be added to blas_structure.hpp and blas_structure.cpp as well, but that is a bit trickier. In blas_structure.hpp, make the following changes

#ifdef HAVE_LIBXSMM

should become

#if defined(HAVE_LIBXSMM) && !defined(CODI_REVERSE_TYPE) && !defined(CODI_FORWARD_TYPE)

#if !defined(HAVE_LIBXSMM) && !defined(HAVE_BLAS) && !defined(HAVE_MKL)

should become

#if !defined(HAVE_LIBXSMM) && !defined(HAVE_BLAS) && !defined(HAVE_MKL) || defined(CODI_REVERSE_TYPE) || defined(CODI_FORWARD_TYPE)

In blas_structure.cpp similar changes are needed. If you want, I can give them in details.

@pcarruscag
Copy link
Member Author

@vdweide ok I think I safeguarded the required areas, if you could test this it would be great as I do not have these libraries.

@vdweide
Copy link
Contributor
vdweide commented Nov 1, 2018

@pcarruscag, everything looks to be working as it should. As soon as the last regression test goes through (it failed due to a connection time out), it can be merged in.

@vdweide vdweide merged commit d83c795 into su2code:develop Nov 2, 2018
@pcarruscag pcarruscag deleted the fix_ad_lapack_compilation branch November 5, 2018 11:47
CatarinaGarbacz pushed a commit that referenced this pull request Aug 26, 2019
avoid calls to blas routines when the data type is not compatible.
Merging in this one.
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.

3 participants
0