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

fix: maxp crashes with more than 1 threads #7

Merged
merged 1 commit into from
Jul 1, 2023
Merged

Conversation

lixun910
Copy link
Member

@lixun910 lixun910 commented Jul 1, 2023

The max-p functions run in parallel using threads. There is a bug that pthread_join() has been called on different numbers of threads that have been created via pthread_create() and stored in threadPool[].

In details, the tot_threads could be a smaller number than nCPUs which is setup by users vis cpu_threads, therefore the size of threadPool[] should be tot_threads instead of nCPUs.

Ref crashes in rgeoda:
GeoDaCenter/rgeoda#39
GeoDaCenter/rgeoda#38
GeoDaCenter/rgeoda#33
GeoDaCenter/rgeoda#27

@lixun910 lixun910 merged commit b512f74 into main Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant