Hi Mark, Are you using a 32 bits or 64 bits build of GNU Prolog? I would expect that to make a difference but is just a hint; I could be wrong.
Cheers, Paulo On 11/12/2012, at 18:49, Mark Roulo <[email protected]> wrote: > I am exploring the size limits for GNU Prolog > when used as a database. Right now I have > a prolog file that contains 10,000 simple facts. > > It looks like this: > > is_a_widget('GUID:Widget-0000000'). > is_a_widget('GUID:Widget-0000001'). > is_a_widget('GUID:Widget-0000002'). > : > : > is_a_widget('GUID:Widget-0009995'). > is_a_widget('GUID:Widget-0009996'). > is_a_widget('GUID:Widget-0009997'). > is_a_widget('GUID:Widget-0009998'). > is_a_widget('GUID:Widget-0009999'). > > The GNU Prolog compiler chokes when trying to compile it. > > xyzzy:Src kt$ gplc -o program blatz.pl > > Fatal Error: global stack overflow (size: 32768 Kb, reached: 32765 Kb, > environment variable used: GLOBALSZ) compilation failed > > Increasing the GLOBALSZ variable to 300MB doesn't help: > > xyzzy:Src kt$ GLOBALSZ=327650; export GLOBALSZ; gplc -o program blatz.pl > > Fatal Error: global stack overflow (size: 327652 Kb, reached: 327649 Kb, > environment variable used: GLOBALSZ) compilation failed > > Is 10,000 facts a *REAL* limit? Or am I doing something very wrong? Ideally > I'd like to go to about 1,000,000 simple facts. > > I created my input prolog file with this C program: > > #include <stdio.h> > > int main(int argc, char *argv[]) > { > FILE *fp = fopen(argv[1], "w"); > > for (int i = 0; i < 10000; ++i) > { > fprintf(fp, "is_a_widget('GUID:Widget-%07d').\n", i); > } > > fclose(fp); > > return 0; > } > > Thanks, > Mark Roulo > _______________________________________________ > Users-prolog mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/users-prolog ----------------------------------------------------------------- Paulo Moura Logtalk developer Email: <mailto:[email protected]> Web: <http://logtalk.org/> ----------------------------------------------------------------- _______________________________________________ Users-prolog mailing list [email protected] https://lists.gnu.org/mailman/listinfo/users-prolog
