Is it possible to use the 'save' function on thread-based workers in MATLAB Parallel Computing Toolbox?
Mostrar comentarios más antiguos
When executing a function containing the 'save' command on parallel workers launched with 'parpool('threads')', the following error occurs:
Use of function save is not supported on a thread-based worker.
I am using Parallel Computing Toolbox R2023a on Windows 11. I launch parallel workers using 'parpool('threads')' and execute a function with 'parfeval'. This function includes the 'save' command to save a .mat file, but the above error is thrown. I understand this is expected behavior, so I have already considered using 'parpool('processes')' instead. Are there any other possible workarounds?
In my application, workers are launched from App Designer. One possible approach is to return the data from the worker to App Designer and then save it, but since the data size is large, this does not seem appropriate.
I believe 'parpool('processes')' is the best solution, but I would like to confirm if there are any other options.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Parallel Computing Fundamentals en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!