用了lsqnonlin在跑一个优化,用了parfor来进行加速。已经运行了有50多个迭代,突然报错。下面是错误信息,有大佬遇到过这种情况么,如何解决?问题出在parfor上?
An UndefinedFunction error was thrown on the workers for 'relStepSize'. This might be because the file containing 'relStepSize' is not accessible on the workers. Use addAttachedFiles(pool, files) to specify the required files to be attached. See the documentation for 'parallel.Pool/addAttachedFiles' for more details.
An UndefinedFunction error was thrown on the workers for 'relStepSize'. This might be because the file containing 'relStepSize' is not accessible on the workers. Use addAttachedFiles(pool, files) to specify the required files to be attached. See the documentation for 'parallel.Pool/addAttachedFiles' for more details.
