-
Notifications
You must be signed in to change notification settings - Fork 43
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
EPIC sdp2input/pvm2sdp refactoring + parallel reading optimization #176
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TODO: obsolete test files moved to outer_limits/toy/ directory, review and use or delete them! TODO: test also sdp2functions TODO: add realistic tests, e.g. using end-to-end data
…ates. Previous message incorrectly assumed (procsPerNode/procGranularity) core groups per node. In fact, big blocks can be assigned to big groups, containing more than procGranularity cores. The actual number of core groups per node lies in [1, procsPerNode/procGranularity] range.
Introduced PMWP_File_Parse_Result and PMWP_SDP classes to handle parsing data. (PMWP is Positive_Matrix_With_Prefactor used in json/mathematica input). As a byproduct: fix #152 spectrum not working in parallel (fixed by treating local and global block indices more accurately) TODO: - Same refactoring for pvm2sdp - More efficient IO parallelization, see #150
Introduced PVM_File_Parse_Result and PVM_SDP classes to handle parsing data. (PVM is Polynomial_Vector_Matrix used in xml input). Removed duplicated code from pvm2sdp TODO: - More efficient IO parallelization, see #150 - lots of code is duplicated for PVM and PMWP. We should deduplicate it, e.g. convert from one format to another when possible. - Make new executables which can read both formats, i.e. combine pvm2sdp + sdp2input, pvm2functions + sdp2functions, spectrum --format).
Allows to use Verbosity in boost::program_options without conversion from int_verbosity.
TODO better and unified parser design - states, callbacks etc. TODO optimize: skip matrices, avoid excessive copying TODO remove spectrum format TODO merge pvm2... and sdp2... TODO update docs
Input file format is now determined automatically.
Also: - added unit_tests for json - return PMP_File_Parse_Result from read_json(), read_mathematica(), read_xml() - Introduce PMP_File_Parse_Result::read() instead of constructor TODO reuse the new parser in sdp2functions etc.
+ fix clang-tidy warnings
…b_util/block_mapping The code will be reused by read_polynomial_matrix_program()
Parallelization algorithm: - Input files are distributed among (groups of) processes via compute_block_grid_mapping() - Within each group, matrices from input files are distributed in a round-robin way TODO: since IO is often a bottleneck, we can reduce it: root of each group copies file content to a shared memory window, and other processes read it.
…nomial_Vector> This is a simple std::vector<Polynomial> with function Zero(). On Expanse HPC, compilation of El::Matrix<std::vector<Polynomial> failed with error: 'class std::vector<Polynomial>' has no member named 'Zero' Zero() is (sometimes) called by El::MemZero() when allocating memory to matrix.
vasdommes
referenced
this pull request
in bharathr98/sdpb
Feb 8, 2024
Copied over wscript, @vasdommes had already made a few changes from waf to cmake. Cleaned up, and added more TODOs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
spd2input
/pvm2sdp
and related code, preparing the code to create a unifiedpmp2sdp
executable handling all formats (.xml
,.json
,.m
). As a byproduct, both sdp2input and pvm2sdp can now read all formats too.spectrum --format
option, now it's determined automatically.In old version, every process was reading all input files (and picking the matrices it needed). Now input files are distributed among processes according to
compute_block_grid_mapping()
algorithm (with file size used as a cost), similar to SDPB block distribution.Each group of processes gets one or more input files. Matrices from these files are distributed among the processes in a round-robin way.
Polynomial_Matrix_Program
and output sdp blocks.