SDPB takes preprocessed input generated by pmp2sdp.
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.
pmp2sdp generates a directory containing multiple
JSON/binary files.
It may also generate zip archive instead of a directory, if you run it with --zip flag. This can be useful,
e.g. to prevent running out of inodes error on some filesystems, when SDP contains large number of blocks. Also, the
zip format has a built-in checksum to detect corruption. Note that pmp2sdp does not enable compression, because that
can be quite slow.
SDPB can read SDP from plain directory or in any archive format supported
by libarchive, including zip, tar, tar.gz, 7z.
Inside the SDP directory, SDPB expects to find control.json,
objectives.json, and two files for every block: block_info_0.json, block_data_0.bin (or block_data_0.json),
block_info_1.json, block_data_2.bin, ...
The main part of control.json is listing the number of blocks.
pmp2sdp 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).
The JSON schema for these input files are in
sdp_control_schema.json,
sdp_objectives_schema.json,
sdp_block_info_schema.json,
sdp_block_data_schema.json. Running SDPB on the
test example
pmp2sdp --precision 1024 -i test/data/end-to-end_tests/1d/input/pmp.json -o test/out/pmp2sdp/sdp
will generate a simple example you can look at.