Azzera filtri
Azzera filtri

How can I send a batch job with empty workspace ?

1 visualizzazione (ultimi 30 giorni)
Hi all. I used to submit my jobs via batch() to a remote linux-cluster running with torque. This was fine using R2011a. Having changed to R2013a I get the message:
Error using batch (line 140)
'Workspace' is not a valid property input to batch.
Since I still find the 'Workspace' parameter described in the documentation for the batch-command, I dont understand what is wrong with
emptyStruct=struct();
batch('script',1,{inputargs},'CurrentDirectory', homedir,'PathDependencies', {'somepaths'},'Matlabpool',nbOfWorker,'Workspace', struct());
I want only the inputargs to go with the batch, not my complete local workspace.
Any ideas? Thanks very much!
Rafael

Risposta accettata

Rafael
Rafael il 24 Mag 2013
Hi again and thanks for the hint concerning usage with script and function.
In fact, I use a function and not a script (as I wrote above by mistake, sorry.) so the arguments for the numberOfOutputArgs (2nd argument, a 1 in this example) and the given inputArgs (3rd argument) are probably not wrong.
I will try some things tomorrow using my local config for the weekend.
I'll be back then. Rafael
  1 Commento
Thomas Ibbotson
Thomas Ibbotson il 28 Mag 2013
If you are using a function, you do not need (and in fact are not allowed) the 'Workspace' parameter, as functions do not require a workspace to be defined. This is what the error message was attempting to tell you, although it was not being specific enough, it should have read something like:
'Workspace' is not a valid property input to batch with a function as the first argument.
Does this clear things up?

Accedi per commentare.

Più risposte (1)

Thomas Ibbotson
Thomas Ibbotson il 24 Mag 2013
Hi Rafael,
Unfortunately the error message you are receiving is misleading. The problem is that you are using the incorrect syntax for batch with scripts. The 2nd and 3rd input arguments you have provided are only used when the 1st argument is a function not a script. If you remove those arguments I think it should work.
Cheers, Tom

Categorie

Scopri di più su MATLAB Parallel Server in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by