Skip to content
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

Intel compilation #337

Merged
merged 9 commits into from
Aug 21, 2019
Merged

Intel compilation #337

merged 9 commits into from
Aug 21, 2019

Conversation

tcojean
Copy link
Member

@tcojean tcojean commented Aug 19, 2019

This makes Ginkgo work with Intel compilers >= 2017.

It is hard to make this work with Intel compiler 2016 because they require very old GCC and Ubuntu versions for which Ginkgo has not been tested yet. Namely, GCC <= 5.1. In addition, creating GPU-enabled containers becomes harder.

Therefore, build and test jobs are added for all versions other than CUDA 9.0 with Intel compilers.

Here is a summary of what's in this PR:

  • By default, set CMAKE_CUDA_HOST_COMPILER to the C++ compiler.
  • Add container support for Intel compilers.
  • Fix several problems with Intel compilers 2018 and 2019.
    • Fix a problem of ambiguity of using unique_ptr instead of shared_ptr in
      par_ilu, which creates compilation failure with Intel 2018 compilers.
    • Fix a bug with Intel 2019 in the custom-logger example which cannot find the
      function std::defaultfloat for streams.
    • Include in composition.hpp the executor.hpp which is used by in this file
      to advertise the requirement.
  • Fix version bugs with Intel ICC 2017.
    • Add explicit constructor and destructors which are not automatically generated.
    • Fix some implicit unique_ptr to const vs unique_ptr to non const casting problems.
    • At least one combination of Intel and CUDA does not like the default is_finite
  • Update related READMEs.
  • Unrelated: remove benchmark and examples directories from coverage results as they somehow got included recently, see numbers in red column.

This closes #209. Thanks @balay for the reports.

@tcojean tcojean added is:bug Something looks wrong. reg:build This is related to the build system. reg:ci-cd This is related to the continuous integration system. 1:ST:ready-for-review This PR is ready for review plat:intel This is related to the Intel compilers. labels Aug 19, 2019
@tcojean tcojean self-assigned this Aug 19, 2019
Copy link
Member

@pratikvn pratikvn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@codecov
Copy link

codecov bot commented Aug 19, 2019

Codecov Report

Merging #337 into develop will increase coverage by 9.83%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #337      +/-   ##
===========================================
+ Coverage    88.41%   98.25%   +9.83%     
===========================================
  Files          258      233      -25     
  Lines        19835    17855    -1980     
===========================================
+ Hits         17537    17543       +6     
+ Misses        2298      312    -1986
Impacted Files Coverage Δ
include/ginkgo/core/base/math.hpp 93.1% <ø> (ø) ⬆️
include/ginkgo/core/base/composition.hpp 93.33% <ø> (ø) ⬆️
include/ginkgo/core/preconditioner/jacobi.hpp 98.59% <100%> (+0.06%) ⬆️
include/ginkgo/core/base/version.hpp 100% <100%> (ø) ⬆️
core/factorization/par_ilu.cpp 100% <100%> (ø) ⬆️
reference/test/factorization/par_ilu_kernels.cpp 98.45% <100%> (ø) ⬆️
examples/ginkgo-overhead/ginkgo-overhead.cpp
benchmark/utils/general.hpp
...ples/custom-matrix-format/custom-matrix-format.cpp
cuda/base/types.hpp
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef5c9c2...56922af. Read the comment docs.

+ When compiling with CUDA, it is advised to use as CUDA host compiler the Intel
  compiler.
+ Fix a problem of ambiguity of using `unique_ptr` instead of `shared_ptr` in
  par_ilu, which creates compilation failure with Intel 2018 compilers.
+ Fix a bug with Intel 2019 in the `custom-logger` example which cannot find the
  function `std::defaultfloat` for streams.
+ Include in `composition.hpp` the `executor.hpp` which is used by in this file
  to advertise the requirement.
The main bug is that this compiler is not able to construct this object without
explicitly declaring this constructor for both the version class and the storage
scheme class. In addition the version class constructor should be constexpr so
that `version` becomes a literal type which can be returned by a constexpr
function.

Also fix a unique_ptr to const vs unique_ptr to non const cast problem which
Intel 2017 cannot solve, and another unique_ptr of gko::LinOp vs actual
MatrixType.
Copy link
Member

@yhmtsai yhmtsai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@thoasm thoasm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just very minor comments.

dev_tools/containers/README.md Show resolved Hide resolved
examples/custom-logger/custom-logger.cpp Outdated Show resolved Hide resolved
@tcojean tcojean merged commit 93763f2 into develop Aug 21, 2019
@tcojean tcojean deleted the intel_compilation branch August 21, 2019 09:08
@tcojean tcojean added 1:ST:ready-to-merge This PR is ready to merge. and removed 1:ST:ready-for-review This PR is ready for review labels Aug 26, 2019
tcojean added a commit that referenced this pull request Oct 20, 2019
The Ginkgo team is proud to announce the new minor release of Ginkgo version
1.1.0. This release brings several performance improvements, adds Windows support, 
adds support for factorizations inside Ginkgo and a new ILU preconditioner
based on ParILU algorithm, among other things. For detailed information, check the respective issue.

Supported systems and requirements:
+ For all platforms, cmake 3.9+
+ Linux and MacOS
  + gcc: 5.3+, 6.3+, 7.3+, 8.1+
  + clang: 3.9+
  + Intel compiler: 2017+
  + Apple LLVM: 8.0+
  + CUDA module: CUDA 9.0+
+ Windows
  + MinGW and CygWin: gcc 5.3+, 6.3+, 7.3+, 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:
+ Upper and lower triangular solvers ([#327](#327), [#336](#336), [#341](#341), [#342](#342)) 
+ New factorization support in Ginkgo, and addition of the ParILU
  algorithm ([#305](#305), [#315](#315), [#319](#319), [#324](#324))
+ New ILU preconditioner ([#348](#348), [#353](#353))
+ Windows MinGW and Cygwin support ([#347](#347))
+ Windows Visual studio support ([#351](#351))
+ New example showing how to use ParILU as a preconditioner ([#358](#358))
+ New example on using loggers for debugging ([#360](#360))
+ Add two new 9pt and 27pt stencil examples ([#300](#300), [#306](#306))
+ Allow benchmarking CuSPARSE spmv formats through Ginkgo's benchmarks ([#303](#303))
+ New benchmark for sparse matrix format conversions ([#312](#312))
+ Add conversions between CSR and Hybrid formats ([#302](#302), [#310](#310))
+ Support for sorting rows in the CSR format by column idices ([#322](#322))
+ Addition of a CUDA COO SpMM kernel for improved performance ([#345](#345))
+ Addition of a LinOp to handle perturbations of the form (identity + scalar *
  basis * projector) ([#334](#334))
+ New sparsity matrix representation format with Reference and OpenMP
  kernels ([#349](#349), [#350](#350))

Fixes:
+ Accelerate GMRES solver for CUDA executor ([#363](#363))
+ Fix BiCGSTAB solver convergence ([#359](#359))
+ Fix CGS logging by reporting the residual for every sub iteration ([#328](#328))
+ Fix CSR,Dense->Sellp conversion's memory access violation ([#295](#295))
+ Accelerate CSR->Ell,Hybrid conversions on CUDA ([#313](#313), [#318](#318))
+ Fixed slowdown of COO SpMV on OpenMP ([#340](#340))
+ Fix gcc 6.4.0 internal compiler error ([#316](#316))
+ Fix compilation issue on Apple clang++ 10 ([#322](#322))
+ Make Ginkgo able to compile on Intel 2017 and above ([#337](#337))
+ Make the benchmarks spmv/solver use the same matrix formats ([#366](#366))
+ Fix self-written isfinite function ([#348](#348))
+ Fix Jacobi issues shown by cuda-memcheck

Tools and ecosystem:
+ Multiple improvements to the CI system and tools ([#296](#296), [#311](#311), [#365](#365))
+ Multiple improvements to the Ginkgo containers ([#328](#328), [#361](#361))
+ Add sonarqube analysis to Ginkgo ([#304](#304), [#308](#308), [#309](#309))
+ Add clang-tidy and iwyu support to Ginkgo ([#298](#298))
+ Improve Ginkgo's support of xSDK M12 policy by adding the `TPL_` arguments
  to CMake ([#300](#300))
+ Add support for the xSDK R7 policy ([#325](#325))
+ Fix examples in html documentation ([#367](#367))
tcojean added a commit that referenced this pull request Oct 21, 2019
The Ginkgo team is proud to announce the new minor release of Ginkgo version
1.1.0. This release brings several performance improvements, adds Windows support,
adds support for factorizations inside Ginkgo and a new ILU preconditioner
based on ParILU algorithm, among other things. For detailed information, check the respective issue.

Supported systems and requirements:
+ For all platforms, cmake 3.9+
+ Linux and MacOS
  + gcc: 5.3+, 6.3+, 7.3+, 8.1+
  + clang: 3.9+
  + Intel compiler: 2017+
  + Apple LLVM: 8.0+
  + CUDA module: CUDA 9.0+
+ Windows
  + MinGW and Cygwin: gcc 5.3+, 6.3+, 7.3+, 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
+ Upper and lower triangular solvers ([#327](#327), [#336](#336), [#341](#341), [#342](#342)) 
+ New factorization support in Ginkgo, and addition of the ParILU
  algorithm ([#305](#305), [#315](#315), [#319](#319), [#324](#324))
+ New ILU preconditioner ([#348](#348), [#353](#353))
+ Windows MinGW and Cygwin support ([#347](#347))
+ Windows Visual Studio support ([#351](#351))
+ New example showing how to use ParILU as a preconditioner ([#358](#358))
+ New example on using loggers for debugging ([#360](#360))
+ Add two new 9pt and 27pt stencil examples ([#300](#300), [#306](#306))
+ Allow benchmarking CuSPARSE spmv formats through Ginkgo's benchmarks ([#303](#303))
+ New benchmark for sparse matrix format conversions ([#312](#312))
+ Add conversions between CSR and Hybrid formats ([#302](#302), [#310](#310))
+ Support for sorting rows in the CSR format by column idices ([#322](#322))
+ Addition of a CUDA COO SpMM kernel for improved performance ([#345](#345))
+ Addition of a LinOp to handle perturbations of the form (identity + scalar *
  basis * projector) ([#334](#334))
+ New sparsity matrix representation format with Reference and OpenMP
  kernels ([#349](#349), [#350](#350))

### Fixes
+ Accelerate GMRES solver for CUDA executor ([#363](#363))
+ Fix BiCGSTAB solver convergence ([#359](#359))
+ Fix CGS logging by reporting the residual for every sub iteration ([#328](#328))
+ Fix CSR,Dense->Sellp conversion's memory access violation ([#295](#295))
+ Accelerate CSR->Ell,Hybrid conversions on CUDA ([#313](#313), [#318](#318))
+ Fixed slowdown of COO SpMV on OpenMP ([#340](#340))
+ Fix gcc 6.4.0 internal compiler error ([#316](#316))
+ Fix compilation issue on Apple clang++ 10 ([#322](#322))
+ Make Ginkgo able to compile on Intel 2017 and above ([#337](#337))
+ Make the benchmarks spmv/solver use the same matrix formats ([#366](#366))
+ Fix self-written isfinite function ([#348](#348))
+ Fix Jacobi issues shown by cuda-memcheck

### Tools and ecosystem improvements
+ Multiple improvements to the CI system and tools ([#296](#296), [#311](#311), [#365](#365))
+ Multiple improvements to the Ginkgo containers ([#328](#328), [#361](#361))
+ Add sonarqube analysis to Ginkgo ([#304](#304), [#308](#308), [#309](#309))
+ Add clang-tidy and iwyu support to Ginkgo ([#298](#298))
+ Improve Ginkgo's support of xSDK M12 policy by adding the `TPL_` arguments
  to CMake ([#300](#300))
+ Add support for the xSDK R7 policy ([#325](#325))
+ Fix examples in html documentation ([#367](#367))


Related PR: #370
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1:ST:ready-to-merge This PR is ready to merge. is:bug Something looks wrong. plat:intel This is related to the Intel compilers. reg:build This is related to the build system. reg:ci-cd This is related to the continuous integration system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compilation fails with Intel compiler.
4 participants