Is it possible to identify workers when using parallel computing in optimization routines?
Show older comments
Hi there,
I'm using an optimization routine with the UseParallel functionality. Within my objective function, I am writing to a number of files and evaluating simulation results with the "system" command. For clarity, I am editing a number of external files and then using outside-Matlab simulation software to evaluate those files. Unfortunately, this process can't really be modified. I want to use the optimizer to help determine parameter values best suited for my simulation in a way that is faster than serial optimization.
The problem is that I need to isolate which files the workers operate on so that they aren't conflicting with each others work. For this, I was hoping to use dedicated worker folders much like the top answer here. I'm not sure how to identify the cluster's ProcessID from within the optimization function, though. If I could, I would use the ProcessID to store files for each worker and ensure that their work was not affecting files that other workers are using.
Is there a way to isolate worker file access from within an optimization routine?
Any help or information is appreciated!
Accepted Answer
More Answers (0)
Categories
Find more on Parallel Computing Fundamentals 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!