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

error "Resource temporarily unavailable" when calculating hand by hand #16

Closed
olegkopy opened this issue Nov 28, 2018 · 0 comments
Closed

Comments

@olegkopy
Copy link

olegkopy commented Nov 28, 2018

Starting with two ranges, I want to calculate a matrix of hand equities, with individual hand-vs-hand values.

I do this simply in a double loop and constructing a length-2 vector of CardRange's, using 1 thread for each evaluation, like this :

for(h1 in range1){
   for(h2 in range2){
       ...
       std::vector<omp::CardRange> hands{h1, h2};

        eq.start(hands, board, 0, true, 5e-5, nullptr, 0.2, 1);
        eq.wait();
        auto r = eq.getResults();
   }
}

When running this on Linux, I sometimes get a runtime error

terminate called after throwing an instance of 'std::system_error'
what(): Resource temporarily unavailable

Which I assume has something to do with resource acquisition for the threads, although I don't understand how this happens considering I'm starting only 1 thread per caluclation and waiting for each to finish. Is it perhaps a more direct way to do hand-vs-hand evaluations without using the threading functionality?

@olegkopy olegkopy closed this as completed Dec 7, 2018
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

No branches or pull requests

1 participant