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

CrazyAra ignoring my UCI "Threads" option #35

Closed
thomas-daniels opened this issue Aug 27, 2019 · 2 comments
Closed

CrazyAra ignoring my UCI "Threads" option #35

thomas-daniels opened this issue Aug 27, 2019 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@thomas-daniels
Copy link

Because the CUDA version with cpu as Context did already work so far, I decided to try that already. I set the number of threads to use to one (same problem appears when picking 2 threads, didn't test for other values).

uci
setoption name Context value cpu
setoption name Threads value 1
isready
go movetime 5000

Screenshot from 2019-08-27 21-50-53

As confirmed with both htop and the System Monitor, CrazyAra takes up 100% of all my cores when thinking of a move, but that really shouldn't happen if I only specify one thread.

@QueensGambit
Copy link
Owner

Yes, that phenomena probably needs further explanation.
CrazyAra will only use one thread for the MCTS tree management and tree traversal if Threads is set to 1.
However, the MXNet library will require as many threads as there are available on the system.
You need to set MXNET_OMP_MAX_THREADS and maybe also MXNET_CPU_PRIORITY_NTHREADS and MXNET_CPU_NNPACK_NTHREADS to 1 in order to only use one thread for the neural network inference.

The neural network inference requires the majority of the computational effort, especially for deeper more complex models.

Further information can be found here:

@thomas-daniels
Copy link
Author

Ah yes, setting those and OMP_NUM_THREADS to 1 did the trick.

@QueensGambit QueensGambit self-assigned this Aug 27, 2019
@QueensGambit QueensGambit transferred this issue from QueensGambit/CrazyAra-Engine Jan 22, 2020
@QueensGambit QueensGambit added the question Further information is requested label Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants