フィルターのクリア

fprintf output in a parallel computing job

3 ビュー (過去 30 日間)
Paul
Paul 2012 年 4 月 17 日
Hi,
If I use disp or fprintf in a function called as a task in a parallel computing job, where does the output end up? It does not appear in the desktop window. Is it written to a file somewhere, or is it discarded completely?
Thanks in advance, Paul

採用された回答

Edric Ellis
Edric Ellis 2012 年 4 月 17 日
If you use the batch function to submit a job, you can use the "diary" method on the job to see the output. For example
j = batch( 'disp hello' ); % submit a simple command
wait(j), diary(j) % display the output
If you use the jobs and tasks API directly, you need to set the "CaptureCommandWindowOutput"/"CaptureDiary" flag to true before submission, and check the "CommandWindowOutput"/"Diary" property after execution. (The first option is for R2011b and before, the second for the new API in R2012a).

その他の回答 (1 件)

Paul
Paul 2012 年 4 月 18 日
Thanks Edric!

Community Treasure Hunt

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

Start Hunting!

Translated by