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

Tracing option fails to appear in targetConfig #1602

Closed
edwardalee opened this issue Feb 23, 2023 · 8 comments · Fixed by #1663
Closed

Tracing option fails to appear in targetConfig #1602

edwardalee opened this issue Feb 23, 2023 · 8 comments · Fixed by #1663
Assignees
Labels
bug Something isn't working

Comments

@edwardalee
Copy link
Collaborator

In the tracing-federates branch, I attempted to add the following lines to FedLauncher.java:

        if (targetConfig.tracing != null) {
            commands.add("                        -t \\");
        }

However, even when tracing is set to true, targetConfig.tracing is null. I don't understand the code in TargetProperty.java. Can you fix this?

@edwardalee edwardalee added the bug Something isn't working label Feb 23, 2023
@ChadliaJerad
Copy link
Collaborator

I think this issue relates to the one I created 2 days ago: Target tracing property is not "inherited" is all the generated individual federates #1597.

@lhstrh
Copy link
Member

lhstrh commented Feb 23, 2023

In the tracing-federates branch, I attempted to add the following lines to FedLauncher.java:

        if (targetConfig.tracing != null) {
            commands.add("                        -t \\");
        }

However, even when tracing is set to true, targetConfig.tracing is null. I don't understand the code in TargetProperty.java. Can you fix this?

What is the problem with the TargetProperty class? If there was a bug there, tracing wouldn't work at all, also not in an unfederated program.

Maybe we should start addressing the FIXMEs in FedGenerator first? I'm looking at FedGenerator.createLauncher, for instance, and it first obtains a launcher based on the the target configuration of the first federate (why?), and then it invokes createLauncher on the obtained launcher object while passing in all federates. This code makes no sense to me... What are we expecting it to do even?

Update: if we want each federate to inherit target properties from the main file, which I'm not sure is generally true but probably is true for the tracing target property, simply using the setter as the default update function will work (bae32df). Previously, the default was to ignore updates if no custom update function was given. Note that for properties like cmake-include, where we want to merge lists, a custom update function must be provided, anyway.

@lhstrh
Copy link
Member

lhstrh commented Feb 24, 2023

See #1597 (comment)

@edwardalee
Copy link
Collaborator Author

These questions should have been addressed, I think, as part of the development of the fed-gen approach. Anyway, help would be welcome. I was not involved in either the fed-gen idea nor the implementation. I personally feel that federated execution (and scheduling enclaves) have higher priority than, say, bodiless reactions.

@lhstrh
Copy link
Member

lhstrh commented Feb 24, 2023

Do my changes address the problem satisfactorily? If so, let's close this issue.

@edwardalee
Copy link
Collaborator Author

edwardalee commented Mar 5, 2023

It seems that now the tracing: true property is properly set to true in all the generated .lf files for the federation. However, it is still not seen by the above code in FedLauncher.java, which still sees null. I see the following in FedGenerator.java:

            launcher = FedLauncherFactory.getLauncher(
                federates.get(0), // FIXME: This would not work for mixed-target programs.
                fileConfig,
                errorReporter
            );

This seems to be getting the target properties from the first federate, which has tracing: true.

Unfortunately, I still don't have a working debugger now that Eclipse no longer works, so I unable to trace this. Can @lhstrh help?

@lhstrh
Copy link
Member

lhstrh commented Mar 6, 2023

OK, will look into this. This needs to be fixed to get multi-target federations working, anyway.

@lhstrh
Copy link
Member

lhstrh commented Mar 18, 2023

Work in progress can be found here: #1663. I will also add unit tests to make sure that options propagate to federates...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants