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

Messages on init. #1717

Merged
merged 40 commits into from
Mar 16, 2021
Merged

Messages on init. #1717

merged 40 commits into from
Mar 16, 2021

Conversation

phlptp
Copy link
Member

@phlptp phlptp commented Nov 11, 2020

Summary

If merged this pull request will fix a reported bug in received message during the init phase. The iteration worked but no messages were available. This PR adds a test case and fixes the bug.

This PR ended up being a major refactor to resolve the filter timing issues for certain cases. There are no major API changes but the underlying timing code has changed significantly.

@phlptp phlptp added the bug Issue concerning incorrect code operation label Nov 11, 2020
@phlptp phlptp requested a review from eberleim November 11, 2020 19:13
phlptp and others added 24 commits March 10, 2021 10:57
Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>
Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>
Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>
@phlptp phlptp force-pushed the message_on_init branch 3 times, most recently from df59b99 to 0b54231 Compare March 10, 2021 21:23
@phlptp phlptp requested a review from nightlark March 10, 2021 23:54
@phlptp phlptp force-pushed the message_on_init branch 5 times, most recently from 3a4d0b2 to 8213588 Compare March 12, 2021 01:17
@phlptp phlptp force-pushed the message_on_init branch 2 times, most recently from 7b03c60 to a2c0bf2 Compare March 15, 2021 18:13
github-actions bot and others added 2 commits March 15, 2021 13:21
* add boost to pipelines

* Automated formatting of repo files

Co-authored-by: Philip Top <phlptp@gmail.com>
Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>
Comment on lines +483 to +488
// if (m.dest_id == global_federate_id(131074) && m.source_id == global_federate_id(1879048194))
// {
/// if (m.action() == CMD_TIME_REQUEST && m.actionTime>timeZero) {
// printf("adding action message\n");
// }
//}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like test code to remove eventually.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going to leave this in for a little while yet, it won't be in the release code

Comment on lines +57 to +61
// std::this_thread::sleep_for(std::chrono::milliseconds(2000));
// auto res = broker->query("root", "global_time_debugging");
// std::this_thread::sleep_for(std::chrono::milliseconds(2000));
// std::this_thread::yield();
// auto res2 = broker->query("root", "global_time_debugging");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something else to remove when not needed, along with a few other similar comments in other test files.

tests/helics/test_files/example_filters.json Outdated Show resolved Hide resolved

auto cid = filt->core_id;
auto* retTarget = filt.get();
// auto actualKey = key;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments to clean up later?

Comment on lines +144 to +145
assert(false);
// this is an odd condition (not sure what to do yet)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something that should be a TODO?

Is there a way to recover or gracefully shutdown so assert isn't needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of the FilterFederate code is pulled from the CommonCore so this just got copied over. I don't think we have reached that condition so I haven't dealt with it yet.

Co-authored-by: Ryan Mast <nightlark@users.noreply.github.com>
@phlptp phlptp merged commit 409f5b3 into develop Mar 16, 2021
@phlptp phlptp deleted the message_on_init branch March 16, 2021 18:09
phlptp added a commit that referenced this pull request Apr 6, 2021
* Tests and some fixes for getting messages in initialization mode on iteration

* Automated formatting of repo files (#1718)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>

* add additional test

* fix timing bug on local federates

* Automated formatting of repo files (#1720)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>

* fix clang-tidy issue

* Automated formatting of repo files (#1722)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>

* add some capabilities to the dependency management

* more tweaks to the time control for ForwardingTimeCoordinator and associated operations

* add update back in

* some more tweaks for timing tests

* make sure the halted time is consistent

* make sure the halted time is consistent

* update more tests

* make the callback locked for endpoint callbacks

* fix the echo test and possible inconsistencies in message delivery

* try cleaning up a few more tests

* add some more tests to echo tests

* try a slightly different minimum modification

* Try some additional conditions on the Forwarding time coordinators

* try another tactic for generating the min federate

* try another tactic for generating the min federate

* add some delay capability to test comms and some other test function in the forwarding time coordinator

* start moving the filters to a separate federate

* updates to code for archival

* Work out details in FilterFederate and time coordinators

* Fix 5 message tests

* pass the iteration tests

* fix restricted time policy code again

* fix compile errors

* Try changing the destructor for FilterFederate

* fix uninitialized value

* more sanitizer fixes

* Fix cppcheck issues

* add some debugging output for deadlocks on iteration tests

* try adjusting when messages get sent

* add some time to checks and add boost 1.75 inclusion

* Automated formatting of repo files (#1737)

* add boost to pipelines

* Automated formatting of repo files

Co-authored-by: Philip Top <phlptp@gmail.com>
Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>

* add some delays in recorder

* Apply suggestions from code review

Co-authored-by: Ryan Mast <nightlark@users.noreply.github.com>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>
Co-authored-by: Ryan Mast <nightlark@users.noreply.github.com>
phlptp added a commit that referenced this pull request Apr 9, 2021
* Messages on init. (#1717)

* Tests and some fixes for getting messages in initialization mode on iteration

* Automated formatting of repo files (#1718)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>

* add additional test

* fix timing bug on local federates

* Automated formatting of repo files (#1720)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>

* fix clang-tidy issue

* Automated formatting of repo files (#1722)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>

* add some capabilities to the dependency management

* more tweaks to the time control for ForwardingTimeCoordinator and associated operations

* add update back in

* some more tweaks for timing tests

* make sure the halted time is consistent

* make sure the halted time is consistent

* update more tests

* make the callback locked for endpoint callbacks

* fix the echo test and possible inconsistencies in message delivery

* try cleaning up a few more tests

* add some more tests to echo tests

* try a slightly different minimum modification

* Try some additional conditions on the Forwarding time coordinators

* try another tactic for generating the min federate

* try another tactic for generating the min federate

* add some delay capability to test comms and some other test function in the forwarding time coordinator

* start moving the filters to a separate federate

* updates to code for archival

* Work out details in FilterFederate and time coordinators

* Fix 5 message tests

* pass the iteration tests

* fix restricted time policy code again

* fix compile errors

* Try changing the destructor for FilterFederate

* fix uninitialized value

* more sanitizer fixes

* Fix cppcheck issues

* add some debugging output for deadlocks on iteration tests

* try adjusting when messages get sent

* add some time to checks and add boost 1.75 inclusion

* Automated formatting of repo files (#1737)

* add boost to pipelines

* Automated formatting of repo files

Co-authored-by: Philip Top <phlptp@gmail.com>
Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>

* add some delays in recorder

* Apply suggestions from code review

Co-authored-by: Ryan Mast <nightlark@users.noreply.github.com>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>
Co-authored-by: Ryan Mast <nightlark@users.noreply.github.com>

* Fix offset timing bug (#1759)

* Fix offset timing bug

* Automated formatting of repo files (#1760)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>

* Barrier check (#1788)

* try to fix a bug in the time barrier clear operation

* rework the minFed check for timing

* Automated formatting of repo files (#1789)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix clang tidy issues

* message required destinations (#1755)

* fix some warnings and make it possible to set default for messages to be required to have a destination

* Automated formatting of repo files (#1756)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>

* fix clan tidy issues

* add the option of ordered queries (#1793)

* add the option of ordered queries which are slower but have more guarantees of order since they travel on the normal priority paths

* Automated formatting of repo files [skip ci] (#1794)

* Install Boost for Windows GitHub Actions Workflows (#1790)

* Install Boost 1.74 for Windows release build packaging and benchmark installer GitHub Actions workflows
* Comment and minor clean-up of the scripts used for the Windows GHA workflows

* Automated formatting of repo files

Co-authored-by: Ryan Mast <nightlark@users.noreply.github.com>
Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Ryan Mast <nightlark@users.noreply.github.com>

* update the new command names

* Automated formatting of repo files (#1795)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Ryan Mast <nightlark@users.noreply.github.com>

* add ordering argument to brokerApp query calls

* Automated formatting of repo files (#1796)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix bug causing an overwritten flag

* Automated formatting of repo files (#1800)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ryan Mast <nightlark@users.noreply.github.com>

* Event triggered flag (#1804)

* Add an event triggered flag for timing, mainly for filters but can be used elsewhere.

* make some fixes for recorder and echo

* fix clang-tidy warnings

* shift the clone tests and more clang-tidy fixes

* add flag string translation support

* Automated formatting of repo files (#1805)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* add delay to clone queries

* add delay to clone queries

* Automated formatting of repo files (#1806)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix potential deadlock related to query changes

* Automated formatting of repo files (#1807)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix clone tests

* Automated formatting of repo files (#1808)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* add query_reply_ordered

* Automated formatting of repo files (#1809)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix time coordinator undefined behavior possibilities

* Automated formatting of repo files (#1810)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Fix a test that was failing under the no-zmq condition (#1812)

* Fix a test that was failing under the no-zmq condition

* Automated formatting of repo files (#1813)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* now compiling

* all tests passing

* Automated formatting of repo files (#1821)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* update queryMode style

* update the helics.h backup files

* Automated formatting of repo files (#1822)

Co-authored-by: Philip Top <top1@llnl.gov>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: HELICS-bot <HELICS-bot@users.noreply.github.com>
Co-authored-by: Ryan Mast <nightlark@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue concerning incorrect code operation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants