Skip to content

CRNLIB_ASSERT(num_threads <= cMaxThreads) fails on many-proc computersΒ #39

@shinymerlyn

Description

@shinymerlyn

I managed to "fix" this locally by bumping the cMaxThreads value in crn_threading_win32.h to 64.
Is it safe to bump this? Is it just for a sanity check, or are other things driven by it somehow?

Note: Could be this is a bug in an old version of the library. Haven't tried to repro on latest main branch here, since this is a very legacy project.

The offending line seems to be:
https://github.com/BinomialLLC/crunch/blob/master/crnlib/crn_image_utils.cpp#L605
It's not using the crn_get_max_helper_threads function when calling task_pool tp; tp.init(g_number_of_processors - 1);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions