From: Meng Han on
Hi, I submitted a matlabpool job to a local cluster. if i add following lines:

waitForState(j, 'finished')
r = getAllOutputArguments(j)

my local matlab will wait until job finishes, and everyting is fine. my problem is, after submission, can i exit my local matlab session while the job is still running on the cluster?

i tried to remove these two lines

waitForState(j, 'finished')
r = getAllOutputArguments(j)

but i can not get any result from local matlab, and ALSO, there is no result sent to my local folder (the folder specified in scheduler's DataLocation property) or remote folder (folder specified in remoteDataLocation). More exactly, when the job is submitted, a folder named "Job123" is created under my local DataLocation folder, but later this "Job123" folder is removed after the job is over.

Please help, thanks!
From: Meng Han on
sorry, a little typo:
i sent a matlabpool job to a "cluster" not a "local cluster"
From: Raymond Norris on
Hi Meng,

Once the job is submitted to the cluster, you can quit MATLAB. To ge the results later, try this

sched = findResource();
job = sched.createJob('tag','Meng')
job.createTask(@fcn,...)
job.submit()
exit % quit MATLAB

% Restart MATLAB
sched = findResource();
job = sched.findJob('tag','Meng');
out = job.getAllOutputArguments();

Job files are deleted when (a) you close a MATLAB Pool or (b) you destroy a job (i.e. job.destroy())

Let me know if you have any other questions.

Raymond

"Meng Han" <m7han.milan(a)gmail.com> wrote in message <h9dnsn$nm5$1(a)fred.mathworks.com>...
> Hi, I submitted a matlabpool job to a local cluster. if i add following lines:
>
> waitForState(j, 'finished')
> r = getAllOutputArguments(j)
>
> my local matlab will wait until job finishes, and everyting is fine. my problem is, after submission, can i exit my local matlab session while the job is still running on the cluster?
>
> i tried to remove these two lines
>
> waitForState(j, 'finished')
> r = getAllOutputArguments(j)
>
> but i can not get any result from local matlab, and ALSO, there is no result sent to my local folder (the folder specified in scheduler's DataLocation property) or remote folder (folder specified in remoteDataLocation). More exactly, when the job is submitted, a folder named "Job123" is created under my local DataLocation folder, but later this "Job123" folder is removed after the job is over.
>
> Please help, thanks!