DPARSFA parallel pool error

Submitted by lihong001 on

Dear Chao-gan,

 Greetings!

 I am trying to use DPARSFA to run analyses. The first time I run, I got the following error message:

realign Setup:c1853a3 OK
 
 
------------------------------------------------------------------------
Running job #1
------------------------------------------------------------------------
Running 'Realign: Estimate & Reslice'
Failed  'Realign: Estimate & Reslice'
Running 'Realign: Estimate & Reslice'
Failed  'Realign: Estimate & Reslice'
Running 'Realign: Estimate & Reslice'
Failed  'Realign: Estimate & Reslice'
Error using fclose
Invalid file identifier.  Use fopen to generate a valid file identifier.
In file "/usr/local/packages/MATLAB/REST_V1.8_130615/rest_spm5_files/@nifti/private/write_hdr_raw.m" (v1059), function "write_hdr_raw" at line 71.
In file "/usr/local/packages/MATLAB/REST_V1.8_130615/rest_spm5_files/@nifti/create.m" (v433), function "create_each" at line 27.
In file "/usr/local/packages/MATLAB/REST_V1.8_130615/rest_spm5_files/@nifti/create.m" (v433), function "create" at line 15.
In file "/usr/local/packages/MATLAB/spm8/spm_create_vol.m" (v1169), function "create_vol" at line 162.
In file "/usr/local/packages/MATLAB/spm8/spm_create_vol.m" (v1169), function "spm_create_vol" at line 16.
In file "/usr/local/packages/MATLAB/spm8/spm_write_vol.m" (v1143), function "spm_write_vol" at line 82.
In file "/usr/local/packages/MATLAB/spm8/spm_reslice.m" (v3756), function "reslice_images" at line 250.
In file "/usr/local/packages/MATLAB/spm8/spm_reslice.m" (v3756), function "spm_reslice" at line 114.
In file "/usr/local/packages/MATLAB/spm8/config/spm_run_realign_estwrite.m" (v1185), function "spm_run_realign_estwrite" at line 40.
 
The following modules did not run:
Failed: Realign: Estimate & Reslice
Running 'Realign: Estimate & Reslice'
Failed  'Realign: Estimate & Reslice'
Error using cfg_util (line 808)
Job execution failed. The full log of this run can be found in MATLAB command window,
starting with the lines (look for the line showing the exact #job as displayed in this error
message)
------------------
Running job #1
------------------
Error in spm_jobman (line 206)
Error in DPARSFA_run>(parfor body) (line 498)
Error in DPARSFA_run (line 453)
    parfor i=1:AutoDataProcessParameter.SubjectNum
Error in DPARSFA>pushbuttonRun_Callback (line 1579)
    [Error]=DPARSFA_run(handles.Cfg);
Error in gui_mainfcn (line 95)
        feval(varargin{:});
Error in DPARSFA (line 33)
    gui_mainfcn(gui_State, varargin{:});
Error while evaluating uicontrol Callback
 
I simply restarted the program, loaded the settings using the saved .mat file, then I met a parallel working problem. Although I set the parallel workers as 0 in the GUI window , it  seems automatically assigned  8 parallel workers (eight subjects?).  Here is  what in matlab log:
 
Starting parallel pool (parpool) using the 'local' profile ... connected to 8 workers.
Analyzing and transferring files to the workers ...>> 
 
 It stayed at this stage for over 10 hours without actually doing any analysis further. Is it really running the analysis in the background? I didn't find any outputs at all which makes me doubt it is doing anything.  I am using matlab2014a. Any idea of possible problems? Many thanks for your insight. 
 
Another question is regarding the functional connectivity. In defining ROIs, is that okay to include a ROI (for example cingulate) overlapping with another ROI  (say anterior cingulate, a subregion of the cingulate)? In anther words, whether the ROIs input in your program have to be spatially independent or not? Does the program run each ROI connectivity with the rest voxels of the brain independently or use a GLM type of model? Thanks.
 

YAN Chao-Gan

Fri, 08/07/2015 - 02:21

Hi Lihong,

1. This is related to the conflict between SPM8/12 files and the spm5 files inside REST. For REST, please don't add with subfolders, just set path for the main folder is OK. 

2. Seems there is something wrong with your parallel computing toolbox. How about not do anything in setting "parallel workers"? The program will be running on only 1 worker.

3. They are independent bivariate correlations.

Best,

Chao-Gan

 Thank you for your quick response Chao-Gan! I still get some errors by leaving the parallel pool blank:

Warning: matlabpool will be removed in a future release.
Use parpool instead. 
Error using matlabpool (line 137)
The pool size input to matlabpool must be a finite, positive, integer.
 
Error in DPARSFA>editParallelWorkersNumber_Callback (line 1491)
                    matlabpool(Size_MatlabPool)
 
 
Error in gui_mainfcn (line 95)
        feval(varargin{:});
 
Error in DPARSFA (line 33)
    gui_mainfcn(gui_State, varargin{:});
 
 
Error while evaluating uicontrol Callback
 
Warning: File: DPARSFA_run.m Line: 671 Column: 83
The temporary variable RefFile will be cleared at the beginning of each iteration of the parfor loop.
Any value assigned to it before the loop will be lost.  If RefFile is used before it is assigned in the parfor loop, a runtime error will occur.
See Parallel for Loops in MATLAB, "Temporary Variables". 
> In DPARSFA>pushbuttonRun_Callback at 1579
  In gui_mainfcn at 95
  In DPARSFA at 33 
Warning: Function beep has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict. 
> In path at 109
  In addpath at 86
  In DPARSFA_run at 36
  In DPARSFA>pushbuttonRun_Callback at 1579
  In gui_mainfcn at 95
  In DPARSFA at 33 
Starting parallel pool (parpool) using the 'local' profile ... 
Operation terminated by user during parallel.internal.getJavaFutureResult (line 15)
 
 
In parallel.internal.pool.InteractiveClient/waitForSessionCreation (line 644)
                [gotSession, session] = parallel.internal.getJavaFutureResult(...
 
In parallel.internal.pool.InteractiveClient/start (line 343)
                    obj.Session = obj.waitForSessionCreation(sessionFuture, connectionCounter);
 
In parallel.Pool>iStartClient (line 537)
client.start(poolType , numWorkers, cluster,...
 
In parallel.Pool.hBuildPool (line 434)
            iStartClient(client, 'pool', cluster, guiMode, supportRestart, argsList);
 
In parpool (line 104)
    pool = parallel.Pool.hBuildPool(constructorArgs{:});
 
In parallel.internal.pool.PoolArrayManager.getOrAutoCreateWithCleanup (line 49)
                        cleanPool = parpool();
 
In pctTryCreatePoolIfNecessary (line 23)
    pool = parallel.internal.pool.PoolArrayManager.getOrAutoCreateWithCleanup();
 
In distcomp.remoteparfor.tryRemoteParfor (line 27)
            [OK, pool] = pctTryCreatePoolIfNecessary();
 
In parallel_function (line 433)
    [isPoolRunning, pool] = distcomp.remoteparfor.tryRemoteParfor();
 
In DPARSFA_run (line 309)
        parfor i=1:AutoDataProcessParameter.SubjectNum
 
 
In DPARSFA>pushbuttonRun_Callback (line 1579)
    [Error]=DPARSFA_run(handles.Cfg);
 
 
In gui_mainfcn (line 95)
        feval(varargin{:});
 
In DPARSFA (line 33)
    gui_mainfcn(gui_State, varargin{:});
 
 
Error while evaluating uicontrol Callback
 
The client lost connection to worker 6. This might be due to network problems, or the interactive communicating job might have errored.
 

Hi Lihong,

It seems a problem regarding to your matlab's parallel computing toolbox.

Just don't touch the edit box of "Paralle Workers", I think you can run on one worker.

Best,

Chao-Gan