[parsec-users] How can I specify the core affinity when Irun PARSEC ?

Christian Bienia cbienia at CS.Princeton.EDU
Mon Jul 12 17:36:53 EDT 2010


Kai,

 

You need to make sure that support for thread affinity is enabled when you
build the hooks library. Edit config.h to do that. You also specified that
the program is to run on only 3 CPUs (PARSEC_CPU_NUM).

 

You need to read the man pages that I wrote for the library.

 

- Chris

 

 

From: parsec-users-bounces at lists.cs.princeton.edu
[mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of Ma, Kai
Sent: Monday, July 12, 2010 3:58 PM
To: PARSEC Users; PARSEC Users
Subject: Re: [parsec-users] How can I specify the core affinity when Irun
PARSEC ?

 

 

Chris, thank you so much for your response.

However, I am thinking I did not activate the hooks package in the
procedures I pasted. And I am still struggling with it. I will dig into the
code after I make sure I did activate the hooks package. Could you give some
clue about which part I missed during the procedures I pasted here?

I did the following things under /bin directory but I cannot get 4 threads
running on the 0-3 cores.
./parsecmgmt -a build -c gcc-hooks
export PARSEC_CPU_NUM=3
export PARSEC_CPU_BASE=0
./parsecmgmt -a run -p blackscholes -i native -n 4

But when I use top command: I found the threads are running on radom cores.
For example inone run, the 4 threads are on Core 2,6,8,10. The 2nd run, they
are on Core 1, 5, 6, 11.

I did not schedule other user workloads on the system. Only PARSEC and OS
(OpenSuse 11.2).

Did I mess something here? Thank you so much in advance.



-----Original Message-----
From: parsec-users-bounces at lists.cs.princeton.edu on behalf of Christian
Bienia
Sent: Mon 7/12/2010 3:40 PM
To: 'PARSEC Users'
Subject: Re: [parsec-users] How can I specify the core affinity when Irun
PARSEC ?

Hi Kai,



You can use the PARSEC hooks package. It contains basic support for affinity
on Linux that allows you to run the program only on a contiguous slice of
the CPUs. To find out more about the affinity support you should have a look
at the source code of the hooks package and read the manual pages of the
PARSEC hooks and the involved system calls. The current affinity support in
PARSEC is really just meant as a starting point for your own affinity code.



Best,

Chris





From: parsec-users-bounces at lists.cs.princeton.edu
[mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of Ma, Kai
Sent: Friday, July 09, 2010 11:02 PM
To: parsec-users at lists.cs.princeton.edu
Subject: [parsec-users] How can I specify the core affinity when I run
PARSEC ?



Hi, Team.


For example, if I want to schedule the PARSEC on the first 4 cores in a
large cluster (20 cores). Is there any existing configuration option I have
to activate, or command line option I should use, or the only way to do this
is to use taskset command after PARSEC threads have been lauched?

Any input will be highly appreciated!

Best Wishes.
Kai



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/parsec-users/attachments/20100712/68d28991/attachment.html>


More information about the parsec-users mailing list