Thx Daniel!cdani wrote:Done! Now they can work with files larger than 2 GB.
Andscacs:
www.andscacs.com/downloads/andscacs091237.zip
Stockfish:
www.andscacs.com/downloads/stockfish_x6 ... vehash.zip
Stockfish changes:Code: Select all
bool TranspositionTable::save() { std::ofstream b_stream(hashfilename, std::fstream::out | std::fstream::binary); if (b_stream) { //b_stream.write(reinterpret_cast<char const *>(table), clusterCount * sizeof(Cluster)); for (long long i = 0; i < clusterCount * sizeof(Cluster); i += (1 << 30)) { //1GB long long j = __min((1 << 30), (clusterCount * sizeof(Cluster)) - i); b_stream.write(reinterpret_cast<char const *>(table) + i, j); } return (b_stream.good()); } return false; } void TranspositionTable::load() { //file size: https://stackoverflow.com/questions/2409504/using-c-filestreams-fstream-how-can-you-determine-the-size-of-a-file std::ifstream file; file.open(hashfilename, std::ios::in | std::ios::binary); file.ignore(std::numeric_limits<std::streamsize>::max()); std::streamsize size = file.gcount(); file.clear(); // Since ignore will have set eof. resize(size / 1024 / 1024); file.seekg(0, std::ios::beg); file.read(reinterpret_cast<char *>(table), clusterCount * sizeof(Cluster)); }
Stockfish version with hash saving capability
Moderators: hgm, Rebel, chrisw
-
- Posts: 122
- Joined: Mon Aug 18, 2014 7:12 pm
- Location: Trento (Italy)
Re: Stockfish version with hash saving capability
-
- Posts: 545
- Joined: Tue Jun 06, 2017 4:49 pm
- Location: Italy
Re: Stockfish version with hash saving capability
cdani wrote:Done! Now they can work with files larger than 2 GB.
Andscacs:
www.andscacs.com/downloads/andscacs091237.zip
Stockfish:
www.andscacs.com/downloads/stockfish_x6 ... vehash.zip
Stockfish changes:Code: Select all
bool TranspositionTable::save() { std::ofstream b_stream(hashfilename, std::fstream::out | std::fstream::binary); if (b_stream) { //b_stream.write(reinterpret_cast<char const *>(table), clusterCount * sizeof(Cluster)); for (long long i = 0; i < clusterCount * sizeof(Cluster); i += (1 << 30)) { //1GB long long j = __min((1 << 30), (clusterCount * sizeof(Cluster)) - i); b_stream.write(reinterpret_cast<char const *>(table) + i, j); } return (b_stream.good()); } return false; } void TranspositionTable::load() { //file size: https://stackoverflow.com/questions/2409504/using-c-filestreams-fstream-how-can-you-determine-the-size-of-a-file std::ifstream file; file.open(hashfilename, std::ios::in | std::ios::binary); file.ignore(std::numeric_limits<std::streamsize>::max()); std::streamsize size = file.gcount(); file.clear(); // Since ignore will have set eof. resize(size / 1024 / 1024); file.seekg(0, std::ios::beg); file.read(reinterpret_cast<char *>(table), clusterCount * sizeof(Cluster)); }
Joerg already adopted your code, and I hope Mike Byrne will use it too. I sometimes think at the mail I sent you 3 months ago about PHs... Thanks Daniel.
F.S.I. Chess Teacher
-
- Posts: 6442
- Joined: Tue Jan 09, 2007 12:31 am
- Location: PA USA
- Full name: Louis Zulli
Re: Stockfish version with hash saving capability
Not sure what your first sentence is trying to ask. Yes, the nodes/sec is 50956798, which is indeed very fast. I don't know anything about Threadripper. I have 2 x Intel(R) Xeon(R) CPU E5-2687W v3 @ 3.10GHz and 64GB RAM. I tend to use asmFish because it is NUMA-aware, which seems to improve performance on my system.duncan wrote:zullil wrote: asmFish eventually found mate-in-11 from the original position. But it took a while.Code: Select all
info depth 54 seldepth 24 multipv 1 time 5491130 nps 50956798 score mate 11 nodes 279810404462 hashfull 999 tbhits 0 pv a2a4 h7h5 d2d4 c7c6 e2e4 g7g6 d4d5 g6g5 d1h5 e8d8 h5f7 c6d5 f1b5 d5e4 f7d5 d8c8 d5d7 c8b8 b5a6 b8a8 d7b7
is your nps 50956798 which is very fast and quicker than threadripper.? May I ask what sytem you are using?
-
- Posts: 937
- Joined: Fri Mar 10, 2006 4:29 pm
- Location: Germany
Re: Stockfish version with hash saving capability
Huh? Where?Rodolfo Leoni wrote:cdani wrote:Done! Now they can work with files larger than 2 GB.
Andscacs:
www.andscacs.com/downloads/andscacs091237.zip
Stockfish:
www.andscacs.com/downloads/stockfish_x6 ... vehash.zip
Stockfish changes:Code: Select all
bool TranspositionTable::save() { std::ofstream b_stream(hashfilename, std::fstream::out | std::fstream::binary); if (b_stream) { //b_stream.write(reinterpret_cast<char const *>(table), clusterCount * sizeof(Cluster)); for (long long i = 0; i < clusterCount * sizeof(Cluster); i += (1 << 30)) { //1GB long long j = __min((1 << 30), (clusterCount * sizeof(Cluster)) - i); b_stream.write(reinterpret_cast<char const *>(table) + i, j); } return (b_stream.good()); } return false; } void TranspositionTable::load() { //file size: https://stackoverflow.com/questions/2409504/using-c-filestreams-fstream-how-can-you-determine-the-size-of-a-file std::ifstream file; file.open(hashfilename, std::ios::in | std::ios::binary); file.ignore(std::numeric_limits<std::streamsize>::max()); std::streamsize size = file.gcount(); file.clear(); // Since ignore will have set eof. resize(size / 1024 / 1024); file.seekg(0, std::ios::beg); file.read(reinterpret_cast<char *>(table), clusterCount * sizeof(Cluster)); }
Joerg already adopted your code, ...
Jörg Oster
-
- Posts: 545
- Joined: Tue Jun 06, 2017 4:49 pm
- Location: Italy
Re: Stockfish version with hash saving capability
SF Zander maybe?Joerg Oster wrote: Huh? Where?
F.S.I. Chess Teacher
-
- Posts: 937
- Joined: Fri Mar 10, 2006 4:29 pm
- Location: Germany
Re: Stockfish version with hash saving capability
It seems there is some misunderstanding here.Rodolfo Leoni wrote:SF Zander maybe?Joerg Oster wrote: Huh? Where?
I'm not responsible for what other people do.
In fact, Marco Z. published SF Zander without dropping any message or asking if that's ok with me.
Which he must not do as far as I know, of course.
Nevertheless, I'm not very happy about it ...
Jörg Oster
-
- Posts: 545
- Joined: Tue Jun 06, 2017 4:49 pm
- Location: Italy
Re: Stockfish version with hash saving capability
Then, I hope both of you will clear the misunderstanding. And I hope you'll keep the option in the next releases too. BTW, I'd need a readme file (or an Encyclopedia) about all the UCI options there.Joerg Oster wrote:It seems there is some misunderstanding here.Rodolfo Leoni wrote:SF Zander maybe?Joerg Oster wrote: Huh? Where?
I'm not responsible for what other people do.
In fact, Marco Z. published SF Zander without dropping any message or asking if that's ok with me.
Which he must not do as far as I know, of course.
Nevertheless, I'm not very happy about it ...
And... thanks for the new version, anyway.
F.S.I. Chess Teacher
-
- Posts: 937
- Joined: Fri Mar 10, 2006 4:29 pm
- Location: Germany
Re: Stockfish version with hash saving capability
Looks like YOU still don't understand.Rodolfo Leoni wrote:Then, I hope both of you will clear the misunderstanding. And I hope you'll keep the option in the next releases too. BTW, I'd need a readme file (or an Encyclopedia) about all the UCI options there.Joerg Oster wrote:It seems there is some misunderstanding here.Rodolfo Leoni wrote:SF Zander maybe?Joerg Oster wrote: Huh? Where?
I'm not responsible for what other people do.
In fact, Marco Z. published SF Zander without dropping any message or asking if that's ok with me.
Which he must not do as far as I know, of course.
Nevertheless, I'm not very happy about it ...
And... thanks for the new version, anyway.
I am NOT involved in the release of SF Zander!
I can't keep anything or adopt anything or whatever, as I'm NOT releasing this!
Was that clear enough, now?
And btw., if you need help with all the options, ask Marco Z. for help.
Again, I'm not responsible for the actions of others.
Jörg Oster
-
- Posts: 545
- Joined: Tue Jun 06, 2017 4:49 pm
- Location: Italy
Re: Stockfish version with hash saving capability
Joerg, there's no need to get angry. I understand what I read, I can't do any conjecture about what I don't read. When I thought everything was from you, it was because of this:Joerg Oster wrote:Looks like YOU still don't understand.Rodolfo Leoni wrote:Then, I hope both of you will clear the misunderstanding. And I hope you'll keep the option in the next releases too. BTW, I'd need a readme file (or an Encyclopedia) about all the UCI options there.Joerg Oster wrote:It seems there is some misunderstanding here.Rodolfo Leoni wrote:SF Zander maybe?Joerg Oster wrote: Huh? Where?
I'm not responsible for what other people do.
In fact, Marco Z. published SF Zander without dropping any message or asking if that's ok with me.
Which he must not do as far as I know, of course.
Nevertheless, I'm not very happy about it ...
And... thanks for the new version, anyway.
I am NOT involved in the release of SF Zander!
I can't keep anything or adopt anything or whatever, as I'm NOT releasing this!
Was that clear enough, now?
And btw., if you need help with all the options, ask Marco Z. for help.
Again, I'm not responsible for the actions of others.
http://www.talkchess.com/forum/viewtopic.php?t=64841
That states it was your work. Here, you say it wasn't, but I assumed most of the features were from you. Nobody knows what to think about all that stuff, now. Both you and Marco Zerbinati should clear what's happening. Everything is quite confusing.
F.S.I. Chess Teacher
-
- Posts: 6442
- Joined: Tue Jan 09, 2007 12:31 am
- Location: PA USA
- Full name: Louis Zulli
Re: Stockfish version with hash saving capability
I think Joerg was quite clear about what happened. You can look here to see the work that Joerg has done on Zander. One can assume that the various "extensions" were added by Marco Zerbinati.Rodolfo Leoni wrote: Both you and Marco Zerbinati should clear what's happening. Everything is quite confusing.