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

Provide build variants without TBB #146

Open
schmoelder opened this issue Aug 25, 2023 · 3 comments
Open

Provide build variants without TBB #146

schmoelder opened this issue Aug 25, 2023 · 3 comments

Comments

@schmoelder
Copy link
Contributor

schmoelder commented Aug 25, 2023

We recently had a discussion and came to the conclusion that it might be a good idea to not use TBB by default.

We found that in many situations on the "engineering" side of the accuracy spectrum, compute times are slower by a factor of up to 2 when building with TBB even if NTHREADS=1 and most users would rather parallelize "embarrassingly" by running multiple simulations in parallel instead of leveraging the benefit of parallelizing individual simulations.
So making this the default would make sense in my view.

We still want to explore whether it's possible to upload different versions to conda-forge s.t. users can set a flag to install a version with TBB. Maybe build variants are what we're looking fore.

Also, we should benchmark this. Maybe that's a job for @jbreue16 for when he comes back.

Edit: See also here for a discussion on build variants.

@schmoelder
Copy link
Contributor Author

After some thoughts, I believe that having two separate packages would actually be advantageous. This way, we could catch n_threads on a higher level (i.e. CADET-Process) and delegate to the corresponding library / cli / dll.

Alternatively, we could add an option to CMAKE to compile CADET-Core twice, once with TBB, once without TBB, then we wouldn't have to provide two packages. Not sure if this is a good idea, though.

@lieres
Copy link
Member

lieres commented Feb 11, 2025

I would still prefer to identify the root cause of the TBB issues and see if we can fix them. This had been postponed because @jbreue16 first wanted to get the 2D GRM with DG running before entering more detailed profiling.

@schmoelder
Copy link
Contributor Author

I understand. However, building CADET with TBB will always have a substantial overhead. So here we're talking about the situation where a simulation with n_cores=1 performed with CADET built with TBB will be significantly slower than the variant witout TBB (which obviously will also be n_cores=1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

5 participants