SDPB
takes preprocessed input generated by sdp2input
or pvm2sdp
.
If you want to modify these files or generate your own input files
with a separate tool, this documents the format you will need to follow.
sdp2input
and pvm2sdp
generate a main zip file containing multiple
JSON files. They do not enable compression, because that can be quite
slow. Putting everything into a single file makes it easier to
manage. Also, the zip format has a built-in checksum to detect
corruption.
Inside the zip file, SDPB
expects to find control.json
,
objectives.json
, and two files for every block (block_info_0.json
, block_data_0.json
,
block_info_1.json
, block_data_2.json
, ...)
The main part of control.json
is listing the number of blocks.
sdp2input
and pvm2sdp
will also include a copy of the command used
to create the files, but SDPB
does not require that.
objectives.json
includes the constant contribution to the objective,
and 'b', the optimization vector.
block_info_XXX.json
contains the dimension and number of points.
block_data_XXX.bin
or block_data_XXX.json
contains bilinear
bases, the 'B' matrix, and the 'c' vector.
Block data can be stored either in a human-readable JSON format, or in a more efficient binary format (which
uses Boost.Serialization library,
see write_block_data.cxx for details).
SDPB
can also read the input if you pack these files into different
archive formats. It is limited by the support for
libarchive,
but it includes zip, tar, tar.gz, 7z. If you like, you can also leave
everything in a plain old directory.
The JSON schema for these input files are in
sdpb_input_control_schema.json,
sdpb_input_objectives_schema.json,
sdpb_input_block_info_schema.json,
sdpb_input_block_data_schema.json. Running SDPB
on the
test example
pvm2sdp 1024 test/data/pvm2sdp/pvm.xml test/out/pvm2sdp/sdp.zip
will generate a simple example you can look at.