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

[CMake] add liburing build option #5919

Merged
merged 32 commits into from Aug 11, 2020
Merged

Conversation

mxxo
Copy link
Collaborator

@mxxo mxxo commented Jun 23, 2020

This PR allows us to use liburing, the "application-level" interface to io_uring, the new Linux kernel IO interface.
liburing takes care of many of the low-level details (e.g. mmap calls, barriers) required to correctly use io_uring.

io_uring is supported on Linux kernels 5.1 and up, but it's up to the user to download and install liburing themselves, either from source (make && make install) or through a package manager.

The rationale for including liburing in ROOT is to experiment with io_uring's parallel, async IO features. This may drive performance improvements in low-level IO.

I based the CMake changes on how jemalloc is handled. I am not very experienced with CMake and would be happy to find out that I've done something wrong here. We need to able to include (at least) two liburing header files and link against the shared library, namely

  • #include "liburing.h"
  • #include "liburing/io_uring.h"
  • liburing.so

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

@phsft-bot
Copy link
Collaborator

Build failed on windows10/cxx14.
Running on null:C:\build\workspace\root-pullrequests-build
See cdash.
See console output.

@jblomer
Copy link
Contributor

jblomer commented Jun 25, 2020

Looks good to me but I'd like to pass approval to someone with more experience on the build system, @oshadura or @pcanal?

Copy link
Contributor

@oshadura oshadura left a comment

Choose a reason for hiding this comment

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

Nice job! I have other suggestions how to improve a bit more build system, but I think it will be in next iteration of review :)

@@ -0,0 +1,23 @@
# Copyright (C) 1995-2020, Rene Brun and Fons Rademakers.
Copy link
Contributor

Choose a reason for hiding this comment

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

cmake/modules/SearchInstalledSoftware.cmake Show resolved Hide resolved
cmake/modules/SearchInstalledSoftware.cmake Outdated Show resolved Hide resolved
cmake/modules/RootBuildOptions.cmake Outdated Show resolved Hide resolved
@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@mxxo mxxo requested a review from oshadura June 26, 2020 16:34
@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on windows10/cxx14.
See cdash.
See console output.

@phsft-bot
Copy link
Collaborator

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-debian10-i386/cxx14.
Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on windows10/cxx14.
See cdash.
See console output.

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on windows10/cxx14.
See cdash.
See console output.

@phsft-bot
Copy link
Collaborator

Build failed on mac1015/cxx17.
Running on macphsft18.dyndns.cern.ch:/Users/sftnight/build/jenkins/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-debian10-i386/cxx14.
Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link
Collaborator

Build failed on mac1014/python3.
Running on macphsft17.dyndns.cern.ch:/build/jenkins/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-performance-centos7-multicore/default.
Running on olhswep22.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-fedora31/noimt.
Running on root-fedora-31-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on windows10/cxx14.
See cdash.
See console output.

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-fedora31/noimt.
Running on root-fedora-31-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-performance-centos7-multicore/default.
Running on olhswep22.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link
Collaborator

Build failed on mac1015/cxx17.
Running on macphsft18.dyndns.cern.ch:/Users/sftnight/build/jenkins/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-fedora30/cxx14.
Running on root-fedora30-1.cern.ch:/build/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@Axel-Naumann
Copy link
Member

All errors seem unrelated. @etejedor will hopefully look at the Python errors when he's back. And I haven't seen the cling symbol errors in my PR - which is why I merged it, and apparently I broke cling :-( I'll have to debug tomorrow...

@phsft-bot
Copy link
Collaborator

Build failed on mac1014/python3.
Running on macitois21.cern.ch:/build/jenkins/workspace/root-pullrequests-build
See cdash.
See console output.

Failing tests:

@@ -9,3 +9,6 @@ ROOT_ADD_GTEST(TFile TFileTests.cxx LIBRARIES RIO)
ROOT_ADD_GTEST(TBufferMerger TBufferMerger.cxx LIBRARIES RIO Imt Tree)
ROOT_ADD_GTEST(TFileMerger TFileMergerTests.cxx LIBRARIES RIO Tree)
ROOT_ADD_GTEST(TROMemFile TROMemFileTests.cxx LIBRARIES RIO Tree)
if(uring AND NOT DEFINED ENV{ROOTTEST_IGNORE_URING})
ROOT_ADD_GTEST(RIoUring RIoUring.cxx LIBRARIES RIO uring)
Copy link
Member

Choose a reason for hiding this comment

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

Isn't uring inherited through RIO? I'd hope that you don't need to spell out LIBRARIES uring here:

Suggested change
ROOT_ADD_GTEST(RIoUring RIoUring.cxx LIBRARIES RIO uring)
ROOT_ADD_GTEST(RIoUring RIoUring.cxx LIBRARIES RIO)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The missing piece here is that I didn't make target_link_libraries PUBLIC instead of PRIVATE. I think it is fixed in 23d2a9f

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14
How to customize builds

@mxxo
Copy link
Collaborator Author

mxxo commented Aug 5, 2020

@phsft-bot build also on ROOT-fedora32/default with flags -During=ON

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-fedora32/default, ROOT-debian10-i386/cxx14, ROOT-performance-centos7-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac1015/cxx17, windows10/cxx14 with flags -During=ON
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-fedora30/cxx14.
Running on root-fedora30-1.cern.ch:/build/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-08-05T12:41:56.690Z] CMake Error at cmake/modules/SearchInstalledSoftware.cmake:1143 (message):
  • [2020-08-05T12:41:56.690Z] CMake Error at /build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1048 (message):

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-fedora31/noimt.
Running on root-fedora-31-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-08-05T12:41:59.944Z] CMake Error at cmake/modules/SearchInstalledSoftware.cmake:1143 (message):
  • [2020-08-05T12:41:59.944Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1048 (message):

@mxxo
Copy link
Collaborator Author

mxxo commented Aug 5, 2020

build also on ROOT-fedora32/default with flags -During=ON

I thought this would only build fedora32 with uring, sorry about that

@mxxo mxxo requested a review from Axel-Naumann August 5, 2020 12:44
@Axel-Naumann
Copy link
Member

Axel-Naumann commented Aug 5, 2020

NP! FYI that's just inplace of also. But it's good you tried to build everywhere, to check the config failure!

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-fedora32/default.
Running on root-fedora32-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See cdash.
See console output.

Warnings:

  • [2020-08-05T12:43:36.840Z] include/Vc/scalar/vector.h:218:55: warning: ‘V2 Vc_1::Vector<T, Vc_1::VectorAbi::Scalar>::reinterpretCast() const’ is deprecated: use reinterpret_components_cast instead [-Wdeprecated-declarations]
  • [2020-08-05T12:43:37.114Z] include/Vc/scalar/vector.h:218:55: warning: ‘V2 Vc_1::Vector<T, Vc_1::VectorAbi::Scalar>::reinterpretCast() const’ is deprecated: use reinterpret_components_cast instead [-Wdeprecated-declarations]
  • [2020-08-05T12:47:22.990Z] include/Vc/scalar/vector.h:218:55: warning: ‘V2 Vc_1::Vector<T, Vc_1::VectorAbi::Scalar>::reinterpretCast() const’ is deprecated: use reinterpret_components_cast instead [-Wdeprecated-declarations]
  • [2020-08-05T12:48:03.868Z] math/unuran/unuran-1.8.0-root/src/methods/mvtdr_init.ch:886:17: warning: argument 1 value ‘18446744073709551608’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]

Failing tests:

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-debian10-i386/cxx14.
Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-08-05T13:13:27.086Z] CMake Error at cmake/modules/SearchInstalledSoftware.cmake:1143 (message):
  • [2020-08-05T13:13:27.086Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1048 (message):

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-performance-centos7-multicore/default.
Running on olhswep22.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-08-05T13:15:01.332Z] CMake Error at cmake/modules/SearchInstalledSoftware.cmake:1143 (message):
  • [2020-08-05T13:15:01.332Z] CMake Error at /data/sftnight/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1048 (message):

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-ubuntu16/nortcxxmod.
Running on sft-ubuntu-1604-4.cern.ch:/build/workspace/root-pullrequests-build
See cdash.
See console output.

Errors:

  • [2020-08-05T14:05:34.695Z] CMake Error at cmake/modules/SearchInstalledSoftware.cmake:1143 (message):
  • [2020-08-05T14:05:34.695Z] CMake Error at /mnt/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1048 (message):

@mxxo
Copy link
Collaborator Author

mxxo commented Aug 6, 2020

@Axel-Naumann the tests on fedora32 look good, and all the other linux nodes "failed successfully" during the configuration search :)

@Axel-Naumann
Copy link
Member

Thanks, Max. Do you want me to merge or do you prefer to wait for Jakob?

@mxxo
Copy link
Collaborator Author

mxxo commented Aug 6, 2020

I am definitely OK waiting for Jakob. I believe all the outstanding issues are fixed up, but waiting one more day doesn't block anything (I can keep going on my local branch and make a new PR for that).

Copy link
Contributor

@jblomer jblomer left a comment

Choose a reason for hiding this comment

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

Looks good to me! Can't wait to benchmark SSD performance with and without async I/O.

@jblomer
Copy link
Contributor

jblomer commented Aug 10, 2020

@Axel-Naumann I think all is addressed, please approve if it looks good to you

@jblomer jblomer merged commit 1dea761 into root-project:master Aug 11, 2020
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.

None yet

5 participants