jwes wrote:I am trying to compile crafty 25.0 with MSVC 2013 and am running into some errors.
1. This line appears in init.c
Code: Select all
memset((void *) hash_table + node * mem_per_node, 0, mem_per_node);
Should this be?
Code: Select all
memset((char*) hash_table + node * mem_per_node, 0, mem_per_node);
Or perhaps?
Code: Select all
memset((void *) ((char *)hash_table + node * mem_per_node), 0, mem_per_node);
2. This function is used if INLINEASM is not defined and does not compile:
Code: Select all
int PopCnt(uint64_t arg1) {
int c;
for (c = 0; x; c++)
x &= x - 1;
return c;
}
3. Bob, do you ever compile and run with DEBUG defined? I get runtime errors in 24.1 if I try.
4. Will it still compile in 32 bit mode?
It should compile as 32 bit executable assuming the compiler will accept uint64_t which gcc should.
I regularly run with -DDEBUG and it is working right now in fact. Can you post some output showing what is going wrong???
Here are two runs, first with -DDEBUG, second without. Only difference is the NPS.
23-> 25.27 -6.25 1. ... Rxb2 2. Rxb2 c3 3. Rb6+ Ke7 4. Kf2
c2 5. Rc6 d2 6. Rxc2 d1=Q 7. Rc5 Kd6
8. Re5 Qd3 9. Kf3 Qxa3 10. Rxf5 Qb2
11. Rf7 Qxh2 12. Ra7 Qc2 13. Rg7
time=25.27(100%) nodes=26431424(26.4M) fh1=91% pred=0 nps=1.0M
chk=1.1M qchk=1.4M fp=4.6M mcp=3.5M 50move=1
LMReductions: 1/786.8K 2/536.0K 3/282.9K 4/37.6K 5/351
null-move (R): 3/199.4K 4/82.0K 5/2.6K 6/113
and
23-> 3.77/21.60 -6.25 1. ... Rxb2 2. Rxb2 c3 3. Rb6+ Ke7 4. Kf2
c2 5. Rc6 d2 6. Rxc2 d1=Q 7. Rc5 Kd6
8. Re5 Qd3 9. Kf3 Qxa3 10. Rxf5 Qb2
11. Rf7 Qxh2 12. Ra7 Qc2 13. Rg7
time=3.77(100%) nodes=26431424(26.4M) fh1=91% pred=0 nps=7.0M
chk=1.1M qchk=1.4M fp=4.6M mcp=3.5M 50move=1
LMReductions: 1/786.8K 2/536.0K 3/282.9K 4/37.6K 5/351
null-move (R): 3/199.4K 4/82.0K 5/2.6K 6/113
Black(1): Rxb2
So about 7x slower. I use this regularly as it is a good sanity test on the code.
The double (void *) declarations should not cause any issues. IE
(int) ((int) x)
is perfectly acceptable C code. Extra typing. Where those double void * recasts came from I don't remember. I've removed them and will see who complains when 25.1 is released... The only problem is that the various hash tables are NOT pointers to void, they are pointers to structs, and not re-casting them to (void *) produces warnings...