You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is currently possible to limit the number of threads with the OMP_NUM_THREADS environment variable. This is most useful when calling flatter from the command line. If you're calling flatter as a library, you can pass the maximum number of threads to the constructor of the ComputationContext object, which will limit the number of threads in the same way.
The OMP_NUM_THREADS syntax seems to be common practice for programs using OpenMP, but it's hard to discover if you don't dig into the internals. Since multiple users have asked about limiting threads, I think it makes sense to add this as an optional command line argument.
Flatter seems to always occupy all the threads avaliable: https://github.com/keeganryan/flatter/blob/500e31df6b7308e8101b2a4a9cc816bf8f483417/src/computation_context.cpp#L10C20-L10C39. It would have been an important improvement if flatter had an option to cap the amount of threads.
The text was updated successfully, but these errors were encountered: