Skip to content

Fix file structure for future networks option#2070

Merged
lhstrh merged 30 commits into
masterfrom
network-structure
Dec 2, 2023
Merged

Fix file structure for future networks option#2070
lhstrh merged 30 commits into
masterfrom
network-structure

Conversation

@Jakio815

@Jakio815 Jakio815 commented Oct 21, 2023

Copy link
Copy Markdown
Collaborator

This should be merged with lf-lang/reactor-c#292. Details are inside that PR.

This is a minor change for the code generator.

@Jakio815

Copy link
Copy Markdown
Collaborator Author

Hi @petervdonovan. I'm having the problem in this issue #1838. Do you think it's just failing or will there be any other reasons? I totally have no idea why this test is failing. But I'm starting to doubt myself because even though I rerun those tests it still doesn't work. I'd like some help for this.

@petervdonovan

Copy link
Copy Markdown
Collaborator

The diff in the reactor-c submodule in this PR is larger than the diff in the linked reactor-c PR: lf-lang/reactor-c@5bbdefd...eed0374

If there is a segfault still then maybe it would be good to do whatever rebasing/submodule updating is necessary to isolate the changes that are relevant to this PR. IIUC this and the linked PR look like they should only introduce organizational changes and not significant semantic changes to the semantics of the C code in the C runtime.

@Jakio815

Jakio815 commented Nov 5, 2023

Copy link
Copy Markdown
Collaborator Author

@petervdonovan Thanks for your tips. I did the rebasing but it still gets this error. I tried on local environments, but it passes all the federated/ tests. What do you think I should try?

And I kind of didn't understand what you told me about the diff is different. What's the point that is different?

@Jakio815

Jakio815 commented Nov 5, 2023

Copy link
Copy Markdown
Collaborator Author

Oh, I'm getting these failures now on local. I'll take a look at it.

@petervdonovan

Copy link
Copy Markdown
Collaborator

It looks like the reason why there are failures in this branch but not in master is that lingua-franca/master is not tracking reactor-c/main, and reactor-c/main is broken. Looking into it.

@Jakio815

Jakio815 commented Nov 6, 2023

Copy link
Copy Markdown
Collaborator Author

Still getting this strange segfault.

(lf) ➜  lingua-franca git:(network-structure) ✗ ./gradlew singleTest -DsingleTest=test/Python/src/federated/DistributedLoopedAction.lf

> Task :core:integrationTest

RunSingleTest > runSingleTest() STANDARD_OUT
    Indexing...
    /home/dongha/project/lingua-franca/test/C/src
    /home/dongha/project/lingua-franca/test/CCpp/src
    WARNING: No test directory for target CCpp

    /home/dongha/project/lingua-franca/test/Cpp/src
    /home/dongha/project/lingua-franca/test/TypeScript/src
    /home/dongha/project/lingua-franca/test/Python/src
    /home/dongha/project/lingua-franca/test/Rust/src
    ==============================================================================
    ------------------------------------------------------------------------------
    Passing: 0/1
    ------------------------------------------------------------------------------
    ------------------------------------------------------------------------------
    +---------------------------------------------------------------------------+
    Failed: src/federated/DistributedLoopedAction.lf in 300.00 seconds

    -----------------------------------------------------------------------------
    Reason: Test timed out.
    Compilation output:
    INFO: ##### Generating code for federate federate__sender in directory /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src
    INFO: ##### Generating code for federate federate__receiver in directory /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src
    INFO: ******** Using 2 threads to compile the program.
    INFO: Generating code for: file:/home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src/federate__sender.lf
    INFO: Generating code for: file:/home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src/federate__receiver.lf
    INFO: Generation mode: STANDALONE
    INFO: Generation mode: STANDALONE
    INFO: Generating sources into: /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__sender
    INFO: Generating sources into: /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__receiver
    INFO: Target Configuration:
          - _fed_setup: include/_federate__sender_preamble.h
          - keepalive: true
          - threading: true
          - compile-definitions: {EXECUTABLE_PREAMBLE=, FEDERATED=, FEDERATED_CENTRALIZED=, NUMBER_OF_FEDERATES=2}
          - timeout: 1 sec
          - compiler: gcc
    INFO: Target Configuration:
          - _fed_setup: include/_federate__receiver_preamble.h
          - keepalive: true
          - threading: true
          - compile-definitions: {EXECUTABLE_PREAMBLE=, FEDERATED=, FEDERATED_CENTRALIZED=, NUMBER_OF_FEDERATES=2}
          - timeout: 1 sec
          - compiler: gcc
    Cleaning /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/include/src/federate__sender
    Cleaning /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/include/src/federate__receiver
    Cleaning /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__sender/build
    Cleaning /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__receiver/build
    --- Current working directory: /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__receiver/build
    --- Current working directory: /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__sender/build
    --- Executing command: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction -DCMAKE_INSTALL_BINDIR=bin -DLF_FILE_SEPARATOR="/" /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__receiver
    --- Executing command: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction -DCMAKE_INSTALL_BINDIR=bin -DLF_FILE_SEPARATOR="/" /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__sender
    -- The C compiler identification is GNU 11.4.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/gcc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Including sources for threaded runtime with  worker(s) with scheduler= and tracing=.
    -- Including the following sources: tag.c, port.c, mixed_radix.c, reactor_common.c, lf_token.c, environment.c, clock-sync.c, federate.c, net_util.c, reactor_threaded.c, scheduler_adaptive.c, scheduler_GEDF_NP.c, scheduler_NP.c, scheduler_sync_tag_advance.c, scheduler_instance.c, watchdog.c, vector.c, pqueue.c, util.c, semaphore.c, hashset.c, hashset_itr.c, modes.c, lf_unix_clock_support.c, lf_unix_syscall_support.c, lf_linux_support.c, lf_macos_support.c, lf_windows_support.c, lf_nrf52_support.c, lf_zephyr_support.c, lf_zephyr_clock_counter.c, lf_zephyr_clock_kernel.c, lf_rp2040_support.c
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
    -- Found Threads: TRUE
    -- Applying preprocessor definitions...
    -- EXECUTABLE_PREAMBLE=TRUE
    -- FEDERATED_CENTRALIZED=TRUE
    -- FEDERATED=TRUE
    -- LF_REACTION_GRAPH_BREADTH=2
    -- LF_THREADED=1
    -- LOG_LEVEL=2
    -- NUMBER_OF_FEDERATES=2
    -- LF_FILE_SEPARATOR="/"
    -- Found Python: /home/dongha/anaconda3/envs/lf/bin/python3.10 (found suitable version "3.10.13", required range is "3.10.0...<3.11.0") found components: Interpreter Development Development.Module Development.Embed
    -- Configuring done (0.2s)
    -- Generating done (0.0s)
    -- Build files have been written to: /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedActio-- The C compiler identification is GNU 11.4.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Checkn/src-gen/federate__sender/build
     for working C compiler: /usr/bin/gcc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Including sources for threaded runtime with  worker(s) with scheduler= and tracing=.
    -- Including the following sources: tag.c, port.c, mixed_radix.c, reactor_common.c, lf_token.c, environment.c, clock-sync.c, federate.c, net_util.c, reactor_threaded.c, scheduler_adaptive.c, scheduler_GEDF_NP.c, scheduler_NP.c, scheduler_sync_tag_advance.c, scheduler_instance.c, watchdog.c, vector.c, pqueue.c, util.c, semaphore.c, hashset.c, hashset_itr.c, modes.c, lf_unix_clock_support.c, lf_unix_syscall_support.c, lf_linux_support.c, lf_macos_support.c, lf_windows_support.c, lf_nrf52_support.c, lf_zephyr_support.c, lf_zephyr_clock_counter.c, lf_zephyr_clock_kernel.c, lf_rp2040_support.c
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
    -- Found Threads: TRUE
    -- Applying preprocessor definitions...
    -- EXECUTABLE_PREAMBLE=TRUE
    -- FEDERATED_CENTRALIZED=TRUE
    -- FEDERATED=TRUE
    -- LF_REACTION_GRAPH_BREADTH=1
    -- LF_THREADED=1
    -- LOG_LEVEL=2
    -- NUMBER_OF_FEDERATES=2
    -- LF_FILE_SEPARATOR="/"
    -- Found Python: /home/dongha/anaconda3/envs/lf/bin/python3.10 (found suitable version "3.10.13", required range is "3.10.0...<3.11.0") found components: Interpreter Development Development.Module Development.Embed
    -- Configuring done (0.2s)
    -- Generating done (0.0s)
    -- Build files have been written to: /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__receiver/build
    --- Current working directory: /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__sender/build
    --- Current working directory: /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__receiver/build
    --- Executing command: cmake --build . --target install --parallel 32 --config Debug
    --- Executing command: cmake --build . --target install --parallel 32 --config Debug
    [  2%] Building C object core/CMakeFiles/core.dir/tag.c.o
    [  4%] Building C object core/CMakeFiles/core.dir/port.c.o
    [  6%] Building C object core/CMakeFiles/core.dir/mixed_radix.c.o
    [  8%] Building C object core/CMakeFiles/core.dir/reactor_common.c.o
    [ 11%] Building C object core/CMakeFiles/core.dir/lf_token.c.o
    [ 13%] Building C object core/CMakeFiles/core.dir/environment.c.o
    [ 15%] Building C object core/CMakeFiles/core.dir/federated/federate.c.o
    [ 17%] Building C object core/CMakeFiles/core.dir/federate[  2%] Building C object core/CMakeFiles/core.dir/tag.c.o
    [  4%] Building C object core/CMakeFiles/core.dir/port.c.o
    [  6%] Build/clock-sync.c.o
    [ 20%] Building C object core/CMakeFiles/core.dding C object core/CMakeFiles/core.dir/mixed_radix.c.o
    [  8%] Buir/federated/network/net_util.c.o
    [ 22%] Building C object core/ilding C object core/CMakeFiles/core.dir/reactor_common.c.o
    [ 13CMakeFiles/core.dir/threaded/reactor_threaded.c.o
    [ 24%] Building C object core/CMakeFiles/core.dir/threaded/scheduler_adaptive.%] Building C object core/CMakeFiles/core.dir/environment.c.o
    [ c.o
    [ 26%] Building C object core/CMakeFiles/core.dir/threaded/s13%] Building C object core/CMakeFiles/core.dir/lf_token.c.o
    [ 1cheduler_GEDF_NP.c.o
    [ 28%] Building C object core/CMakeFiles/core.dir/threaded/scheduler_NP.c.o
    [ 31%] Building C object core/C5%] Building C object core/CMakeFiles/core.dir/federated/clock-sMakeFiles/core.dir/threaded/scheduler_sync_tag_advance.c.o
    [ 33%ync.c.o
    [ 17%] Building C object core/CMakeFiles/core.dir/federa] Building C object core/CMakeFiles/core.dir/threaded/scheduler_instance.c.o
    [ 35%] Building C object core/CMakeFiles/core.dir/threaded/watchdog.c.o
    [ 37%] Building C object core/CMakeFiles/core.dir/utils/vector.c.o
    [ 40%] Building C object core/CMakeFiles/core.dir/utils/util.c.o
    [ 42%] Building C object core/CMakeFiles/core.dir/utils/pqueue.c.o
    [ 44%] Building C object core/CMakeFiles/core.dir/utils/semaphore.c.o
    [ 46%] Building C object core/CMakeFiles/core.dir/utils/hashset/hashset.c.o
    [ 48%] Building C object core/CMakeFiles/core.dir/utils/hashset/hashset_itr.c.o
    [ 51%] Building C object core/CMakeFiles/core.dir/modal_models/modted/federate.c.o
    [ 19%] Building C object core/CMakeFiles/core.des.c.o
    [ 53%] Building C object core/CMakeFiles/core.dir/platform/lf_unix_syscall_support.c.o
    [ 55%] Building C object core/CMakir/federated/network/net_util.c.o
    [ 23%] Building C object core/eFiles/core.dir/platform/lf_unix_clock_support.c.o
    [ 57%] Building C object core/CMakeFiles/core.dir/platform/lf_macos_support.c.o
    [ 60%] Building C object core/CMakeFiles/core.dir/platform/lf_linux_support.c.o
    [ 62%] Building C object core/CMakeFiles/core.dir/platform/lf_nrf52_support.c.o
    [ 64%] Building C object core/CMakeFiles/core.dir/platform/lf_zephyr_support.c.o
    [ 66%] Building C object core/CMakeFiles/core.dir/platform/lf_windows_support.c.o
    [ 68%] Building C object core/CMakeFiles/core.dir/platformCMakeFiles/core.dir/threaded/scheduler_adaptive.c.o
    [ 23%] Build/lf_zephyr_clock_counter.c.o
    [ 71%] Building C object core/CMakeing C object core/CMakeFiles/core.dir/threaded/reactor_threaded.Files/core.dir/platform/lf_zephyr_clock_kernel.c.o
    [ 73%] Building C object core/CMakeFiles/core.dir/platform/lf_rp2040_support.c.o
    [ 26%] Building C object core/CMakeFiles/core.dir/threaded/sc.o
    cheduler_GEDF_NP.c.o
    [ 28%] Building C object core/CMakeFiles/core.dir/threaded/scheduler_NP.c.o
    [ 32%] Building C object core/CIn file included from /home/dongha/project/lingua-franca/test/PyMakeFiles/core.dir/threaded/scheduler_instance.c.o
    [ 32%] Buildithon/fed-gen/DistributedLoopedAction/src-gen/federate__sender/cong C object core/CMakeFiles/core.dir/threaded/scheduler_sync_tagre/federated/clock-sync.c:45:
    /home/dongha/project/lingua-franca_advance.c.o
    [ 34%] Building C object core/CMakeFiles/core.dir/t/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__sender/core/federated/clock-sync.c: In function ‘handle_T4_clochreaded/watchdog.c.o
    [ 36%] Building C object core/CMakeFiles/cok_sync_message’:
    /home/dongha/project/lingua-franca/test/Pythore.dir/utils/vector.c.o
    [ 39%] Building C object core/CMakeFilesn/fed-gen/DistributedLoopedAction/src-gen/federate__sender/core/federated/clock-sync.c:443:22: warning: format ‘%ld’ expects/core.dir/utils/util.c.o
    [ 41%] Building C object core/CMakeFile argument of type ‘long int’, but argument 4 has type ‘long long int’ [-Wformat=]
      443 |         LF_PRINT_LOG("Clock sys/core.dir/utils/semaphore.c.o
    [ 43%] Building C object core/CManc:"
          |                      ^~~~~~~~~~~~~
    ......
      452 |  keFiles/core.dir/utils/hashset/hashset.c.o
    [ 47%] Building C obj                   stats.average,
          |                     ~~~~~~~~~~~~~
          |                          |
          |          ect core/CMakeFiles/core.dir/utils/hashset/hashset_itr.c.o
    [ 47%                long long int
    /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__s] Building C object core/CMakeFiles/core.dir/modal_models/modes.ender/core/../include/core/utils/util.h:175:34: note: in definition of macro ‘LF_PRINT_LOG’
      175 |                     lf_pc.o
    [ 50%] Building C object core/CMakeFiles/core.dir/utils/pquerint_log(format, ##__VA_ARGS__); \
          |                                  ^~~~~~
    /home/dongha/project/lingua-franca/test/Pythoue.c.o
    [ 52%] Building C object core/CMakeFiles/core.dir/platforn/fed-gen/DistributedLoopedAction/src-gen/federate__sender/core/m/lf_unix_clock_support.c.o
    [ 54%] Building C object core/CMakeFfederated/clock-sync.c:443:22: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘loniles/core.dir/platform/lf_linux_support.c.o
    [ 58%] Building C obg long int’ [-Wformat=]
      443 |         LF_PRINT_LOG("Clock sync:"
          |                      ^~~~~~~~~~~~~
    ......
      453 |  ject core/CMakeFiles/core.dir/platform/lf_macos_support.c.o
    [ 58                   stats.standard_deviation,
          |            %] Building C object core/CMakeFiles/core.dir/platform/lf_unix_syscall_support.c.o
    [ 60%] Building C object core/CMakeFiles/core         ~~~~~~~~~~~~~~~~~~~~~~~~
          |                       .dir/platform/lf_windows_support.c.o
    [ 63%] Building C object co   |
          |                          long long int
    /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedActire/CMakeFiles/core.dir/platform/lf_nrf52_support.c.o
    [ 65%] Builon/src-gen/federate__sender/core/../include/core/utils/util.h:175:34: note: in definition of macro ‘LF_PRINT_LOG’
      175 |   ding C object core/CMakeFiles/core.dir/platform/lf_zephyr_suppor                  lf_print_log(format, ##__VA_ARGS__); \
          |t.c.o
    [ 67%] Building C object core/CMakeFiles/core.dir/platform                                  ^~~~~~
    /lf_zephyr_clock_counter.c.o
    [ 69%] Building C object core/CMakeFiles/core.dir/platform/lf_zephyr_clock_kernel.c.o
    [ 71%] Building C object core/CMakeFiles/core.dir/platform/lf_rp2040_support.c.o
    In file included from /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__receiver/core/federated/clock-sync.c:45:
    /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__receiver/core/federated/clock-sync.c: In function ‘handle_T4_clock_sync_message’:
    /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__receiver/core/federated/clock-sync.c:443:22: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘long long int’ [-Wformat=]
      443 |         LF_PRINT_LOG("Clock sync:"
          |                      ^~~~~~~~~~~~~
    ......
      452 |                     stats.average,
          |                     ~~~~~~~~~~~~~
          |                          |
          |                          long long int
    /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__receiver/core/../include/core/utils/util.h:175:34: note: in definition of macro ‘LF_PRINT_LOG’
      175 |                     lf_print_log(format, ##__VA_ARGS__); \
          |                                  ^~~~~~
    /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__receiver/core/federated/clock-sync.c:443:22: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘long long int’ [-Wformat=]
      443 |         LF_PRINT_LOG("Clock sync:"
          |                      ^~~~~~~~~~~~~
    ......
      453 |                     stats.standard_deviation,
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~
          |                          |
          |                          long long int
    /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__receiver/core/../include/core/utils/util.h:175:34: note: in definition of macro ‘LF_PRINT_LOG’
      175 |                     lf_print_log(format, ##__VA_ARGS__); \
          |                                  ^~~~~~
    [ 75%] Linking C static library libcore.a
    [ 75%] Built target core
    [ 77%] Building C object CMakeFiles/LinguaFrancafederate__sender.dir/lib/schedule.c.o
    [ 80%] Building C object CMakeFiles/LinguaFrancafederate__sender.dir/lib/python_action.c.o
    [ 82%] Building C object CMakeFiles/LinguaFrancafederate__sender.dir/lib/python_port.c.o
    [ 84%] Building C object CMakeFiles/LinguaFrancafederate__sender.dir/lib/python_tag.c.o
    [ 86%] Building C object CMakeFiles/LinguaFrancafederate__sender.dir/lib/python_time.c.o
    [ 88%] Building C object CMakeFiles/LinguaFrancafederate__sender.dir/lib/pythontarget.c.o
    [ 91%] Building C object CMakeFiles/LinguaFrancafederate__sender.dir/_federate__sender_main.c.o
    [ 93%] Building C object CMakeFiles/LinguaFrancafederate__sender.dir/_sender.c.o
    [ 95%] Building C object CMakeFiles/LinguaFrancafederate__sender.dir/_networksender_0null.c.o
    [ 97%] Building C object CMakeFiles/LinguaFrancafederate__sender.dir/federate__sender.c.o
    [100%] Linking C shared module /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__sender/LinguaFrancafederate__sender.so
    [100%] Built target LinguaFrancafederate__sender
    Install the project...
    -- Install configuration: "Release"
    /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src/federate__sender.lf: In function ‘_networksender_0nullreaction_function_1’:
    /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src/federate__sender.lf:54:68: warning: passing argument 2 of ‘PyBytes_AsStringAndSize’ from incompatible pointer type [-Wincompatible-pointer-types]
       54 |     int returnValue = PyBytes_AsStringAndSize(serialized_pyobject, &serialized_message.buf, &serialized_message.len);
          |                                                                    ^~~~~~~~~~~~~~~~~~~~~~~
          |                                                                    |
          |                                                                    void **
    In file included from /home/dongha/anaconda3/envs/lf/include/python3.10/Python.h:82,
                     from /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__sender/include/pythontarget.h:49,
                     from /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__sender/include/federate__sender/NetworkSender_00.h:15,
                     from /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__sender/_networksender_0null.c:2:
    /home/dongha/anaconda3/envs/lf/include/python3.10/bytesobject.h:56:12: note: expected ‘char **’ but argument is of type ‘void **’
       56 |     char **s,           /* pointer to buffer variable */
          |     ~~~~~~~^
    INFO: Compiled binary is in /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/bin
    [ 73%] Linking C static library libcore.a
    [ 73%] Built target core
    [ 76%] Building C object CMakeFiles/LinguaFrancafederate__receiver.dir/lib/schedule.c.o
    [ 78%] Building C object CMakeFiles/LinguaFrancafederate__receiver.dir/lib/python_action.c.o
    [ 80%] Building C object CMakeFiles/LinguaFrancafederate__receiver.dir/lib/python_port.c.o
    [ 82%] Building C object CMakeFiles/LinguaFrancafederate__receiver.dir/lib/python_tag.c.o
    [ 84%] Building C object CMakeFiles/LinguaFrancafederate__receiver.dir/lib/python_time.c.o
    [ 86%] Building C object CMakeFiles/LinguaFrancafederate__receiver.dir/lib/pythontarget.c.o
    [ 89%] Building C object CMakeFiles/LinguaFrancafederate__receiver.dir/_federate__receiver_main.c.o
    [ 91%] Building C object CMakeFiles/LinguaFrancafederate__receiver.dir/_receiver.c.o
    [ 93%] Building C object CMakeFiles/LinguaFrancafederate__receiver.dir/_networkreceiver_0.c.o
    [ 95%] Building C object CMakeFiles/LinguaFrancafederate__receiver.dir/__receiverin_.c.o
    [ 97%] Building C object CMakeFiles/LinguaFrancafederate__receiver.dir/federate__receiver.c.o
    [100%] Linking C shared module /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__receiver/LinguaFrancafederate__receiver.so
    [100%] Built target LinguaFrancafederate__receiver
    Install the project...
    -- Install configuration: "Release"
    INFO: Compiled binary is in /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/bin
    INFO: ##### Generating launcher for federation  in directory /home/dongha/project/lingua-franca/test/Python/bin/federated

    Execution output:
    Federate DistributedLoopedAction in Federation ID 'da14ee6a983180b9bf512e45dcaac5f7ba67aa9a8f018a25'
    #### Launching the federate federate__sender.
    #### Launching the federate federate__receiver.
    #### Bringing the RTI back to foreground so it can receive Control-C.
    RTI -i ${FEDERATION_ID} -n 2 -c init exchanges-per-interval 10
    Federate 0: ERROR: FATAL: Calling reaction _sender.reaction_function_0 failed.
    Traceback (most recent call last):
      File "/home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__sender/federate__sender.py", line 121, in reaction_function_0
    Federation ID for executable /home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__sender/federate__sender.py: da14ee6a983180b9bf512e45dcaac5f7ba67aa9a8f018a25
    ---- System clock resolution: 1 nsec
    ---- Start execution at time Sun Nov  5 16:20:49 2023
    ---- plus 326364949 nanoseconds
    Federate 0: Successfully connected to RTI.
    Federate 0: Connected to RTI at localhost:15045.
    Federate 0: Starting timestamp is: 1699226450326787975.
    Federate 0: Environment 0: ---- Spawning 1 workers.
        if self.sent_messages < self.take_a_break_after:
      File "/home/dongha/project/lingua-franca/test/Python/fed-gen/DistributedLoopedAction/src-gen/federate__sender/federate__sender.py", line 102, in take_a_break_after
        return self._take_a_break_after # pylint: disable=no-member
    WARNING: RTI: Socket to federate 0 is closed. Exiting the thread.
    Segmentation fault (core dumped)

    +---------------------------------------------------------------------------+

RunSingleTest > runSingleTest() FAILED
    org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
        at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
        at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
        at app//org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
        at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
        at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:31)
        at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:180)
        at app//org.lflang.tests.TestBase.checkAndReportFailures(TestBase.java:355)
        at app//org.lflang.tests.TestBase.runSingleTestAndPrintResults(TestBase.java:310)
        at app//org.lflang.tests.RunSingleTest.runSingleTest(RunSingleTest.java:75)

1 test completed, 1 failed

> Task :core:integrationTest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':core:integrationTest'.
> There were failing tests. See the report at: file:///home/dongha/project/lingua-franca/core/build/reports/tests/integrationTest/index.html

* Try:
> Run with --scan to get full insights.

BUILD FAILED in 5m 3s
18 actionable tasks: 2 executed, 16 up-to-date
(lf) ➜  lingua-franca git:(network-structure) ✗

@petervdonovan

Copy link
Copy Markdown
Collaborator

Yes, I saw. reactor-c/main is broken. The problems have nothing to do with your PR. If this is blocking you then you should simply revert lf-lang/reactor-c#293 in your reactor-c branch.

@Jakio815 Jakio815 marked this pull request as ready for review November 6, 2023 19:52
@Jakio815 Jakio815 requested a review from lhstrh November 6, 2023 23:59
@Jakio815 Jakio815 added the refactoring Code quality enhancement label Nov 22, 2023
@Jakio815 Jakio815 changed the title Draft: Fix file structure for future networks option Fix file structure for future networks option Dec 1, 2023
@Jakio815

Jakio815 commented Dec 2, 2023

Copy link
Copy Markdown
Collaborator Author

@lhstrh Would you please review this?

@Jakio815

Jakio815 commented Dec 2, 2023

Copy link
Copy Markdown
Collaborator Author

@lhstrh Looks like I'm not authorized to merge this. Would you please merge it?

@lhstrh lhstrh added this pull request to the merge queue Dec 2, 2023
Merged via the queue into master with commit 2cb9b33 Dec 2, 2023
@lhstrh lhstrh deleted the network-structure branch December 2, 2023 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Code quality enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants