Intel I am. Curious that you don't think it'll work on Macs as that is Tord's primary platform. You been working hard at breaking it?mcostalba wrote:Thanks. I didn't imagined it works under Mac, please what processor you have? Intel or PowerPC ?krazyken wrote:I use Apple GCC 4.2 under Mac OS 10.5mcostalba wrote:
Please, what is the compiler used, under what OS and what is the command line?
I am very interested because me and the others developers have compiled with Intel /gcc (Linux) and MSVC (Windows) with warning level set to maximum but never hit this.
Thanks
Marco
I don't think Stockfish _as is_ works on big endian machines.
Stockfish 1.4, the final weapon
Moderators: hgm, Rebel, chrisw
Re: Stockfish 1.4, the final weapon
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: Stockfish 1.4, the final weapon
Yeskrazyken wrote: Intel I am. Curious that you don't think it'll work on Macs as that is Tord's primary platform. You been working hard at breaking it?
And I think I succeed. I have removed a lot of low level bitboard stuff (included the tweaks to make it work on Mac PowerPc) because I was going crazy to add some new code from Heinz: too much ifdef's and I really hate them, so I have scrapped all, monkey style.
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: Stockfish 1.4, the final weapon
Gian-Carlo Pascutto wrote:If I use the Linux version, even if I set it to 1 thread, it's hogging 2 CPUs, which of course completely handicaps the opponent engine.
hmmm can i ask if this happens on Linux only or also with Windows version ?
Re: Stockfish 1.4, the final weapon
It behaves OK on Mac. 1 Thread gives me 1 thread. I put a copy of the Mac binary up on my site
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: Stockfish 1.4, the final weapon
I have found this old threadmcostalba wrote:Gian-Carlo Pascutto wrote:If I use the Linux version, even if I set it to 1 thread, it's hogging 2 CPUs, which of course completely handicaps the opponent engine.
hmmm can i ask if this happens on Linux only or also with Windows version ?
http://www.talkchess.com/forum/viewtopi ... t&start=20
where it seems to occur the same problem with 1.01, indipendently Jim Ablett and George Speight found and fixed the problem, it was about use of pthreads, but I never knew the details. Perhaps they could share so that I can update the readme.txt with proper compile info for Linux.
BTW I cannot reproduce this behaviour on my Linux setup.
Thanks
Marco
-
- Posts: 1243
- Joined: Sat Dec 13, 2008 7:00 pm
Re: Stockfish 1.4, the final weapon
Hmm, me neither. I might have misinterpreted top's output. It was showing 100%, whereas normal engines only show 50%.mcostalba wrote: BTW I cannot reproduce this behaviour on my Linux setup.
Thanks
Marco
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: Stockfish 1.4, the final weapon
I think an easy test could be to set thread to 1 and then to 2 and see how nodes/sec increase (should almost double), so to be sure with thread nr = 1 you are actually working with one thread only.Gian-Carlo Pascutto wrote:Hmm, me neither. I might have misinterpreted top's output. It was showing 100%, whereas normal engines only show 50%.mcostalba wrote: BTW I cannot reproduce this behaviour on my Linux setup.
Thanks
Marco
-
- Posts: 536
- Joined: Thu Mar 09, 2006 12:53 am
Re: Stockfish 1.4, the final weapon
I also cannot reproduce this behavior on Linux (Ubuntu 9.04 currently).Gian-Carlo Pascutto wrote:Hmm, me neither. I might have misinterpreted top's output. It was showing 100%, whereas normal engines only show 50%.mcostalba wrote: BTW I cannot reproduce this behaviour on my Linux setup.
Thanks
Marco
Here is top output for Stockfish-1.4 with 1 CPU:
Code: Select all
Tasks: 175 total, 4 running, 171 sleeping, 0 stopped, 0 zombie
Cpu(s): 51.4%us, 2.5%sy, 0.0%ni, 45.1%id, 1.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 3088068k total, 2999504k used, 88564k free, 17680k buffers
Swap: 4939948k total, 40008k used, 4899940k free, 2085464k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
25866 roy 20 0 338m 259m 1228 R 100 8.6 0:28.49 stockfish
19511 roy 20 0 938m 848m 831m S 3 28.1 16:49.29 vmware-vmx
3680 root 20 0 563m 161m 48m S 3 5.3 5:09.94 Xorg
4813 roy 20 0 282m 114m 25m R 1 3.8 5:22.31 firefox
And here is top output for Stockfish-1.4 with 2 CPUs:
Code: Select all
Tasks: 175 total, 4 running, 171 sleeping, 0 stopped, 0 zombie
Cpu(s): 97.8%us, 2.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.2%hi, 0.0%si, 0.0%st
Mem: 3088068k total, 2999168k used, 88900k free, 18808k buffers
Swap: 4939948k total, 40036k used, 4899912k free, 2081048k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
26132 roy 20 0 338m 260m 1240 R 193 8.6 0:53.77 stockfish
19511 roy 20 0 938m 848m 831m R 2 28.1 16:54.95 vmware-vmx
4813 roy 20 0 282m 114m 25m S 2 3.8 5:25.26 firefox
3680 root 20 0 561m 161m 48m S 1 5.3 5:17.29 Xorg
The single CPU setting uses only 1 CPU and the 2 CPU setting uses as much of 2 CPUs as it can (not quite 200% shown on top but ...)
Roy
-
- Posts: 1243
- Joined: Sat Dec 13, 2008 7:00 pm
Re: Stockfish 1.4, the final weapon
The problem must have been something not related to the threading. Could it be polling too aggressively while it's not it's turn? (I'm playing with pondering off).
-
- Posts: 2684
- Joined: Sat Jun 14, 2008 9:17 pm
Re: Stockfish 1.4, the final weapon
I am on Windows now, I have started Stockfish from the console, sent the first move, read the response and then wait. Now task manager shows 0% of CPU activity until I send the new move. So I cannot reproduce that either.Gian-Carlo Pascutto wrote:The problem must have been something not related to the threading. Could it be polling too aggressively while it's not it's turn? (I'm playing with pondering off).
Anyhow the waiting loop for opponent move when there is no pondering is the following in uci.cpp
Code: Select all
void uci_main_loop() {
RootPosition.from_fen(StartPosition);
string command;
do {
// Wait for a command from stdin
if (!getline(cin, command))
command = "quit";
} while (handle_command(command));
}