Coder Social home page Coder Social logo

Comments (8)

jeffreyan11 avatar jeffreyan11 commented on August 20, 2024

You can send a "stop" before a "quit" to fix this. I will also fix it soon, I've just put it off because I haven't seen a GUI have problems with it yet.

from laser-chess-engine.

noobpwnftw avatar noobpwnftw commented on August 20, 2024

The hanging issue is not resolved by the recent commit.

from laser-chess-engine.

jeffreyan11 avatar jeffreyan11 commented on August 20, 2024

Hm, so the problem is not what I thought. It happens when cutechess cancels the match while a search is running? Does cutechess send stop before quit? Do you have logs?

from laser-chess-engine.

AndyGrant avatar AndyGrant commented on August 20, 2024

So I ran a set with logging. No output from cutechess about stop/quit here.

In this case I ran with concurrency=1, after the server tells cutechess to quit, half or all copies of master are left running. AND they are running at 100% CPU.

Running your engine normally, so long as not searching, CPU usage is hardly enough to even make its way to the top view. This means after cutechess exits, you have a searching thread still running, despite the main input reader being dead.

I have done ps -T -p <pid> on the "dead" copies of Laser. I can clearly see only one thread running. When running your engine normally, sending go infinite, I can then of course see the 2 threads using ps -T -p <pid>

I'm not familiar with c++ threading, but you need to have your threads connected back to the main one in some way.

from laser-chess-engine.

AndyGrant avatar AndyGrant commented on August 20, 2024

Assuming that cutechess is ACTUALLY sending a quit command to Laser (and not reporting it), all you might need to do is ensure that the search thread is joined before termination.

from laser-chess-engine.

AndyGrant avatar AndyGrant commented on August 20, 2024

See https://stackoverflow.com/questions/3756882/detached-vs-joinable-posix-threads and https://stackoverflow.com/questions/25655706/how-to-terminate-or-stop-a-detached-thread-in-c

from laser-chess-engine.

AndyGrant avatar AndyGrant commented on August 20, 2024

Have you looked any further into this? I tried a few things which in some cases suggested progress, other cases nothing.

from laser-chess-engine.

laldon avatar laldon commented on August 20, 2024

bump @jeffreyan11 @AndyGrant

from laser-chess-engine.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.