Skip to content

RooFit::MultiProcess & TestStatistics part 2: ZeroMQ#8385

Closed
egpbos wants to merge 15 commits into
root-project:masterfrom
roofit-dev:RooFit_MultiProcess_PR_2_ZMQ_MultiProcess
Closed

RooFit::MultiProcess & TestStatistics part 2: ZeroMQ#8385
egpbos wants to merge 15 commits into
root-project:masterfrom
roofit-dev:RooFit_MultiProcess_PR_2_ZMQ_MultiProcess

Conversation

@egpbos

@egpbos egpbos commented Jun 9, 2021

Copy link
Copy Markdown
Contributor

This PR is the second part of a split and clean-up of #8294, as suggested by @guitargeek.

In this PR, we introduce three two packages: RooFit::MultiProcess, RooFitZMQ and a ZeroMQ builtin to ease dependency management.

RooFit::MultiProcess is a task-based parallelization framework.

It uses forked processes for parallelization, as opposed to threads. We chose this approach because A) the existing RooRealMPFE parallelization framework already made use of forks as well, so we had something to build on and B) it was at the time deemed infeasible to check the entire RooFit code for thread-safety. Moreover, we use MultiProcess to parallelize gradients -- i.e. the tasks to be executed in parallel are partial derivatives -- and these are sufficiently large tasks that communication in between tasks is not a big concern in the big fits that we aimed to parallelize.

Edit: We decided to keep this PR for ZeroMQ only, MultiProcess will come in a next PR.

The communication between processes is done using ZeroMQ. The ZeroMQ dependency is wrapped in convenience classes contributed by @roelaaij which here are packaged as RooFitZMQ.

Note: still working on "cherry picking" all changes and organizing them into functionally sensible commits. Will un-draft the PR once this is done. Ready for review.

@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot

Copy link
Copy Markdown

Build failed on mac11.0/cxx17.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Warnings:

  • [2021-06-09T15:08:28.614Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_ZeroMQ-prefix/src/BUILTIN_ZeroMQ/src/generic_mtrie_impl.hpp:52:46: warning: ISO C++ requires the name after '::' to be found in the same scope as the name before '::' [-Wdtor-name]
  • [2021-06-09T15:08:28.614Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_ZeroMQ-prefix/src/BUILTIN_ZeroMQ/src/polling_util.hpp:115:50: warning: unused parameter 'pollset_' [-Wunused-parameter]
  • [2021-06-09T15:08:28.614Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_ZeroMQ-prefix/src/BUILTIN_ZeroMQ/src/polling_util.hpp:115:50: warning: unused parameter 'pollset_' [-Wunused-parameter]
  • [2021-06-09T15:08:28.614Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_ZeroMQ-prefix/src/BUILTIN_ZeroMQ/src/polling_util.hpp:115:50: warning: unused parameter 'pollset_' [-Wunused-parameter]
  • [2021-06-09T15:08:28.614Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_ZeroMQ-prefix/src/BUILTIN_ZeroMQ/src/polling_util.hpp:115:50: warning: unused parameter 'pollset_' [-Wunused-parameter]
  • [2021-06-09T15:08:28.614Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_ZeroMQ-prefix/src/BUILTIN_ZeroMQ/src/generic_mtrie_impl.hpp:52:46: warning: ISO C++ requires the name after '::' to be found in the same scope as the name before '::' [-Wdtor-name]

@phsft-bot

Copy link
Copy Markdown

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

Warnings:

  • [2021-06-09T15:16:32.180Z] /Volumes/HD2/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_ZeroMQ-prefix/src/BUILTIN_ZeroMQ/src/polling_util.hpp:115:50: warning: unused parameter 'pollset_' [-Wunused-parameter]
  • [2021-06-09T15:16:32.180Z] /Volumes/HD2/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_ZeroMQ-prefix/src/BUILTIN_ZeroMQ/src/polling_util.hpp:115:50: warning: unused parameter 'pollset_' [-Wunused-parameter]
  • [2021-06-09T15:16:32.180Z] /Volumes/HD2/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_ZeroMQ-prefix/src/BUILTIN_ZeroMQ/src/polling_util.hpp:115:50: warning: unused parameter 'pollset_' [-Wunused-parameter]
  • [2021-06-09T15:16:32.180Z] /Volumes/HD2/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_ZeroMQ-prefix/src/BUILTIN_ZeroMQ/src/polling_util.hpp:115:50: warning: unused parameter 'pollset_' [-Wunused-parameter]

@egpbos

egpbos commented Jun 10, 2021

Copy link
Copy Markdown
Contributor Author

The unused parameter warnings would be fixed with this PR: zeromq/libzmq#4211

The dtor-name warnings are fixed in a later ZeroMQ version. I first want to include the RooFitZMQ and MultiProcess things before I start changing the ZeroMQ version, to avoid introducing potential errors already (didn't try it yet).

If a newer version doesn't work, I will suppress the warnings for now.

@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

The files in here are modified versions of the ZMQ convenience functions from https://gitlab.cern.ch/raaij/generate_and_sort, contributed by @roelaaij.
@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot

Copy link
Copy Markdown

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

Errors:

  • [2021-06-10T13:58:04.903Z] FAILED: cd /mnt/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_cppzmq-prefix/src/BUILTIN_cppzmq-build && /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/mnt/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_ZeroMQ-prefix -DCPPZMQ_BUILD_TESTS=OFF -GNinja /mnt/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_cppzmq-prefix/src/BUILTIN_cppzmq && /usr/bin/cmake -E touch /mnt/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_cppzmq-prefix/src/BUILTIN_cppzmq-stamp/BUILTIN_cppzmq-configure
  • [2021-06-10T13:58:04.903Z] CMake Error at CMakeLists.txt:21 (message):

@ghost

ghost commented Jun 10, 2021

Copy link
Copy Markdown

Congratulations 🎉. DeepCode analyzed your code in 2.363 seconds and we found no issues. Enjoy a moment of no bugs ☀️.

👉 View analysis in DeepCode’s Dashboard | Configure the bot

👉 The DeepCode service and API will be deprecated in August, 2021. Here is the information how to migrate. Thank you for using DeepCode 🙏 ❤️ !

If you are using our plugins, you might be interested in their successors: Snyk's JetBrains plugin and Snyk's VS Code plugin.

@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot

Copy link
Copy Markdown

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

Errors:

  • [2021-06-10T14:31:14.103Z] FAILED: cd /mnt/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_cppzmq-prefix/src/BUILTIN_cppzmq-build && /usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/mnt/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_ZeroMQ-prefix -DCPPZMQ_BUILD_TESTS=OFF -GNinja /mnt/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_cppzmq-prefix/src/BUILTIN_cppzmq && /usr/bin/cmake -E touch /mnt/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_cppzmq-prefix/src/BUILTIN_cppzmq-stamp/BUILTIN_cppzmq-configure
  • [2021-06-10T14:31:14.103Z] CMake Error at CMakeLists.txt:21 (message):

This is a reimplementation of ZMQ's poll function that mimics the POSIX ppoll function. The difference with regular poll is that ppoll blocks incoming POSIX signals, allowing graceful handling of these signals. We use this in RooFit::MultiProcess to shut down forked child processes.

The motivation behind this addition is discussed more in this blog post: https://blog.esciencecenter.nl/combining-zeromq-posix-signals-b754f6f29cd6, or more succinctly in Martin Sustrik's blog post, in the edit at the bottom: https://250bpm.com/blog:12/
@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot

Copy link
Copy Markdown

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

Errors:

  • [2021-06-10T15:01:01.244Z] FAILED: cd /mnt/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_cppzmq-prefix/src/BUILTIN_cppzmq-build && /usr/local/bin/cmake -DCMAKE_INSTALL_PREFIX=/mnt/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_ZeroMQ-prefix -DCPPZMQ_BUILD_TESTS=OFF -GNinja /mnt/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_cppzmq-prefix/src/BUILTIN_cppzmq && /usr/local/bin/cmake -E touch /mnt/build/workspace/root-pullrequests-build/build/roofit/builtin_zeromq/BUILTIN_cppzmq-prefix/src/BUILTIN_cppzmq-stamp/BUILTIN_cppzmq-configure
  • [2021-06-10T15:01:01.502Z] CMake Error at CMakeLists.txt:21 (message):

@phsft-bot

Copy link
Copy Markdown

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

Errors:

  • [2021-06-10T15:33:52.821Z] FAILED: roofit/builtin_zeromq/BUILTIN_cppzmq-prefix/src/BUILTIN_cppzmq-stamp/BUILTIN_cppzmq-configure
  • [2021-06-10T15:33:52.821Z] CMake Error at CMakeLists.txt:21 (message):

@phsft-bot

Copy link
Copy Markdown

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

Errors:

  • [2021-06-10T15:45:00.200Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/RooFit_ZMQ/ZeroMQSvc.h:185:46: error: no template named 'function' in namespace 'std'

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-performance-centos8-multicore/default.
Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-06-10T16:13:43.077Z] CMake Error at CMakeLists.txt:21 (message):

The option builtin_zeromq is set to ON by default and controls whether RooFitZMQ is built. At some point, we should also add the option to use a system installed ZeroMQ, so that people can avoid the built-in, if they wish, e.g. for the conda-forge build.
@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@egpbos egpbos marked this pull request as ready for review June 10, 2021 20:37
@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

This gets rid of deprecation warnings.
@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot

Copy link
Copy Markdown

@egpbos

egpbos commented Jun 24, 2021

Copy link
Copy Markdown
Contributor Author

I have fixed remaining build warnings and added installation of the ZMQ headers to the CI clang-tidy script, which seems to fix all CI builds. The JupyROOT failure is something in master, unrelated to this PR.

So, pending a review of @oshadura or @Axel-Naumann on the CMake built-in part, I think this PR should be ready for merging.

@amadio

amadio commented Jun 29, 2021

Copy link
Copy Markdown
Member

@egpbos Hi, I just landed here while trying to catch up with messages on Mattermost's Pull Requests channel... My advice is to write the builtin option last, after all work on adding roofitZMQ is done. First, please provide just an implementation using only an external version of ZeroMQ. Then, after that is done, you can add a separate commit that adds the builtin option for ZeroMQ. The builtin option should be optional and never enabled by default (See ROOT-9385 in Jira for more info). Building rootfitZMQ should not be controlled by the option that enables the builtin, but by its own option, which should respect the option fail-on-missing if that is enabled and ZeroMQ is not found in the system. I will review the changes again once you mark this PR as ready (just add me as a reviewer when done). I also recommend to clean up the git history a bit by rebasing and making each commit work on its own. For example, if you fixed an earlier commit with a newer one, I recommend using git commit --fixup=$hash, then git rebase -i to combine the changes into the commit that was broken rather than keeping the fix in a separate commit.

@egpbos

egpbos commented Jun 29, 2021

Copy link
Copy Markdown
Contributor Author

Thanks @amadio for the extensive input! Let me address it point by point:

First: the current choice for "built-in only".

The built-in is there for two reasons: 1) as a dependency, obviously, but 2) also because the full source is needed to build zmq::ppoll. ppoll was written as an extension to libzmq itself. In the ideal world, I would have committed this back to libzmq (which they are open to, and which I'll do later, see zeromq/libzmq#4220), but haven't had time yet. The interim solution is to just ship it with ROOT, but this requires (part of) the libzmq source to build against. We can do this in two ways: a) just include the necessary libzmq files or b) get them externally on the fly. I actually went with option a) first. However, when people started trying out this branch on their machines, it turned out that the conda libzmq build (which I was using in my dev setup) had a more favorable configuration than for instance most Linux native builds, especially because those native builds lack CMake configuration files. That latter fact made me decide to just make the built-in dependency the default; this way I wouldn't have to figure out how to best detect libzmq on each platform (or find / cobble together a good and freely licensed FindZeroMQ.cmake, but the general feeling around the ZeroMQ community is that this is a waste of effort, because the CMake config files that come along with libzmq itself already solve this finding problem; it's just unfortunate that the Linux distro's won't include them...). So in the end, because of time constraints, I made the choice to prioritize other things over putting a lot of effort into this dependency which will probably end up different in the near future anyway (because of the ppoll PR, which will make things a lot easier on the ROOT side).

So, long story, I hope it is clear. Do you think that given this (temporary) situation, the choice for built-in only is acceptable?

Then about the RooFitZMQ option: agreed, I should add an option for that. The only catch is that this PR is part of a bigger series and the "real" end-product that should be optional in my opinion is RooFit::MultiProcess, so I wanted to wait with such an option until that PR (hopefully I'll be able to submit that one today). In this PR, RooFitZMQ is not used for anything and later on it will just be a library for RooFit::MultiProcess as well, so there would typically not really be a point for a user to want to build RooFitZMQ but not RooFit::MultiProcess. Do you think in this situation it makes sense to add the option for RooFitZMQ already or should I just do it for RooFit::MultiProcess? So, this option (say -Droofit_multiprocess=ON) would activate both RooFit::MultiProcess and RooFitZMQ, and also builtin_zeromq.

I think that fail-on-missing is only relevant in case there would be a non built-in option as well, right?

Finally, about git history: makes sense. I can do some reordering before merging. Otherwise, just squashing everything would make sense to me as well. The two independent things here are basically 1) the zmq builtin and 2) RooFitZMQ itself. These could indeed just be two commits, but since nothing really depends on RooFitZMQ at this point, including it with the libzmq builtin in one commit I think would give a clean history as well.

@egpbos

egpbos commented Jun 29, 2021

Copy link
Copy Markdown
Contributor Author

the "real" end-product that should be optional in my opinion is RooFit::MultiProcess, so I wanted to wait with such an option until that PR

Sorry, now I'm mixing things up :) The MultiProcess PR was already made as well: #8412. Shall I add the correct build option there?

@lmoneta

lmoneta commented Jun 29, 2021

Copy link
Copy Markdown
Member

Hi,
Yes, I think it will be good to have the build option for RooFit::MultiProcess there. I think since for the time being we need to patch ZeroMQ, if I have understood well, we need to have the built-in solution. We can then change later on. We need however to be sure we do not export ZeroMQ symbols to avoid conflict with other code that need to use another installed version of ZeroMQ.

@egpbos

egpbos commented Jun 29, 2021

Copy link
Copy Markdown
Contributor Author

Indeed, we need to patch ZeroMQ.

The ZeroMQ symbols is a good point, I'm not sure about that. How can we check for this?

@Axel-Naumann

Copy link
Copy Markdown
Member

Indeed, we need to patch ZeroMQ.

Where do you do that? Can you show the location in the relevant PR?

@egpbos

egpbos commented Jun 29, 2021

Copy link
Copy Markdown
Contributor Author

@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@Axel-Naumann

Copy link
Copy Markdown
Member

The ZeroMQ symbols is a good point, I'm not sure about that. How can we check for this?

Load your RooFit libraries, then do

root [1] dlsym(0, "zmq_version")
(void *) nullptr

If that shows anything but nullptr then we have a problem. Inversely, we must protect your libzmq from user-libzmq semantic interposition. We need to build zmq in a special way, see #8204 on how to do that.

Bottom line: please use the system zmq. If that is impossible to pull off, then don't use zmq. Else things get extremely involved. We cannot merge this as is; or e.g. ALICE will be unable to use ROOT: they use RooFit and zmq themselves.

@Axel-Naumann

Copy link
Copy Markdown
Member

It's the ppoll.h/.cpp files:

But I thought you're linking to zmq, how do you replace these functions from zmq?

@egpbos

egpbos commented Jun 29, 2021

Copy link
Copy Markdown
Contributor Author

There's no replacement, it's an addition, I'm adding ppoll implementations, which do not exist in libzmq currently (they only have poll without the extra p).

@Axel-Naumann

Copy link
Copy Markdown
Member

Indeed, we need to patch ZeroMQ.

It's the ppoll.h/.cpp files:

So you're not patching? You can use a system libzmq?

@egpbos

egpbos commented Jun 29, 2021

Copy link
Copy Markdown
Contributor Author

That's right, I could (and did) use a system libzmq, except to build the ppoll file, I need to include a few headers from the libzmq source which are not distributed with Linux packages. Previously, I had included those headers with RooFitZMQ. I ripped them out again, because with the built-in they became unnecessary.

Edit: indeed, patching is probably not the right word, it's an addition, but it uses libzmq internal headers. Hope I'm making myself clear, sorry for the confusion.

@Axel-Naumann

Copy link
Copy Markdown
Member

OK I think this is problematic for the above (technical) issues that need to be solved before this can be merged (symbols leaking in and out), and for sustainability reasons, such as "your" zmq library having security issues - who will be aware of this and update our copy?

If someone proposes your addition to upstream zmq, once its integrated, and possibly slightly adjusted as part of the integration, who will sort out the differences, and how to we keep "old zmq + extension" and "new zmq" working?

IMO the right steps are:

  1. get your extension into zmq
  2. then we integrate your PR where we require a minimal zmq version which offers your new functions.

We can then use zmq as regular "builtin", i.e. we take the system one if it's new enough, else people can use the official package that we pull "into" ROOT.

@egpbos

egpbos commented Jun 29, 2021

Copy link
Copy Markdown
Contributor Author

I agree, that is the best way to go in theory.

In practice, I'm dealing with time constraints that will make this challenging. The timeline for including ppoll into libzmq would be a liability, because even though I'm not worried it will not be accepted (it is actually quite a simple addition, especially in the way that a libzmq maintainer suggests here), delaying this PR to wait for that one will probably result in extra merging efforts for the later RooFit PRs that depend on this one.

In any case, if this is the way we must go (and I can totally understand that you would want it this way), I will do my best to split up the other PRs as much as possible, so that those can be merged independently asap and merging conflicts will hopefully be minimized.

@phsft-bot

Copy link
Copy Markdown

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

Failing tests:

@amadio

amadio commented Jun 29, 2021

Copy link
Copy Markdown
Member

So, long story, I hope it is clear. Do you think that given this (temporary) situation, the choice for built-in only is acceptable?

Sorry, but no, this is not acceptable if you ask me. In fact, the need for a patched zeromq raises a big red flag as that may make it not possible to ever use a system version of zeromq if your pull request gets stuck. I agree with Axel that the right course of action is to add the needed functionality to zeromq directly first, then add this work to ROOT. I don't think that time constraints should be used as a way to get hackish code into ROOT. Alternatively, if your addition is really independent to zeromq, you could just add it to the RooFitZMQ library instead, so that you can use the system version of zeromq as is. If in a later version they add your new functionality, you can then adapt RooFitZMQ to that in a new pull request.

Then about the RooFitZMQ option: agreed, I should add an option for that. The only catch is that this PR is part of a bigger series and the "real" end-product that should be optional in my opinion is RooFit::MultiProcess, so I wanted to wait with such an option until that PR (hopefully I'll be able to submit that one today). In this PR, RooFitZMQ is not used for anything and later on it will just be a library for RooFit::MultiProcess as well, so there would typically not really be a point for a user to want to build RooFitZMQ but not RooFit::MultiProcess. Do you think in this situation it makes sense to add the option for RooFitZMQ already or should I just do it for RooFit::MultiProcess? So, this option (say -Droofit_multiprocess=ON) would activate both RooFit::MultiProcess and RooFitZMQ, and also builtin_zeromq.

If RooFitZMQ only makes sense as a support library for RooFit::MultiProcess, it's better to put them together in a single pull request. It will be much easier to ensure everything works together that way.

I think that fail-on-missing is only relevant in case there would be a non built-in option as well, right?

That is not what users generally think. They want fail-on-missing to work reliably and make configuration fail if a dependency cannot be met with system packages. The only exceptions to this rule should be LLVM/Clang.

Finally, about git history: makes sense. I can do some reordering before merging. Otherwise, just squashing everything would make sense to me as well. The two independent things here are basically 1) the zmq builtin and 2) RooFitZMQ itself. These could indeed just be two commits, but since nothing really depends on RooFitZMQ at this point, including it with the libzmq builtin in one commit I think would give a clean history as well.

Ok, as long as it's possible to use a vanilla zeromq, and the builtin addition is the last commit in the series, it should be ok.

@egpbos

egpbos commented Jun 29, 2021

Copy link
Copy Markdown
Contributor Author

If RooFitZMQ only makes sense as a support library for RooFit::MultiProcess, it's better to put them together in a single pull request.

Either way is fine by me. I could easily add the MultiProcess commits here as well, since the current MultiProcess branch is branched off this one anyway. I only separated them for clarity of discussion :)

@egpbos

egpbos commented Oct 6, 2021

Copy link
Copy Markdown
Contributor Author

Made obsolete by #9078.

@egpbos egpbos closed this Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants