Process advisor 'runprocess' not found.

45 次查看(过去 30 天)
Joshua
Joshua 2024-9-16,15:09
回答: Michael 2024-9-18,13:53
My team is running matlab-batch in a CI/CD pipeline. I have installed the CI/CD Automation for Simulink toolbox. We have a processmodel.m file at the root of our project. When I run matlab-batch "runprocess();" I get a result of "Unrecognized function or variable runprocess". How do I include runprocess so that I can run Simulink Process Advisor in my pipeline?

采纳的回答

Michael
Michael 2024-9-18,13:53
It looks like MATLAB found by matlab-batch is not able to find the CI/CD Automation for Simulink toolbox Support Package. There are two likely causes for this:
1. The MATLAB used by matlab-batch is not the one linked to the Support package
This can happen when you try and run an mpm install to install on top of an already installed MATLAB but the `--destination` flag is passed incorrectly. This can cause a new MATLAB to be installed at that location as mpm will automatically install all dependencies.
2. The Support Package may be installed for the wrong user.
When installing MATLAB to a shared location, it is often achieved by running the install as `sudo`. This means that the environment and user are different than when MATLAB is run without the use of sudo. The likely contributor here is that Support Packages are installed in the home directly of the user executing the command, which is root when called as sudo. A simple solution to avoid this is to include `HOME=$HOME` between sudo and the mpm command.
You can see an example of how we install additional products on top of an existing MATLAB install here: building-on-matlab-docker-image
To troubleshoot I suggest you first inspect the installation of the support package and ensure that both the location and user look correct. If they do then you can run `which matlab` to ensure that matlab-batch is running the MATLAB that you expect. Finally you can run `matlabshared.supportpkg.getInstalled` to see the full list of installed Support Packages.
Hopefully these steps can resolve your issue

更多回答(0 个)

产品


版本

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by