-
Notifications
You must be signed in to change notification settings - Fork 89
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
Use cxx14 standard #611
Use cxx14 standard #611
Conversation
f0f467a
to
30bd205
Compare
Everything is working except for cuda 9.2 + clang 5.0 as host compiler. For some reason, there is an issue interpreting the standard headers and I cannot find the reason. See this pipeline: https://gitlab.com/ginkgo-project/ginkgo-public-ci/-/pipelines/173724849 For some reason, a small example such as the following compiled with #include <complex>
int main() {
return 0;
} |
The issue is clearly that constexpr complex< float> operator "" if(long double __num) |
No wait, that doesn't make sense, you are right. An identifier may never be a keyword. |
This can be reproduced with the following simple example constexpr double operator "" if(unsigned long long d)
{
return 0.0;
}
int main()
{
return 0;
} test.cpp:1:30: error: expected identifier
constexpr double operator "" if(unsigned long long d)
^
1 error generated. The error has two issues mixed in:
|
Okay, I finished digging, this is a bug in cudafe++: |
Regarding the space: The standard is a bit unclear about the details, but as the Literal operators section of the page you linked states, the user-defined-string-literal token was introduced to allow keywords to be used as literal suffixes, so I believe clang isn't at fault here. gcc emits a similar error message: |
Yes, I think |
Tobias helped find a possible way to work around this issue, from the previous #include <complex>
int main() {
return 0;
} You can compile it successfully with the following arguments: nvcc -ccbin=/usr/bin/clang++ -Xcudafe --gnu_version=70500 -Xcudafe --no_clang -std=c++14 test.cu |
30bd205
to
e8748ae
Compare
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!
The previous fix mentioned works for the |
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!
.gitlab-ci.yml
Outdated
@@ -488,7 +467,7 @@ build/nocuda/clang/core/release/shared: | |||
|
|||
build/nocuda/intel/core/debug/shared: | |||
<<: *default_build_with_test | |||
image: localhost:5000/gko-nocuda-gnu9-llvm8 | |||
image: localhost:5000/add_cuda11_container_1b1857a4_gko-nocuda-gnu9-llvm8 |
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.
Question: Are these changes necessary or left-over from the cuda11 branch?
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.
They are necessary, I had to upgrade the intel compiler to 2020 for this PR to work properly. I used the CUDA 11 PR to update this at the same time. The Intel 2019 has some incompatibility with GNU 9 backend when considering C++14 code. Therefore we will need to merge the CUDA11 container before this.
.gitlab-ci.yml
Outdated
@@ -536,7 +515,7 @@ build/nocuda/clang/omp/debug/static: | |||
|
|||
build/nocuda/intel/omp/release/static: | |||
<<: *default_build_with_test | |||
image: localhost:5000/gko-nocuda-gnu9-llvm8 | |||
image: localhost:5000/add_cuda11_container_1b1857a4_gko-nocuda-gnu9-llvm8 |
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.
Same here
7c84934
to
6ea93ec
Compare
Codecov Report
@@ Coverage Diff @@
## develop #611 +/- ##
========================================
Coverage 93.01% 93.01%
========================================
Files 296 296
Lines 20656 20656
========================================
Hits 19214 19214
Misses 1442 1442
Continue to review full report at Codecov.
|
+ Replace our own code with calls to the standard implementation + Do not directly call `xstd` in our code for base C++14 features.
There is an issue between `cudafe` which adds wrong spaces to `operator "" if()` definitions which make `clang` crash as it looks for the token `if`.
Co-authored-by: Pratik Nayak <[email protected]> Co-authored-by: Tobias Ribizel <[email protected]>
6ea93ec
to
634018e
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs 36.4% Coverage The version of Java (1.8.0_121) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. |
Release 1.3.0 of Ginkgo. The Ginkgo team is proud to announce the new minor release of Ginkgo version 1.3.0. This release brings CUDA 11 support, changes the default C++ standard to be C++14 instead of C++11, adds a new Diagonal matrix format and capacity for diagonal extraction, significantly improves the CMake configuration output format, adds the Ginkgo paper which got accepted into the Journal of Open Source Software (JOSS), and fixes multiple issues. Supported systems and requirements: + For all platforms, cmake 3.9+ + Linux and MacOS + gcc: 5.3+, 6.3+, 7.3+, all versions after 8.1+ + clang: 3.9+ + Intel compiler: 2017+ + Apple LLVM: 8.0+ + CUDA module: CUDA 9.0+ + HIP module: ROCm 2.8+ + Windows + MinGW and Cygwin: gcc 5.3+, 6.3+, 7.3+, all versions after 8.1+ + Microsoft Visual Studio: VS 2017 15.7+ + CUDA module: CUDA 9.0+, Microsoft Visual Studio + OpenMP module: MinGW or Cygwin. The current known issues can be found in the [known issues page](https://github.com/ginkgo-project/ginkgo/wiki/Known-Issues). Additions: + Add paper for Journal of Open Source Software (JOSS). [#479](#479) + Add a DiagonalExtractable interface. [#563](#563) + Add a new diagonal Matrix Format. [#580](#580) + Add Cuda11 support. [#603](#603) + Add information output after CMake configuration. [#610](#610) + Add a new preconditioner export example. [#595](#595) + Add a new cuda-memcheck CI job. [#592](#592) Changes: + Use unified memory in CUDA debug builds. [#621](#621) + Improve `BENCHMARKING.md` with more detailed info. [#619](#619) + Use C++14 standard instead of C++11. [#611](#611) + Update the Ampere sm information and CudaArchitectureSelector. [#588](#588) Fixes: + Fix documentation warnings and errors. [#624](#624) + Fix warnings for diagonal matrix format. [#622](#622) + Fix criterion factory parameters in CUDA. [#586](#586) + Fix the norm-type in the examples. [#612](#612) + Fix the WAW race in OpenMP is_sorted_by_column_index. [#617](#617) + Fix the example's exec_map by creating the executor only if requested. [#602](#602) + Fix some CMake warnings. [#614](#614) + Fix Windows building documentation. [#601](#601) + Warn when CXX and CUDA host compiler do not match. [#607](#607) + Fix reduce_add, prefix_sum, and doc-build. [#593](#593) + Fix find_library(cublas) issue on machines installing multiple cuda. [#591](#591) + Fix allocator in sellp read. [#589](#589) + Fix the CAS with HIP and NVIDIA backends. [#585](#585) Deletions: + Remove unused preconditioner parameter in LowerTrs. [#587](#587) Related PR: #625
The Ginkgo team is proud to announce the new minor release of Ginkgo version 1.3.0. This release brings CUDA 11 support, changes the default C++ standard to be C++14 instead of C++11, adds a new Diagonal matrix format and capacity for diagonal extraction, significantly improves the CMake configuration output format, adds the Ginkgo paper which got accepted into the Journal of Open Source Software (JOSS), and fixes multiple issues. Supported systems and requirements: + For all platforms, cmake 3.9+ + Linux and MacOS + gcc: 5.3+, 6.3+, 7.3+, all versions after 8.1+ + clang: 3.9+ + Intel compiler: 2017+ + Apple LLVM: 8.0+ + CUDA module: CUDA 9.0+ + HIP module: ROCm 2.8+ + Windows + MinGW and Cygwin: gcc 5.3+, 6.3+, 7.3+, all versions after 8.1+ + Microsoft Visual Studio: VS 2017 15.7+ + CUDA module: CUDA 9.0+, Microsoft Visual Studio + OpenMP module: MinGW or Cygwin. The current known issues can be found in the [known issues page](https://github.com/ginkgo-project/ginkgo/wiki/Known-Issues). Additions: + Add paper for Journal of Open Source Software (JOSS). [#479](#479) + Add a DiagonalExtractable interface. [#563](#563) + Add a new diagonal Matrix Format. [#580](#580) + Add Cuda11 support. [#603](#603) + Add information output after CMake configuration. [#610](#610) + Add a new preconditioner export example. [#595](#595) + Add a new cuda-memcheck CI job. [#592](#592) Changes: + Use unified memory in CUDA debug builds. [#621](#621) + Improve `BENCHMARKING.md` with more detailed info. [#619](#619) + Use C++14 standard instead of C++11. [#611](#611) + Update the Ampere sm information and CudaArchitectureSelector. [#588](#588) Fixes: + Fix documentation warnings and errors. [#624](#624) + Fix warnings for diagonal matrix format. [#622](#622) + Fix criterion factory parameters in CUDA. [#586](#586) + Fix the norm-type in the examples. [#612](#612) + Fix the WAW race in OpenMP is_sorted_by_column_index. [#617](#617) + Fix the example's exec_map by creating the executor only if requested. [#602](#602) + Fix some CMake warnings. [#614](#614) + Fix Windows building documentation. [#601](#601) + Warn when CXX and CUDA host compiler do not match. [#607](#607) + Fix reduce_add, prefix_sum, and doc-build. [#593](#593) + Fix find_library(cublas) issue on machines installing multiple cuda. [#591](#591) + Fix allocator in sellp read. [#589](#589) + Fix the CAS with HIP and NVIDIA backends. [#585](#585) Deletions: + Remove unused preconditioner parameter in LowerTrs. [#587](#587) Related PR: #627
Upgrade Ginkgo from C++11 standard to C++14.
There are multiple reasons for this:
What changed:
std_extensions
to use implementation from C++14 instead of the custom made one.xstd
tostd
when the feature used was a C++14 feature.Closes #604