imresize using NaN and parfor causes memory error
1 view (last 30 days)
Show older comments
I've used imresize (using the NaN option) in a parfor and I've got a memory error. However, without the NaN option (see case 2 below - namely by calculating the target dimension in advance) it worked perfectly
e.g.
case 1: I2=imresize(I,[256 NaN]);
case 2: I2=imresize(I,[256 256]);
- case 1 or case 2 + for, OK
- case 2 + parfor, OK
- case 1 + parfor, memory error
Do you have any idea why this is happening?
I thank you in advance
Vassilis
3 Comments
Edric Ellis
on 2 Dec 2014
I just tried your reproduction in R2014a on WIN64 and GLNXA64, and it worked fine - what OS are you using? Does it make any difference if you open a smaller pool? I.e. try
parpool('local', 1)
When you get the error, could you try:
E = MException.last
and if E is a ParallelException (which means that the out-of-memory occurred on the workers rather than on the client), also try
getReport(E.remotecause{1})
Answers (0)
See Also
Categories
Find more on Structures in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!