I get no output from the task
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello, I have a function, which runs perfectly fine on its own, with the following header:
[ensemble_2drift_dwm_nb, acc_2drift_dwm_nb, ens_hist_2drift_dwm_nb, result_2drift_dwm_nb, preds_2drift_dwm_nb, result_test_2drift_dwm_nb, preds_test_2drift_dwm_nb, avg_result_test_2drift_dwm_nb, exp_hist_2drift_dwm_nb] = dwm03_bin_testset(data_2drift_train, lab_2drift_train, 0.5, 0.01, 1, naivebc_r, data_2drift_test, lab_2drift_test)
now I want to run the above function in a separate task. For this purpose I use the following code:
j1 = createJob();
t1 = createTask(j1, @dwm03_bin_testset, 9, {data_2drift_train, lab_2drift_train, 0.5, 0.01, 1, naivebc_r, data_2drift_test, lab_2drift_test});
submit(j1);
waitForState(j1);
get(t1, 'State')
taskoutput1 = get(t1, 'OutputArguments');
Problem: After running this script, the variable taskoutput1, which is supposed to store the output from the function call, is 0x0 cell array.
Now, I was testing this and noticed that I get 'finished' state of the job much faster than I should. Also, I am not sure whether the function call in the task uses the same path as normal function call, because when I was testing with a simple function, and put it in some other folder, which was included in path, I was getting 0x0 cell array as an output as well.
Can anyone shed some light on this issue? My version of Matlab is R2011a. Thanks.
0 Commenti
Risposta accettata
Jason Ross
il 6 Feb 2013
Modificato: Jason Ross
il 6 Feb 2013
Check the task for an Error, something like
taskerror1 = get(t1, 'Error')
This might help you to debug your issue. You can also get the ErrorMessage and ErrorIdentifier, as well.
4 Commenti
Jason Ross
il 6 Feb 2013
Great! Keep in mind that any job you submit to the cluster will have those files/directories attached. If you don't want that, use the second option.
Più risposte (0)
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!