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

Bug fix and some tests #1948

Merged
merged 25 commits into from
Sep 26, 2024
Merged

Bug fix and some tests #1948

merged 25 commits into from
Sep 26, 2024

Conversation

galabovaa
Copy link
Contributor

@galabovaa galabovaa commented Sep 24, 2024

  • Fixes deadlock issue on windows
    • Updates to HighsTaskExecutor
  • Adds sanitizers in CMake
    • Linux only so far
    • Workflow WIP
  • Fixes cmake regex error for githash

mathgeekcoder and others added 25 commits September 12, 2024 17:40
Removes synchronization with worker threads on shutdown. Also removes the "search" for the main executor in the worker threads.

Instead we simply pass the main executor to the thread as a parameter.  We also pass the underlying shared_ptr to avoid potential edge cases where reference count drops to zero before some threads initialize.

I made the run_worker static to avoid any confusion about "this" vs "executor->ptr", and so it uses the shared_ptr to reference the shared memory.

The last worker thread will delete the shared memory, via the shared_ptr reference count.
…ensure shared memory is kept alive until all threads have finished.

Changed identification of main thread to use std::thread::id rather than thread_local memory pointer.

Added vector of workerThreads which can be detached or joined on shutdown.

Ensured that shutdown can only block if called on main thread, otherwise it might be possible to deadlock.

Manually using cache_aligned memory allocation, it was used previously with shared_ptr and I wanted to keep it just in case.

Note: I had some weird issues when compiling with /MD flag with mvsc.  It would run but often crash.  /MT flag works consistently for me.
Copy link
Sponsor Member

@jajhall jajhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no way that I can make any comment on this!

I have to trust you and Leona!

@galabovaa galabovaa merged commit d686d01 into latest Sep 26, 2024
250 checks passed
@galabovaa galabovaa deleted the hanging-issue branch October 2, 2024 11:07
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.

3 participants