Skip to content

nvhpc/22.3: workaround for c++17 mode#3043

Merged
vitaut merged 1 commit into
fmtlib:masterfrom
olupton:olupton/nvhpc-22.3-hack
Aug 18, 2022
Merged

nvhpc/22.3: workaround for c++17 mode#3043
vitaut merged 1 commit into
fmtlib:masterfrom
olupton:olupton/nvhpc-22.3-hack

Conversation

@olupton

@olupton olupton commented Aug 18, 2022

Copy link
Copy Markdown
Contributor

#3028 discusses several issues with using fmt and the NVIDIA HPC compilers.

One issue leads to assertions failures and wrong results, even in simple examples. That issue seems to be a compiler but affecting version 22.3 of the compilers, specifically in C++17 mode. This workaround avoids the issue.

There are still other test failures with this patch, see #3028 for more information, but this seems sufficient to fix basic usage with 22.3 and C++17.

I assume it would also be fine to remove all of the macros and use the *(foo + index) style for all compilers (with an appropriate comment about nvhpc 22.3), if you prefer.

@phprus

phprus commented Aug 18, 2022

Copy link
Copy Markdown
Contributor

This error is also present in other compilers with EDG frontend. Not only in NVIDIA HPC compilers.

@olupton olupton force-pushed the olupton/nvhpc-22.3-hack branch from 203a4ce to 06b9b16 Compare August 18, 2022 14:32
@olupton

olupton commented Aug 18, 2022

Copy link
Copy Markdown
Contributor Author

This error is also present in other compilers with EDG frontend. Not only in NVIDIA HPC compilers.

OK, given that then my suggestion

I assume it would also be fine to remove all of the macros and use the *(foo + index) style for all compilers (with an appropriate comment about nvhpc 22.3), if you prefer.

seems like a better solution. I updated the branch to do that (and rebased it on master, previously it was on top of 9.0.0).

Comment thread include/fmt/format.h Outdated
@olupton olupton force-pushed the olupton/nvhpc-22.3-hack branch from 06b9b16 to f06c45c Compare August 18, 2022 14:38
@vitaut vitaut merged commit fbb568b into fmtlib:master Aug 18, 2022
@vitaut

vitaut commented Aug 18, 2022

Copy link
Copy Markdown
Contributor

Thank you.

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