How to broadcast a variable in spmd mode

The question I'm trying to solve is to broadcast a scalar variable x inside a spmd mode into an array of size numlab that can be seen by all the parallel workers. I know that in MPI this is called a broadcast operation but I can't find similar operations in MATLAB.

Answers (1)

The broadcast function to use inside an spmd block is labBroadcast.

Tags

Asked:

on 10 Apr 2017

Answered:

on 11 Apr 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!