[mercury-users] Reading big lists

Ondrej Bojar bojar at ufal.ms.mff.cuni.cz
Fri Jun 27 20:32:45 AEST 2008


Hi,

I'd guess it was detstack overflow. You may try playing around with 
"--detstack-size" option specified in MERCURY_RUNTIME environment variable.

Ultimately, I'd rather recommend pickling and unpickling as implemented 
by Peter Ross (and a few tweaks of mine). It It's available in Manarchive:

http://manarchive.sourceforge.net/

It's much faster, the pickled format is much smaller. On the other hand, 
it's platform (x64 vs. i686) and compilation dependent. Be sure to use 
exactly the same type definitions when reading and writing the data. 
These two types are likely to get pickled differently:

:- type mytype ---> a; b.
:- type mytype ---> b; a.

Cheers, O.

Jakob Puchinger wrote:
> Hi,
> 
> I tried to read a list of about 65000 elements from one line using the
> io.read predicate and I got a segmentation fault.
> This was on a 64 bit machine in grade hlc.gc.tr.
> 
> Cheers,
> Jakob
> --------------------------------------------------------------------------
> mercury-users mailing list
> Post messages to:       mercury-users at csse.unimelb.edu.au
> Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
> Subscriptions:          mercury-users-request at csse.unimelb.edu.au
> --------------------------------------------------------------------------

-- 
Ondrej Bojar (mailto:obo at cuni.cz / bojar at ufal.mff.cuni.cz)
http://www.cuni.cz/~obo
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list