-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Increase thread stack for OS X #2035
Conversation
On OSX threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. No bench change.
This is illegal, although practically it works. But be a good C++ citizens and do it the proper way. No functiona change.
start_routine() is called at random time, possibly after we exit NativeThread() c'tor, so ensure our pair of arguments don't go out of scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like a good option to me
src/thread_win32.h
Outdated
@@ -67,4 +67,47 @@ typedef std::condition_variable ConditionVariable; | |||
|
|||
#endif | |||
|
|||
#if !defined(_MSC_VER) // defined(__APPLE__) FIXME when done with testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIXME... APPLE only?
And rename the files accordingly.
The proposed patch addresses the issue on macOS on the initial position where this issue was discovered using 23 threads , Stockfish ran for nearly 15 minutes benfore I stopped it. Previously it had generally crashed under 60 seconds.
|
@MichaelB7 Thank you for confirming! |
Looks good to me |
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
Do no LMR for the first four moves if at root node. STC: LLR: 2.95 (-2.94,2.94) [0.50,4.50] Total: 19686 W: 4524 L: 4261 D: 10901 http://tests.stockfishchess.org/tests/view/5cd3577b0ebc5925cf04a089 LTC: LLR: 2.95 (-2.94,2.94) [0.00,3.50] Total: 88335 W: 15193 L: 14766 D: 58376 http://tests.stockfishchess.org/tests/view/5cd35e600ebc5925cf04a1c3 Bench: 3184182
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OS X threads other than the main thread are created with a reduced stack size of 512KB by default, this is dangerously low for deep searches, so adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with proper stack size parameter. Verified for no regression at STC enabling the patch on all platforms where pthread is supported. LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 50873 W: 9768 L: 9700 D: 31405 No functional change.
On OSX threads other than the main thread are created with a reduced stack
size of 512KB by default, this is dangerously low for deep searches, so
adjust it to TH_STACK_SIZE. The implementation calls pthread_create() with
proper stack size parameter.
Verified for no regression at STC enabling the patch on all platforms where
pthread is supported.
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 50873 W: 9768 L: 9700 D: 31405
No functional change.