Version 6 (modified by sascha, 7 months ago)

--

A work consumer is some plugin that accepts a stream of chains, where a chain is a pair of start and end values and a state for both. The state stores information on the completion status of the chain.

The following work consumers are defined:

  • print
  • stxxl
  • file
  • compare
  • buckets

print

Prints out the values in a human readable form

options are:

results=n
the number of chains to print
file=name
the file to write the human readable representation to
compare
request the work generator to insert compare end values and print them out
bare
do not print the number of chains that match, only the chains themselves
format=fmtstring
Format the output according to fmtstring, with the placeholders: %s for the start value, %e for the end value, %c for the compare end value and %i for the chain number
all
print all chains, like setting results to the maximum value.

stxxl

stxxl sorts chains. it is a bit special in that it needs other work consumers to process the set of sorted chains. those are given by the complete, incomplete and/or merge options.

options are:

complete=work_consumer
the consumer for complete chains. note the use of 2 colons for the suboptions
incomplete=work_consumer
the consumer for incomplete chains
merge=work_consumer
the consumer for chain merges. the first chain of a merge gets written to the complete consumer. if the option value is "_keep_" instead all merges will be written to the complete consumer in the correct order
writestate
write the chain state to the file, too
ram=n
the amount of memory to let stxxl use in MiB

file

file writes the chains to the disk.

options are:

prefix
a file prefix for tables that store start and end values in 2 files. start values are stored in prefix.start.tbl and end values in prefix.end.tbl
file
the name of the file to store a combined table in. It is a big vector of pairs of start and end values.
append
append chains to an existing table
writeall
write chains that are not complete
startbits
the number of bits in the start value which are not constant and can not be compressed away.
endbits
the number of bits in the end value that are constant and cannot be compressed away.
force
overwrite existing tables

compare

instruct the program to process start and end values from the work generator as well as end values produced during computation and then compare the respective end values. Useful for recomputing and comparing the values in an existing table.

match=consumer
feed the matching chains to the given downstream work consumer
nomatch=consumer
feed the nonmatching chains to the given downstream work consumer

buckets

Writes the data into multiple files where each file contains chains in a given range. The contents of the buckets are unsorted. The whole set of chains can be sorted by first writing to a bucket and then reading from a bucket with the sort option given to the reader.

parts=integer
the number of buckets
prefix=filename
the prefix for the bucket files, actual prefixes are prefix_0, prefix_1, prefix_2, ...
force
create files even if they already exist
append
append data to the buckets
writeall
also write chains that do not match the condition