Thread Subject: multithreading

Subject: multithreading

From: wapo

Date: 9 May, 2008 13:53:33

Message: 1 of 4

Hi all,

Lets assume that I have a matrix like:

mtrx=rand(2,100);

If I have a system with multiple processors and I have the
multithreading option on how do I perform a row-wise operation on the
matrix but I specifically assign each thread to take care of one row.
For example I want to find the sum for each row, so:

Thread 1: sum(mtrx(1,:))
Thread 1: sum(mtrx(2,:))

Thanks in advance

Apo

Ps. I used sum as an example. I am interested in more complicated
operations.

Subject: multithreading

From: Steve Amphlett

Date: 9 May, 2008 14:13:05

Message: 2 of 4

wapo <apostolos.georgakis@gmail.com> wrote in message
<ec0cbb1d-abce-49e7-a13e-
523dd7fad1a8@k13g2000hse.googlegroups.com>...
> Hi all,
>
> Lets assume that I have a matrix like:
>
> mtrx=rand(2,100);
>
> If I have a system with multiple processors and I have the
> multithreading option on how do I perform a row-wise
operation on the
> matrix but I specifically assign each thread to take care
of one row.
> For example I want to find the sum for each row, so:
>
> Thread 1: sum(mtrx(1,:))
> Thread 1: sum(mtrx(2,:))
>
> Thanks in advance
>
> Apo
>
> Ps. I used sum as an example. I am interested in more
complicated
> operations.

http://www.mathworks.com

Type multithreaded into the search box. This is the first
hit:


http://www.mathworks.com/products/matlab/demos.html?
file=/products/demos/shipping/matlab/multithreadedcomputatio
ns.html

Subject: multithreading

From: wapo

Date: 12 May, 2008 06:35:59

Message: 3 of 4

I wish it was that simple. It looks like that the demo requires the
distributed computing toolbox or something similar. I am looking for a
way to manually assign tasks to threads.

Subject: multithreading

From: Ben

Date: 12 May, 2008 21:16:15

Message: 4 of 4

On May 12, 2:35 am, wapo <apostolos.georga...@gmail.com> wrote:
> I wish it was that simple. It looks like that the demo requires the
> distributed computing toolbox or something similar. I am looking for a
> way to manually assign tasks to threads.

Just an FYI: there are high level packages for doing multiprocessor
computing with matlab, called Star-P:
http://www.interactivesupercomputing.com/productinfo/pdf/dataSheet_star-p_matlab_lowres.pdf

It would really be nice if Matlab did what you're asking, similar to
openMP directives in other languages.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

rssFeed for this Thread

Contact us at files@mathworks.com