Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Lab synchronization in MATLAB pmode

Subject: Lab synchronization in MATLAB pmode

From: SHAKEEL Kamboh

Date: 9 May, 2013 16:10:10

Message: 1 of 2

I an encountering a problem in the parallel solution of 2D Laplace equation. I distribute the grid points into some workers (say 2 or more). The neighbouring points between the two workers need communication so that the influence from the first worker may contribute in the solution obtained by the other worker. I am exchanging the neighbourhood points by using global operation or gather, but the solution is not same as obtained sequentially. I want to know that is there any way in Matlab pmode that if first work is completing its task than the second worker waits for it and vice versa?
Please help me.

Thanks.

Subject: Lab synchronization in MATLAB pmode

From: Edric M Ellis

Date: 10 May, 2013 08:11:02

Message: 2 of 2

"SHAKEEL Kamboh" <shakeel.maths@yahoo.com> writes:

> I an encountering a problem in the parallel solution of 2D Laplace equation. I
> distribute the grid points into some workers (say 2 or more). The neighbouring
> points between the two workers need communication so that the influence from the
> first worker may contribute in the solution obtained by the other worker. I am
> exchanging the neighbourhood points by using global operation or gather, but the
> solution is not same as obtained sequentially. I want to know that is there any
> way in Matlab pmode that if first work is completing its task than the second
> worker waits for it and vice versa? Please help me.

You can use labBarrier to force synchronization. But I wonder if this
will really help you - this sort of synchronization is usually only
required when you're accessing some sort of external resource (such as a
file). Parallel algorithms frequently exhibit small (or even not so
small) numerical differences compared to the sequential algorithm.

Cheers,

Edric.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us