Skip to content

Commit

Permalink
Add extra_args options for arbitrary args to julia executable
Browse files Browse the repository at this point in the history
  • Loading branch information
augustjohansson committed Nov 22, 2024
1 parent 69d30ed commit 377a0b9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Utilities/JuliaBridge/JuliaInterface/ServerManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
addParameter(p , 'debug' , false , @(x) validateattributes(x, {'logical'}, {'scalar'}));
addParameter(p , 'reset' , false , @(x) validateattributes(x, {'logical'}, {'scalar'}));
addParameter(p , 'updateJuliaPackages', false , @(x) validateattributes(x, {'logical'}, {'scalar'}));

addParameter(p , 'extra_args' , '' , @ischar);

parse(p, varargin{:});
manager.options = p.Results;

Expand All @@ -55,6 +56,8 @@
[st, result] = mkdir(manager.use_folder);
assert(st == 1, 'Unable to use mkdir: %s', result);

manager.options.extra_args = [' ', manager.options.extra_args, ' '];

% Save options in file to be read in Julia
op = manager.options;
opt_file = fullfile(manager.use_folder, 'options.mat');
Expand All @@ -66,7 +69,8 @@
manager.base_call = [manager.options.julia, ' ' , ...
'--startup-file=' , manager.options.startup_file, ' ', ...
'--project=' , manager.options.project , ' ', ...
'--threads=' , num2str(manager.options.threads)];
'--threads=' , num2str(manager.options.threads), ...
manager.options.extra_args];

if isunix

Expand Down

0 comments on commit 377a0b9

Please sign in to comment.