mAarnos/Hakkapeliitta

crush after make & run

LocutusOfPenguin opened this issue · 7 comments

Hello,
I get following error just after "make" & "run":

Hakkapeliitta 3.0 (C) 2013-2015 Mikko Aarnos
Detected 8 CPU core(s)
Detected hardware POPCNT
terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
Abgebrochen (Speicherabzug geschrieben)

What to do?

Seems i have to change in Makefile:

g++ $(FLAGS) $(FILES) -o Hakkapeliitta

to:

g++ -c $(FILES) $(FLAGS)
g++ $(FILES) -o Hakkapeliitta -pthread -std=c++11

I'm not an expert in pthread. Now, its working.

Could you provide information on the OS you are using? Also, could you try compiling the code with clang++ (just replace g++ with clang++ in the original makefile) and reporting the results?

Ubuntu 14.04 & i cant install clang++ ...sorry.

see also here:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1228201

When i do as said:
FLAGS = -pthread -std=c++11 -Ofast -Wall -flto -march=native -s -DNDEBUG -Wl,--no-as-needed
also works.

Yes, it seems that the cause of the problem is the GCC bug you mentioned, and adding "-Wl,--no-as-needed" seems to be the correct fix. I've updated the makefile. Could you confirm whether the new makefile in the repository has fixed the issue?

yes..working => close

But i see some other stuff (i dont know, if this is an error):
depth 10 seldepth 9 score cp 22 upperbound time 17 nodes 48299 nps 2683000 tbhits 0 pv d7d5 e4e5

There are TWO spaces after "upperbound/lowerbound" ...That right now crushes the python-chess-lib. I also post an issue there.

I just pushed a commit which should fix the double whitespace problem.