error running lines with parallel computing toolbox,

3 ビュー (過去 30 日間)
qi zeng
qi zeng 2022 年 6 月 3 日
コメント済み: qi zeng 2022 年 6 月 6 日
I am adopting NODDI toolbox in the following link Microstructure Imaging Group | NODDI Matlab toolbox (ucl.ac.uk) in R2019a
batch_fitting('NODDI_roi.mat', protocol, noddi, 'FittedParams.mat', 8);
This batch fitting run on a 8-core machine and require parallel computing toolbox. I checked license('test','Distrib_Computing_Toolbox') and it exists. However, I encoutered error message and wonder how to resolve it:
"{Error using ParforProgMon (line 118)
Java exception occurred:
java.awt.HeadlessException
at
java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
at java.awt.Window.<init>(Window.java:536)
at java.awt.Frame.<init>(Frame.java:420)
at javax.swing.JFrame.<init>(JFrame.java:233)
at
ParforProgressMonitor$ProgServer.<init>(ParforProgressMonitor.java:88)
at
ParforProgressMonitor$ProgServer.<init>(ParforProgressMonitor.java:77)
at ParforProgressMonitor.createServer(ParforProgressMonitor.java:16)
Error in batch_fitting (line 91)
ppm = ParforProgMon(['Fitting ' roifile, ' : '],
numOfVoxels-current_split_start+1,...

回答 (1 件)

Edric Ellis
Edric Ellis 2022 年 6 月 6 日
I suspect you're running MATLAB in a -nodisplay mode, and somwhere inside the code you're using, ParforProgMon is not equipped to handle that.
Somehow, you need to disable ParforProgMon in this case. Without seeing all the code you're using, the sort of thing you need to do is inject a call to usejava a bit like this:
if usejava('awt')
% Use ParforProgMon
else
% Don't use ParforProgMon
end
  1 件のコメント
qi zeng
qi zeng 2022 年 6 月 6 日
Yes, I did submit a lsf job with matlab -nodisplay -batch. Do you mean adding the beforementioned to the batch script I am submitting?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by