Process advisor 'runprocess' not found.

6 Ansichten (letzte 30 Tage)
Joshua
Joshua am 16 Sep. 2024
Beantwortet: Michael am 18 Sep. 2024
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?

Akzeptierte Antwort

Michael
Michael am 18 Sep. 2024
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

Weitere Antworten (0)

Produkte


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by