Add compiler support for RTI-driven transient federate launch#2606
Draft
kushalpaliwal01 wants to merge 146 commits intolf-lang:sstfrom
Draft
Add compiler support for RTI-driven transient federate launch#2606kushalpaliwal01 wants to merge 146 commits intolf-lang:sstfrom
kushalpaliwal01 wants to merge 146 commits intolf-lang:sstfrom
Conversation
…ut the coordination and the target
…nerator.java Co-authored-by: Edward A. Lee <eal@eecs.berkeley.edu>
Co-authored-by: Edward A. Lee <eal@eecs.berkeley.edu>
…sts and reduce redundancy
… of launching time in transient federates. This is simply done by increasing the timeout to 3s instead of 2s, and adjusting the check accordingly
… the increase in the timeout
Add command-line overrides for top-level int and time parameters
Transient fed merge
This file contains hidden or 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
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.
Summary
This PR adds compiler support for RTI-driven transient federate launching. The LF compiler now generates the config files and runtime initialization code the RTI and federate runtime need to launch transient federates on demand, without requiring the LF program to hardcode binary paths, SSH details, or SST configs.
Depends on: lf-lang/reactor-c#571
Transient federate config file generation
The LF compiler now generates a
transient_federates.configfile in the RTI's src-gen directory. This file lists every transient federate in the federation with all the information the RTI needs to launch it: its ID, name, IP address, SSH user, binary path, and SST config path. For local deployments these paths point to the federation's build directory. For remote deployments they point to the remote base directory.The RTI reads this file at startup via the new
-tfflag. The LF compiler automatically adds-tf <path>to the RTI launch command in the generated launcher script whenever the federation has transient federates.Port-to-transient federate mapping
To support the
lf_launch_transient_federate(port_name)API in reactor-c, the compiler generates a compile-time table that maps each output port name to the IDs of the transient downstream federates connected to it.At compile time, the compiler walks the federation's connection graph and records which output ports of each federate connect to transient downstream federates. This table is emitted as C initialization code that fills
_fed.port_to_transient_feds_mapping[]at startup, so the runtime can look up which transient federates to launch when a given port is used.