As you guys know, one of the added bonuses of using the excellent Scid vs. PC database, is the possibility to automate tasks using command lines scripts. Several scripts are provided as examples. One of them, ´sc_filter_pgn.tcl´ allows to search a pgn file with an EPD positions, storing the results in a database (first parameter). The pgn file I used contains about 3.8 milliong of games.
./sc_filter_pgn.tcl temp "r3k2r/ppq1b1pp/2n5/3bN3/3P4/1Q5P/PP3PP1/R1B2RK1 w kq -" EliteLichessDB.pgn
Opening database temp
Search position is "r3k2r/ppq1b1pp/2n5/3bN3/3P4/1Q5P/PP3PP1/R1B2RK1 w kq -"
Using 1 pgn(s) "EliteLichessDB.pgn"
File EliteLichessDB.pgn has 1 matches
Database temp has 31 games
I made a slighltly modified version of the script,sc_filter_pgn_2.tcl in order to use scid format files (much faster):
diff sc_filter_pgn.tcl sc_filter_pgn_2.tcl
53,54c53,54
< sc_base create $pgnfile true
< sc_base import file $pgnfile
---
> # sc_base create $pgnfile true
> sc_base open $pgnfile
./sc_filter_pgn_2.tcl temp "r3k2r/ppq1b1pp/2n5/3bN3/3P4/1Q5P/PP3PP1/R1B2RK1 w kq -" EliteLichessDB
Opening database temp
Search position is "r3k2r/ppq1b1pp/2n5/3bN3/3P4/1Q5P/PP3PP1/R1B2RK1 w kq -"
Using 1 pgn(s) "EliteLichessDB"
File EliteLichessDB has 1 matches
Database temp has 31 games.
So far so good. However, when I use 16.52 million of games, things go astray. I get a segmentation fault with the first script:
./sc_filter_pgn.tcl temp "r3k2r/ppq1b1pp/2n5/3bN3/3P4/1Q5P/PP3PP1/R1B2RK1 w kq -" LichessEliteDatabaseJan2022.pgn
Opening database temp
Search position is "r3k2r/ppq1b1pp/2n5/3bN3/3P4/1Q5P/PP3PP1/R1B2RK1 w kq -"
Using 1 pgn(s) "LichessEliteDatabaseJan2022.pgn"
Segmentation fault (core dumped)
and another error message when I use the modified script:
./sc_filter_pgn_2.tcl temp "r3k2r/ppq1b1pp/2n5/3bN3/3P4/1Q5P/PP3PP1/R1B2RK1 w kq -" LichessEliteDatabaseJan2022
Opening database temp
Search position is "r3k2r/ppq1b1pp/2n5/3bN3/3P4/1Q5P/PP3PP1/R1B2RK1 w kq -"
Using 1 pgn(s) "LichessEliteDatabaseJan2022"
Error reading game file.
while executing
"sc_search board 2 Exact 0 0 2"
("foreach" body line 9)
invoked from within
"foreach pgnfile $pgns {
# probably needs some error handling
# sc_base create $pgnfile true
sc_base open $pgnfile
# switch back to re..."
(file "./sc_filter_pgn_2.tcl" line 51)
Scid vs PC program interface fails to load this large pgn file but has no problem in loading and searching the indexed format.
I would really appreciate any help on how to use from the command line the large pgn file in scid format.
Thanks in advance
Scid vs PC script
Moderator: Ras
-
mig2004
- Posts: 256
- Joined: Wed Oct 02, 2013 12:36 am
Re: Scid vs PC script
i downloaded scid vs pc last month and it came with a limit of around 8 thousand games.
-
glav
- Posts: 87
- Joined: Sun Apr 07, 2019 1:10 am
- Full name: Giovanni Lavorgna
Re: Scid vs PC script
Actually, the game limit in scid vs pc is well over 16 million of games:
https://scidvspc.sourceforge.net/doc/Fo ... 72%20bytes.