Skip to content
New issue

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

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

Already on GitHub? # to your account

[Federated] Combination of broadcast, banks, and multiports causes a compile error only under decentralized coordination #1250

Closed
Soroosh129 opened this issue Jun 24, 2022 · 0 comments · Fixed by #1251

Comments

@Soroosh129
Copy link
Contributor

The following program fails to compile:

target C {
    coordination: decentralized
};
reactor People(N:int(2)) {
    output send:int;
    input[N] receive:int;
}
federated reactor (
    N:int(1)
) {
    people = new[N] People(N=N);
    (people.send)+ -> people.receive
}

with the following error:

file:/Users/soroush/Projects/examples-lingua-franca/C/src/ChatApplication/BroadcastWithMultiport.lf:113:36: error: member reference base type 'struct people [1]' is not a structure or union
            for(int i=0; i < people.receive_width; i++) {
                             ~~~~~~^~~~~~~~~~~~~~
file:/Users/soroush/Projects/examples-lingua-franca/C/src/ChatApplication/BroadcastWithMultiport.lf:114:23: error: member reference base type 'struct people [1]' is not a structure or union
                people.receive[i]->intended_tag = inherited_min_intended_tag;
                ~~~~~~^~~~~~~~
file:/Users/soroush/Projects/examples-lingua-franca/C/src/ChatApplication/BroadcastWithMultiport.lf:167:36: error: member reference base type 'struct people [1]' is not a structure or union
            for(int i=0; i < people.receive_width; i++) {
                             ~~~~~~^~~~~~~~~~~~~~
file:/Users/soroush/Projects/examples-lingua-franca/C/src/ChatApplication/BroadcastWithMultiport.lf:168:23: error: member reference base type 'struct people [1]' is not a structure or union
                people.receive[i]->intended_tag = inherited_min_intended_tag;
                ~~~~~~^~~~~~~~
4 errors generated.
make[2]: *** [CMakeFiles/BroadcastWithMultiport_people__0.dir/BroadcastWithMultiport_people__0.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/BroadcastWithMultiport_people__0.dir/all] Error 2
make: *** [all] Error 2
Compiled binary is in /Users/soroush/Projects/examples-lingua-franca/C/bin
lfc: error:  failed with error code 2
 --> (unknown file):null:1 -  failed with error code 2

lfc: fatal error: Aborting due to previous error

Changing the coordination to centralized fixes the issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant