-
Notifications
You must be signed in to change notification settings - Fork 74
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
Remove Core Boost Dependency #481
Comments
I beg to differ. First of all, it is not the fault of boost, that it breaks notoriously with some compilers, but most of the time the fault of these compilers. As different libraries often use the same approach we are also very likely to run into the same problems with each of them. Instead of the chance to use a preinstalled boost version which every hpc system has plenty of, we damn the users to install just another template only library nearly no hpc system has available at default (like Catch2 or Brigand). If you want to replace I don't see the alpaka test cases as a crucial part of the library. It is important for our CI, but for users the alpaka examples are way more important. So I would use for testing whatever suits best and somebody has experience in, so we can easily add more tests to make alpaka more bug prove. |
chicken-egg question but boost lacks coverage, seldomly backports and has a long turn-around for fixes (half a year+). Do to the lack of coverage, previously fixed compilers have often be broken in new releases again (that's a boost issue, not a compiler issue).
Sorry, bot 50% HPC systems do not have a preinstalled boost and they do not have the latest version not the proper C++ standard flavor, etc.. The reason your HPC world has them is that I trigger the TU Dresden and HZDR Admins on the day of releases of Boost to build it for us.
No, we will ship those internally. See the "amalgated header" note. My goal is less (=0) pre-installed dependencies (that have nothing to do with the selected accelerator), not more. On install one can still decide to use an external dependency via CMake switches, but by default things just work.
Maybe, but we need functionality that is more than basic in some places, such as folds that need to be performant.
Exactly, that's an optional dependency anyway and I still would get rid of Boost.Test for various reasons. It's old (tons of work-arounds for C++98 do not make it more stable), slow, same compiler issues as the rest of boost and it has unfixed issues at least on OSX that I debugged for days. Experience with Catch2: Please see the link I posted. We have experience with it, use it permanently in other projects, integrate it already into CMake and CI just as Boost.Test and switching existing tests is super easy and extending after it's in place (copy paste from openPMD-api) as well. |
@trudeaun Hi Nicole, thank you for contacting us! Sorry for the little delay, we had two holidays this week in Germany and are catching up :) For us as alpaka developers and maintainers, our main concern is to find a balance between self-implementation and re-use of generic parts of the library. The main problem we face too often in HPC is that dependencies that are not primarily tested on HPC systems cause us trouble in both installing and using them. Since our targets are compilers like XL for OpenPOWER machines (e.g. Summit), and we see splendid performance with XL, we want to make sure this plays well with our dependencies. With boost itself the following issues are scary that we would like to address:
|
@ax3l Hi Axel, thanks very much for this detailed response! Glad to see that XL demonstrated some good results for you, and for sharing that article with us. You might see an accepted answer here for some more information about our future C++ standard support.
|
@trudeaun thank you very much for the detailed response as well! It's great to read XL is incorporating clang front-end technology. Currently, boost still works with C++98 and there are very recent ideas to move it to C++11 only (which is a good plan to get rid of a lot of work-arounds, legacy code and inefficient implementations). So XL should fit into integration as long as all workaround-configs can be expressed (usually via defines in boost config headers). XL CE via your docker image is a great idea! At least for alpaka, our travis builds are now based on docker images anyway. Have you already considered contributing XL CE to http://spack.io/ as well? We can assist you with it if you like, as we plan to use it on many HPC machines (icc example) and I also use it for CI on GitHub. Great to hear the |
@ax3l http://spack.io seems to be making use of our XL CE already, and I can see from github that they are already integrating our latest release, V16.1. I can see if we can add more recent boost versions into our acceptance tests. As for upstreaming the patches to boost, many years ago we used to do this, but in recent years, due to the long delay and large effort required by IBM and boost for their upstreaming process, we decided to publish the patches ourselves instead. |
spack: yes, it recognizes the compiler if present, but we could also add the install :) (link above) Patches for more recent versions would be fantastic, thank you for your efforts! Yes, ideally we would just describe the limitations as config files and add CI to keep it clean. In the patches you describe (ftp://public.dhe.ibm.com/software/xlcpp/boost/bst1590/boost_modfile_le_1316.txt) for the last tested boost release, I see a domination of defined(__IBMCPP__) && !defined(__ibmxl__) groups. I think from the current patch on your homepage and the dominance on identifier-only changes we have a great chance to upstream a lot via a |
@ax3l Sorry, I missed the icc link the first time. Let me look into adding the XL install into spack - great idea! As far as I know,
|
Just grepped over the repo and found the following uses of boost:
|
|
For windows we could use https://docs.microsoft.com/de-de/cpp/c-runtime-library/reference/aligned-malloc?view=vs-2019 |
boost |
Perfect, the compiler predefs we should be able to re-build based on set defines. |
We have a new dependency: Boost.Atomic. Right now this is non-optional but can easily be turned into an optional dependency. |
This issue is just to trigger a discussion and to have a look around.
I personally think that, independent of Boost, Alpaka will provide the best user experience if there are zero pre-installed dependencies required to start if. "Zero" not accounting for the accelerator (CUDA, Fiber, TBB, ...). That does not mean we have no third-party dependencies, but we should take ones that we can auto-download in CMake and/or ship.
Pessimistic View
Boost is a heavy and unstable dependency, which is notoriously breaking with CUDA and HPC compilers such as XL. It's internal dependencies are not cleanly exposed and can change for each release. Proper CMake support is still in the making. It adds to the complexity to get started with alpaka and dependencies of header-only libs like alpaka are generally very nasty.
Besides the optional fiber backend - which is totally fine if it pulls boost - I would propose to lighten the burden of dependencies in Alpaka. The core alpaka library should therefore get rid of it.
Boost.Tests can be replaced with the stand-alone and modern Catch2 library - we use it in two projects already and it works wonderful and switching is easy:
openPMD/openPMD-api#110 (done now in #712)
Compiler detection and macros such as ignore unused (done now in #584) and class member aligns can be easily re-implemented.
Instead of mp11 #459 we could use Brigand which is also used in large projects such as vtk-m:
https://gitlab.kitware.com/vtk/vtk-m/commits/master/vtkm/internal/brigand.hpp
or other libs that are active, standalone, with good test and compiler coverage and well-maintained. Many of those also contain so-called "amalgated" single-headers (as the vtk-m link above is based on this).
Optimistic View
Should we even more deepen our boost-involvement with more pushes to native
nvcc
&clang -x cuda
support in configs, tests, build system (legacy, new) and libraries?The text was updated successfully, but these errors were encountered: