Then there is no problem in using that version.Graham Banks wrote:Hi Dann,Dann Corbit wrote:Be aware that it's going to crash on Windows if you use more than one thread.
There is a patched version here, but it only contains a 64 bit binary:
http://cap.connx.com/chess-engines/new- ... ty22-3.zip
However, anyone can recompile the code.
I'm using Crafty 22.3 32-bit and only intend doing single-cpu testing at this stage.
Regards, Graham.
Crafty-22.2 is available
Moderator: Ras
-
- Posts: 12792
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: Crafty-22.2 is available
-
- Posts: 44643
- Joined: Sun Feb 26, 2006 10:52 am
- Location: Auckland, NZ
Re: Crafty-22.2 is available
I should have posted in the Crafty 22.3 thread. My bad for creating confusion. Sorry.Dann Corbit wrote:Then there is no problem in using that version.Graham Banks wrote:Hi Dann,Dann Corbit wrote:Be aware that it's going to crash on Windows if you use more than one thread.
There is a patched version here, but it only contains a 64 bit binary:
http://cap.connx.com/chess-engines/new- ... ty22-3.zip
However, anyone can recompile the code.
I'm using Crafty 22.3 32-bit and only intend doing single-cpu testing at this stage.
Regards, Graham.
Cheers, Graham.
gbanksnz at gmail.com
-
- Posts: 1763
- Joined: Sun Feb 26, 2006 1:49 pm
- Location: Edmonton, Alberta, Canada
- Full name: Peter Skinner
Re: Crafty-22.2 is available
This is the original code:Dann Corbit wrote:Be aware that it's going to crash on Windows if you use more than one thread.
There is a patched version here, but it only contains a 64 bit binary:
http://cap.connx.com/chess-engines/new- ... ty22-3.zip
However, anyone can recompile the code.
Code: Select all
for (i = MAX_BLOCKS_PER_CPU * ((int) tid) + 1; n; i++, n--) {
block[i] =
(TREE *) ((~(size_t) 127) & (127 + (size_t) WinMalloc(sizeof(TREE) +
127, tid)));
Code: Select all
for (i = MAX_BLOCKS_PER_CPU * ((int) tid) + 1; n; i++, n--) {
block[i] =
(TREE *) (WinMalloc(sizeof(TREE) + 2047, tid)));
Code: Select all
for (i = MAX_BLOCKS_PER_CPU * ((int) tid) + 1; n; i++, n--) {
block[i] =
(TREE *) (WinMalloc(sizeof(TREE) + 2047, tid));
Peter
I was kicked out of Chapters because I moved all the Bibles to the fiction section.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Crafty-22.2 is available
Actually it does. With default smpnice=1, if you use multiple processors, the program terminates processes when it is waiting and you have ponder=off. With smpnice=0, when waiting the processes will spin in a tight busy-wait loop and burn N-1 CPUs at 100%. Ponder=on would make that not very important, but with ponder=off and mt=anything other than 1, smpnice=1 is more system-friendly (and is the default as I mentioned).Graham Banks wrote:Got confirmation via messenger that it's ok. Thanks Peter.Graham Banks wrote: How's this look Peter? I want to use closest to 128mb hash, single-cpu, ponder off, no learning, generic book.
smpnice=0
egtb
tbpath=c:\Tablebases
hash=96M
hashp=64M
cache=32M
ponder off
learn 0
book off
log=off
exit
Seems to work okay.
Cheers, Graham.
Doesn't matter whether smpnice=0 or 1.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Crafty-22.2 is available
Why would it crash? windows and linux both now use threads and the old exit(0) problem has been removed. I'm not aware of anything that breaks on windows with 22.2 and beyond. 22.1 had a problem for sure.Dann Corbit wrote:Be aware that it's going to crash on Windows if you use more than one thread.
There is a patched version here, but it only contains a 64 bit binary:
http://cap.connx.com/chess-engines/new- ... ty22-3.zip
However, anyone can recompile the code.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: Crafty-22.2 is available
What is this supposed to fix? The above "fix" actually breaks cache usage. The original code forces the split blocks to begin on a 128-byte cache boundary, while the "fixed code" accepts whatever winmalloc returns which is guaranteed only to be on an 8-byte boundary.Peter Skinner wrote:This is the original code:Dann Corbit wrote:Be aware that it's going to crash on Windows if you use more than one thread.
There is a patched version here, but it only contains a 64 bit binary:
http://cap.connx.com/chess-engines/new- ... ty22-3.zip
However, anyone can recompile the code.Here is your patched code:Code: Select all
for (i = MAX_BLOCKS_PER_CPU * ((int) tid) + 1; n; i++, n--) { block[i] = (TREE *) ((~(size_t) 127) & (127 + (size_t) WinMalloc(sizeof(TREE) + 127, tid)));
Your patched code has an extra ) in it, and should be as follows:Code: Select all
for (i = MAX_BLOCKS_PER_CPU * ((int) tid) + 1; n; i++, n--) { block[i] = (TREE *) (WinMalloc(sizeof(TREE) + 2047, tid)));
Other than that one error, it compiles cleanly, and doesn't crash when using two threads. I will update my website with new binaries.Code: Select all
for (i = MAX_BLOCKS_PER_CPU * ((int) tid) + 1; n; i++, n--) { block[i] = (TREE *) (WinMalloc(sizeof(TREE) + 2047, tid));
Peter
What exactly is the problem???
-
- Posts: 44643
- Joined: Sun Feb 26, 2006 10:52 am
- Location: Auckland, NZ
Re: Crafty-22.2 is available
Thanks Bob.bob wrote:Actually it does. With default smpnice=1, if you use multiple processors, the program terminates processes when it is waiting and you have ponder=off. With smpnice=0, when waiting the processes will spin in a tight busy-wait loop and burn N-1 CPUs at 100%. Ponder=on would make that not very important, but with ponder=off and mt=anything other than 1, smpnice=1 is more system-friendly (and is the default as I mentioned).Graham Banks wrote:Got confirmation via messenger that it's ok. Thanks Peter.Graham Banks wrote: How's this look Peter? I want to use closest to 128mb hash, single-cpu, ponder off, no learning, generic book.
smpnice=0
egtb
tbpath=c:\Tablebases
hash=96M
hashp=64M
cache=32M
ponder off
learn 0
book off
log=off
exit
Seems to work okay.
Cheers, Graham.
Doesn't matter whether smpnice=0 or 1.

gbanksnz at gmail.com
-
- Posts: 1763
- Joined: Sun Feb 26, 2006 1:49 pm
- Location: Edmonton, Alberta, Canada
- Full name: Peter Skinner
Re: Crafty-22.2 is available
I did email about this patch by Dan, and hadn't updated the website with new compiles until I heard back from you.bob wrote:What is this supposed to fix? The above "fix" actually breaks cache usage. The original code forces the split blocks to begin on a 128-byte cache boundary, while the "fixed code" accepts whatever winmalloc returns which is guaranteed only to be on an 8-byte boundary.Peter Skinner wrote:This is the original code:Dann Corbit wrote:Be aware that it's going to crash on Windows if you use more than one thread.
There is a patched version here, but it only contains a 64 bit binary:
http://cap.connx.com/chess-engines/new- ... ty22-3.zip
However, anyone can recompile the code.Here is your patched code:Code: Select all
for (i = MAX_BLOCKS_PER_CPU * ((int) tid) + 1; n; i++, n--) { block[i] = (TREE *) ((~(size_t) 127) & (127 + (size_t) WinMalloc(sizeof(TREE) + 127, tid)));
Your patched code has an extra ) in it, and should be as follows:Code: Select all
for (i = MAX_BLOCKS_PER_CPU * ((int) tid) + 1; n; i++, n--) { block[i] = (TREE *) (WinMalloc(sizeof(TREE) + 2047, tid)));
Other than that one error, it compiles cleanly, and doesn't crash when using two threads. I will update my website with new binaries.Code: Select all
for (i = MAX_BLOCKS_PER_CPU * ((int) tid) + 1; n; i++, n--) { block[i] = (TREE *) (WinMalloc(sizeof(TREE) + 2047, tid));
Peter
What exactly is the problem???
Since it doesn't fix things and actually breaks things, then I won't update it with his "patch".
The problem seems to be that Windows users, using more than one thread are seeing crashing problems. While I can't seem to reproduce this with my compiles on any of my machines, I don't know what the real issue is.
If I start Crafty with mt=2, and select "machine white" in Winboard, it works perfectly. No issues. Crafty also played 30+ games via ICS last night with no issues.
So again, I don't know where the issue is...
I was kicked out of Chapters because I moved all the Bibles to the fiction section.
-
- Posts: 10121
- Joined: Thu Mar 09, 2006 12:57 am
- Location: van buren,missouri
Re: Crafty-22.2 is available
Crafty 22.3 32 is now working in Arena. The download from
your page.
Thanks Peter,
Gerold.
your page.
Thanks Peter,
Gerold.
-
- Posts: 12792
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: Crafty-22.2 is available
Access to null pointers and/or unintialized memory.
I sent you a patch via email last night.
I sent you a patch via email last night.