-
Notifications
You must be signed in to change notification settings - Fork 166
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
Fixes for extended and quad precision checking. Add CI cheks with fpm #821
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @jalvesz .
I only have a minor commnet, regarding the robustness of the definition of the variable RC_KINDS_TYPES
.
I agree with @jvdp1: great work @jalvesz, thank you for finding this out! I don't want to have you rewrite your PR but here is some thought. stdlib/src/stdlib_linalg_determinant.fypp Lines 17 to 18 in 42182b0
So here, it could be something like this?
Also: the special functions just want to be for the "core" types (32- and 64-bit). Lines 21 to 28 in 42182b0
|
For test-drive to accept extended double and quadruple precision the C preprocessor macros |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank ypu @jalvesz .
#:include "common.fypp" | ||
#:set CI_KINDS_TYPES = INT_KINDS_TYPES + CMPLX_KINDS_TYPES | ||
#:set R_KINDS_TYPES = [KT for KT in REAL_KINDS_TYPES if KT[0] in ["sp","dp"]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Did you find a way to compile test-drive with/out QP and XDP if supported or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jvdp1 I didn't have time last week to look at that. I guess this should be done by propagating the fypp macros backwards in the dependency hierarchy but right now I do not see clearly how to do that without touching the build of test-drive itself or transferring the python preprocessing script to fpm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it should be also in the CMake files. I will have a look.
Edit: the flags are already used for test-drive with CMake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we then have one of the cmake builds test xdp and qp instead of the fpm build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good idea!
But the issue might still be there if someone try the tests with fpm
, right? Or do I miss something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it would still be there. The ideas on top of my head are: add the python preprocessing to test-drive as well or add it to fpm (it might be the most robust solution but I'm guessing not the easiest)
Edit: I looked at test-drive sources, so since it uses only C preprocessing and not fypp this should be actually easier. I'll check how to propagate the flags from the stdlib fpm build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing the corresponding flags in the build fpm test --profile release --flag '-DWITH_XDP -DWITH_QP'
are indeed enough to backpropagate the option.
Co-authored-by: Jeremie Vandenplas <jeremie.vandenplas@gmail.com>
Co-authored-by: Jeremie Vandenplas <jeremie.vandenplas@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @jalvesz . Pending a minor comment, I think this PR can be merged.
@jalvesz It sounds it is ready to be merged. We will wait a few more days, and then merge it. Thank you. |
Thank you @jalvesz . I will merge it now. |
After looking at #819 I realized that there were several issues:
_specialfunctions_gamma
files, there were this kind of fypp macros:Which implied that the different kind definitions were being redefined. In parallel, this means that some files were correctly preprocessed and others not, depending on when the problematic files were being preprocessed.
2. many tests are not using fypp "properly" so I refactored those that I catched after the modifications
3. Seems like there is no CI checking xdp, so I propose to use the fpm CI to check xdp and qp with gfortran.
4. I don't know if test-drive is not built with xdp and qp, but the
call check( ... )
using the tolerance argumentthr
had to be modified to avoid passingxdp
orqp
arguments.I think this is ready for consideration @perazz @jvdp1 @nsh-envs