I get no output from the task
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Jason Ross
2013 年 2 月 6 日
編集済み: Jason Ross
2013 年 2 月 6 日
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 件のコメント
Jason Ross
2013 年 2 月 6 日
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.
その他の回答 (0 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!