Skip to content

Bugs related to MATLAB executor on Linux #417

@samarkanov

Description

@samarkanov

Summary of bugs and reproduction steps for Sumatra (with MATLAB executor) on:

  • Ubuntu 25.04
  • MATLAB R2025b
  • Sumatra 0.8.1

MATLAB executor does not support parameterless execution of MATLAB code

  1. In a folder where the sumatra project initialized, create a MATLAB function process_data.m
function process_data()
% Function with no input parameters
disp('hello');
end
  1. Run smt run --executable matlab --main process_data.m
  2. Sumatra generates this matlab command: matlab -nodesktop -nosplash -nojvm -nodisplay -wait -r "process_data(''); depfun process_data.m -toponly -quiet -print depfun.data; quit" in matlab.py
  3. Running this commant results in MATLAB error:
Error using process_data
Too many input arguments.
  1. As a result MATLAB session hangs and never quits

Sumatra does not support execution of MATLAB scripts stored in subfolders

  1. Create a nested folder inside the existing Sumatra project directory
  2. Create a MATLAB function process_data.m in that folder
  3. Run smt run --executable matlab --main src/process_data.m
  4. Sumatra generates this matlab command: matlab -nodesktop -nosplash -nojvm -nodisplay -wait -r "src/process_data(''); depfun process_data.m -toponly -quiet -print depfun.data; quit" in matlab.py
  5. Running this commant results in MATLAB error:
Unrecognized function or variable 'src'.
  1. As a result MATLAB session hangs and never quits

MATLAB dependency finder does not work on any release newer than MATLAB R2015b

  1. In a folder where the sumatra project initialized, create a MATLAB function process_data.m
function process_data(dummy)
% Function with no input parameters
disp('hello');
end
  1. Run smt run --executable matlab --main process_data.m in.param
  2. Sumatra generates this matlab command: matlab -nodesktop -nosplash -nojvm -nodisplay -wait -r "process_data('in.param'); depfun process_data.m -toponly -quiet -print depfun.data; quit" in matlab.py
  3. Running this commant results in MATLAB error:
Unrecognized function or variable 'depfun'.
  1. As a result MATLAB session hangs and never quits

The -wait flag is not supported by MATLAB CLI

The matlab.py generates a command that has -wait flag, but this argument is not supported (and likely was never supported).
Running this matlab -wait results in the warning: Warning: Unrecognized command line option: wait.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions