Fix MSVC test fails#2009
Conversation
|
Hi @spiralbit Thanks for your contribution. |
yhmtsai
left a comment
There was a problem hiding this comment.
there is also format issue.
Could you install pre-commit hook from ginkgo repo and run it via like pre-commit run --from-ref "origin/develop" --to-ref HEAD
|
|
||
| fine_b = gko::initialize<Vec>( | ||
| {I<VT>({2.0, -1.0}), I<VT>({-1.0, 2.0}), I<VT>({0.0, -1.0}), | ||
| I<VT>({3.0, -2.0}), I<VT>({-2.0, 1.0})}, | ||
| exec); | ||
|
|
||
| coarse_b = gko::initialize<Vec>( | ||
| {I<VT>({2.0, -1.0}), I<VT>({0.0, -1.0})}, exec); | ||
|
|
||
| restrict_ans = (gko::initialize<Vec>( | ||
| {I<VT>({0.0, -1.0}), I<VT>({2.0, 0.0})}, exec)); | ||
|
|
||
| prolong_ans = gko::initialize<Vec>( | ||
| {I<VT>({0.0, -2.0}), I<VT>({1.0, -2.0}), I<VT>({1.0, -2.0}), | ||
| I<VT>({0.0, -1.0}), I<VT>({2.0, 1.0})}, | ||
| exec); | ||
|
|
||
| prolong_applyans = gko::initialize<Vec>( | ||
| {I<VT>({2.0, -1.0}), I<VT>({0.0, -1.0}), I<VT>({2.0, -1.0}), | ||
| I<VT>({0.0, -1.0}), I<VT>({2.0, -1.0})}, | ||
| exec); | ||
|
|
||
| fine_x = gko::initialize<Vec>( | ||
| {I<VT>({-2.0, -1.0}), I<VT>({1.0, -1.0}), I<VT>({-1.0, -1.0}), | ||
| I<VT>({0.0, 0.0}), I<VT>({0.0, 2.0})}, | ||
| exec); |
There was a problem hiding this comment.
you can delete the new line between each variables
Co-authored-by: Yu-Hsiang M. Tsai <19565938+yhmtsai@users.noreply.github.com>
Co-authored-by: Yu-Hsiang M. Tsai <19565938+yhmtsai@users.noreply.github.com>
Co-authored-by: Yu-Hsiang M. Tsai <19565938+yhmtsai@users.noreply.github.com>
Co-authored-by: Yu-Hsiang M. Tsai <19565938+yhmtsai@users.noreply.github.com>
Installed and run that. Hope the formatting looks OK to you now. |
MS have never formally acknowledged this exact problem, but they have acknowledged similar issues with templates, initializer lists and member-init lists. I've added a couple of references I could find though where issues with these kinds of things has been acknowledged. It's a known "fact" that MSVC trails Clang and GCC in standards compliance. |
These changes fix two kinds of issues which cause various test failures seen running the tests on the following platform:
The two underlying issues are:
Here are a couple of links concerning documented historical issues in MSVC with template resolution and initialiser lists:
https://learn.microsoft.com/en-us/cpp/overview/cpp-conformance-improvements-2019?view=msvc-170
https://devblogs.microsoft.com/cppblog/two-phase-name-lookup-support-comes-to-msvc/
Whereas GCC has:
This PR adds a couple of normalisation loops over the output and expected variables to strip out any mention of "class " or "struct ".
Here are the test summaries. Before the changes:
After:
These final four failures are CUDA hardware related and I am investigating them. One of these is reported here:
I've also added my cmake configuration script for reference.
ginkgo-run-cmake.txt