Commit 2f6659c1 authored by Michael Krause's avatar Michael Krause 🎉
Browse files

software: add note about matlab's isdeployed/addpath

parent 265f9246
......@@ -6,7 +6,7 @@ Computing Server`_ product aims to implement a compatibility layer to a number
of PBS based clusters it just doesn't work reliably for a number of reasons.
Because there is only a limited number of shared licenses available it's also
not feasible to run an arbitrary number of matlab sessions in the form of jobs.
not feasible to run an arbitrary number of Matlab sessions in the form of jobs.
A workaround is to "compile" a script and create a standalone redistribution
environment, which does not require a license to run.
......@@ -89,7 +89,7 @@ Running :program:`mcc -m project.m` would then "compile" (or rather encrypt and
package) your function and output a system dependent binary named
:file:`project` and a wrapper script :file:`run_project.sh`. To run it you
now have to combine the wrapper script, the location of a Matlab Compile
Runtime or the local installation path of the matlab instance, that was used by
Runtime or the local installation path of the Matlab instance, that was used by
mcc, and a sufficient number of arguments for the function project().
Example:
......@@ -111,9 +111,12 @@ Example:
To include toolboxes in your script you have to add them during the compile step
so they get included in your package. Matlab built-in toolboxes like signal
so they get included in your package. Matlab built-in toolboxes such as signal
processing or statistics are detected automatically by scanning the functions
used in your script and don't need to be added explicitly.
used in your script and don't need to be added explicitly. Compiled scripts
can't use the `addpath()` function at runtime. You can guard those calls
however with the function `isdeployed()`, which will return 1 when Matlab
detects that it runs as a compiled script and 0 otherwise.
Example: Suppose you collect your project library in a toolbox called project,
which in turn uses the function `normrnd()` from the statistics package:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment