parfor works but parcluster fails using Cellpose in linux
Hello all,
I am trying to run parallel jobs in Matlab in linux system. I used the Matlab Add-on Cellpose, which needs Matlab versoion later than 2023b.
parfor i=1:4
img = imread(‘calibrated-P01.001.tif’);
cp=cellpose;
segmentCells2D(cp,img,ImageCellDiameter=110);
end
The parfor using Cellpose works.
But when I try to use parcluster/createJob/createTask, it falls. Here is the code
clustLocal = parcluster(‘Processes’)
j = createJob(clustLocal,’AutoAddClientPath’,true)
createTask(j,@TestCellpose,0,{},’CaptureDiary’,true)
submit(j)
function TestCellpose
img = imread(‘calibrated-P01.001.tif’);
cp=cellpose;
segmentCells2D(cp,img,ImageCellDiameter=110);
end
The error message
Error: Unable to resolve the name ‘py.MWCellposeWrapper.setModelsFolderPath’
I prefer using parcluster because it can run the code in backgound.
Does anyone know how to solve the problem?
Thanks a lot!Hello all,
I am trying to run parallel jobs in Matlab in linux system. I used the Matlab Add-on Cellpose, which needs Matlab versoion later than 2023b.
parfor i=1:4
img = imread(‘calibrated-P01.001.tif’);
cp=cellpose;
segmentCells2D(cp,img,ImageCellDiameter=110);
end
The parfor using Cellpose works.
But when I try to use parcluster/createJob/createTask, it falls. Here is the code
clustLocal = parcluster(‘Processes’)
j = createJob(clustLocal,’AutoAddClientPath’,true)
createTask(j,@TestCellpose,0,{},’CaptureDiary’,true)
submit(j)
function TestCellpose
img = imread(‘calibrated-P01.001.tif’);
cp=cellpose;
segmentCells2D(cp,img,ImageCellDiameter=110);
end
The error message
Error: Unable to resolve the name ‘py.MWCellposeWrapper.setModelsFolderPath’
I prefer using parcluster because it can run the code in backgound.
Does anyone know how to solve the problem?
Thanks a lot! Hello all,
I am trying to run parallel jobs in Matlab in linux system. I used the Matlab Add-on Cellpose, which needs Matlab versoion later than 2023b.
parfor i=1:4
img = imread(‘calibrated-P01.001.tif’);
cp=cellpose;
segmentCells2D(cp,img,ImageCellDiameter=110);
end
The parfor using Cellpose works.
But when I try to use parcluster/createJob/createTask, it falls. Here is the code
clustLocal = parcluster(‘Processes’)
j = createJob(clustLocal,’AutoAddClientPath’,true)
createTask(j,@TestCellpose,0,{},’CaptureDiary’,true)
submit(j)
function TestCellpose
img = imread(‘calibrated-P01.001.tif’);
cp=cellpose;
segmentCells2D(cp,img,ImageCellDiameter=110);
end
The error message
Error: Unable to resolve the name ‘py.MWCellposeWrapper.setModelsFolderPath’
I prefer using parcluster because it can run the code in backgound.
Does anyone know how to solve the problem?
Thanks a lot! parfor, parcluster, linux, cellpose MATLAB Answers — New Questions