Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add binary SDP format to skydiving_release branch #145

Closed
wants to merge 29 commits into from

Conversation

vasdommes
Copy link
Collaborator

@vasdommes vasdommes commented Nov 10, 2023

Cherry-picked commits from PR #114 implementing binary SDP.
Also cherry-picked some minor fixes and improvements for sdp2input-related code.

NB: The code is incompatible with old SDP's, so you'll have to regenerate them.

UPD other relevant fixes that are (or should be) cherry-picked:

TODO: same for pvm2sdp

Related: #76 Print out info about the sdp at startup
(cherry picked from commit 40ec237)
Printed for rank=0 at timer start, example:

0 run.step.frobenius_product_symmetric  MemAvailable, GB: 216.604
0 run.step.frobenius_product_symmetric  MemUsed, GB: 34.8657

(cherry picked from commit 4e1ab5d)
…_b_size

also assert that they are equal

(cherry picked from commit 6d09479)
…ectory.

Previously, the current working directory was used. This could lead to less predictable behaviour.

(cherry picked from commit 156fc7e)
In all other places in our code we actually need num_points, not degree;
in particular, when writing sdp.zip

(cherry picked from commit a467030)
sdp2input: add --outputFormat option (json or bin)
by default, --outputFormat=bin

TODO test

(cherry picked from commit 407169c)
Ideally we should use rapidjson for serializing, but according to my benchmarks it is ~2x slower when writing arrays of BigFloats, because with rapidjson we have to write BigFloat to stringstream, setting precision each time.

(cherry picked from commit 3c62abd)
For example, after introducing a bug I caught ARCHIVE_WARN with "Inconsistent uncompressed size: 34 in central directory, 134031 in local header".
In the old version, reader just pretended that there are no more files.

(cherry picked from commit 41e5a69)
…ge) block_data_XXX

Fixes #110 Optimize reading block info (dim and num_points) from sdp.zip

(cherry picked from commit 8f127d9)
…ut file has unexpected extension.

(cherry picked from commit 94317df)
…blocks

Replaced size_t with El::Int to avoid compiler warnings

(cherry picked from commit 65f2beb)
Use cxx17 always.

(cherry picked from commit fb646c8)
git will return current commit, if no tags found (e.g. in forked repo)

(cherry picked from commit f0d29ea)
Usage: pvm2sdp [FORMAT] PRECISION INPUT... OUTPUT

FORMAT is 'bin' or 'json'
If FORMAT is missing, bin is used by default

(cherry picked from commit dfd37ba)
(pmp2sdp was fixed by previous commit)

(cherry picked from commit b83564b)
…blocks()

Previously, SDP constructor could fail with obscure rapidjson error "Assertion `IsObject ()' failed."
@vasdommes
Copy link
Collaborator Author

vasdommes commented Nov 15, 2023

TODO: cherry-pick #149 to fix binary sdp performance for blocks with many zeros

…in many zeros

If BigFloat is zero, then we write only boolean flag indicating it.
If not, we write the flag(=false) and then serialized bytes.

This makes zeros ~100x more compact (for precision=768, BigFloat needs ~100B).

TODO: maybe we can use the same trick for MPI communication
El::Matrix::Control() does not take ownership correctly, which caused theleak
https://gitlab.com/bootstrapcollaboration/elemental/-/issues/3
…sed RAM consumption

We don't need any tracking, we're just writing arrays.
@vasdommes
Copy link
Collaborator Author

Closing this PR as obsolete, new skydiving-master branch includes all updates from master.

@vasdommes vasdommes closed this Jan 20, 2024
@vasdommes vasdommes deleted the skydiving_binary-sdp branch January 20, 2024 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant