-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Workaround for broken [[deprecated]] in PGI compiler #1581
Conversation
- similar to Intel and NVCC, add workaround for PGI compiler
- set CMAKE_CXX11_STANDARD_COMPILE_OPTION to remove -A : https://www.pgroup.com/userforum/viewtopic.php?f=4&t=7565&p=27308#p27308 - use forks of fmt and spdlog because of fmtlib/fmt#1581
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.
Thanks for the PR. Mostly looks good but please apply clang-format.
The FormatterTest.Precision
failure is likely due to non-IEEE754 floating point. In this case you could try making the failing check conditional on is_iec559
:
if (std::numeric_limits<double>::is_iec559) {
EXPECT_EQ(
"4.9406564584124654417656879286822137236505980261432476442558568250067550"
"727020875186529983636163599237979656469544571773092665671035593979639877"
"479601078187812630071319031140452784581716784898210368871863605699873072"
"305000638740915356498438731247339727316961514003171538539807412623856559"
"117102665855668676818703956031062493194527159149245532930545654440112748"
"012970999954193198940908041656332452475714786901472678015935523861155013"
"480352649347201937902681071074917033322268447533357208324319361e-324",
format("{:.494}", 4.9406564584124654E-324));
}
It's hard to say why CountCodePoints
is failing. You'll need to provide more information.
Thanks! In the compiler manual I saw flag There are now two tests that are failing:
stack trance is:
produces:
So seems something related to UTF-8 with PGI? I don't find any relevant info though. |
Done |
- Add newline at the end of files to avoid PGI warnings - Fix PGI internal assertion external/nmodl/src/codegen/codegen_c_visitor.cpp", line 3969: internal error: assertion failed at: "../src/lower_init.c", line 7946 auto statement = ShadowUseStatement{lhs, "+=", rhs}; - Fixes for PGI build: set CMAKE_CXX11_STANDARD_COMPILE_OPTION to remove -A : https://www.pgroup.com/userforum/viewtopic.php?f=4&t=7565&p=27308#p27308 - Use fork of spdlog because of fmtlib/fmt#1581 - Add necessary compiler flags by default
- Add newline at the end of files to avoid PGI warnings - Fix PGI internal assertion external/nmodl/src/codegen/codegen_c_visitor.cpp", line 3969: internal error: assertion failed at: "../src/lower_init.c", line 7946 auto statement = ShadowUseStatement{lhs, "+=", rhs}; - Fixes for PGI build: set CMAKE_CXX11_STANDARD_COMPILE_OPTION to remove https://www.pgroup.com/userforum/viewtopic.php?f=4&t=7565&p=27308#p27308 - Use fork of spdlog because of fmtlib/fmt#1581 - Add necessary compiler flags by default See #271, it was merged into wrong branch. Fixes #262
Looks like it. What does the following program print when compiled with PGI and run? #include <fmt/format.h>
int main() {
auto s = fmt::basic_string_view<char8_t>(
reinterpret_cast<const char8_t*>("ёжик"));
for (auto c: s) {
fmt::print("\\x{:02x}", static_cast<unsigned>(c));
}
} |
sure! First I was getting this:
Then I added
Then I set
By the way, PGI compile is free to download in case you want to test locally. Let me know if I should test anything else. |
PGI butchered the string literal. The correct output should be: |
* Workaround broken [[deprecated]] in PGI compiler - similar to Intel and NVCC, add workaround for PGI compiler
similar to Intel and NVCC, add workaround for PGI compiler
I tested this with:
I didn't look into details but if there are any suggestions, it will be helpful.