MATLAB Answers

0

Clarification for parallel process

Asked by Pramit Biswas on 2 May 2018
Latest activity Commented on by Ameer Hamza
on 2 May 2018
I have set up one mainScript, where one parallel for initiates calling of func1 function. This function calls script1 within. This means at a time several for loop is accessing script1 (though through a function). Can these be a problem for variables?
mainScript
func1
script1

  0 Comments

Sign in to comment.

Products

1 Answer

Answer by Ameer Hamza
on 2 May 2018
 Accepted Answer

No, every function call has its own workspace, they do not interfere with each other unless you try to do it yourself (for example using evalin(), assignin() etc.).

  2 Comments

However, scripts are not functions.
On the other hand, workers in parallel processing are independent processes, and cannot interfere with each other even using evalin() or assignin()
Thanks for the clarification.

Sign in to comment.