Skip to content

MATLAB/Octave nodes get empty reads: concore_literal_eval.m / concore_literal_serialize.m are not copied into studies #648

Open

Description

@Siddhanthguptaa

Since #575, concore_read.m, concore_write.m, concore_initval.m and concore_default_maxtime.m call concore_literal_eval / concore_literal_serialize, but mkconcore copies the MATLAB/Octave runtime into out/src from a fixed list that doesn't include those two files. So every generated .m node is missing them.

In concore_read.m the parse is inside try/catch, so the "undefined function" error turns into parsed = [] and the read silently returns empty. With demo/sampleM.graphml on Windows (Octave 11.3) the controller stops at the first read:

error: ym(1): out of bound 0 (dimensions are 0x0)
error: called from
    controller at line 3 column 6
    controllerM at line 17 column 5

in1/ym exists and contains [1.0, 0.01]; calling concore_literal_eval in the node folder gives 'concore_literal_eval' undefined. With the two files copied into the node folder, the same study runs the full loop.

CI doesn't catch this because the MATLAB job runs from the repo root, where the helpers are on the path.

I have a small fix with a test and will open a PR against dev.

Activity

  1. yadavchiragg commented on Nov 13, 2026

    @yadavchiragg

    Hi, I’d like to take this. I’ve reproduced it on dev and have a fix plus tests ready, PR coming shortly. @Siddhanthguptaa

  2. Siddhanthguptaa commented on Nov 13, 2026

    @Siddhanthguptaa
    Author

    @yadavchiragg As I noted in the issue description, I already had a fix and test ready and opened #649 for it. I had closed it temporarily waiting for feedback from maintainers. Please hold off on #672, it makes review harder for the maintainers. For next time, please ask for approval from the author before opening a PR on any issue. Suggestions are always welcome if you spot anything.

  3. yadavchiragg commented on Nov 14, 2026

    @yadavchiragg

    Understood, thanks @Siddhanthguptaa, I should have waited for your reply before opening a PR. I'll close #672 so that your #649 can go through review.

    One thing from my reproduction that may be useful for yours: concore_default_maxtime.m also calls concore_literal_eval, not only concore_read.m/concore_write.m/concore_initval.m. The test in #672 may also be worth taking: it generates demo/sampleM.graphml for posix, windows and docker and checks that every concore_* function called by a copied runtime .m file is itself copied (tests/test_matlab_runtime_files.py). Feel free to use any of it.

  4. Siddhanthguptaa commented on Nov 14, 2026

    @Siddhanthguptaa
    Author

    Thanks, concore_default_maxtime.m is already covered: it's listed in the issue and the fix copies the helper for every caller. I've added a posix/windows/docker test to #649.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions