[parsec-users] CPU Affinity

abhisekpan at gmail.com abhisekpan at gmail.com
Tue Sep 13 12:25:17 EDT 2011


Thanks Yungang! It is an interesting point. The problem in my case, however,
was my carelessness! I was not using the export command to set the
environmental variables, and hooks was not reading them at all. I found that
even giving base as -1 would not throw an error message! I fixed that, and
it seems to be working well, that is using only cpus 0 to 3. Maybe I will
use 12-15 just to be safe!

Thanks again!
Abhisek

On Tue, Sep 13, 2011 at 11:56 AM, Yungang Bao <ybao at cs.princeton.edu> wrote:

> Hi Abhisek,
>
> According to the parsec_hooks man page, PARSEC_CPU_BASE indeicates the ID
> of the base CPU to use, which means that the workload will not use any CPUs
> below that ID. So when you set PARSEC_CPU_BASE=0, the workload may run on
> CPUs 4~15, since their IDs are greater than 0.  Maybe you can try set
> PARSEC_CPU_BASE = 12.
>
> Best Regards,
> Yungang
>
> ----- Original Message -----
> From: abhisekpan at gmail.com
> To: parsec-users at lists.cs.princeton.edu
> Sent: Wednesday, September 7, 2011 10:22:57 AM
> Subject: [parsec-users] CPU Affinity
>
>
> Hi,
>
> I am trying to restrict the cores on which the benchmarks run, and I am
> doing the following:
>
> I am running parsec on simics on a 16 core simulated linux-amd64 system.
> When I am running canneal (say) with 4 threads, I am first setting the set
> affinity hook (it was enabled by default anyway). Then I am setting the
> environment variables PARSEC_CPU_NUM and PARSEC_CPU_BASE. The commands in
> the script are:
>
>
> eval_cli_line('con0.input("mkdir ~/phooks_run_small \n")')
> eval_cli_line('con0.input("cd parsec-2.1 \n")')
> eval_cli_line('con0.input("PARSEC_CPU_NUM=4 \n")')
> eval_cli_line('con0.input("PARSEC_CPU_BASE=0 \n")')
> eval_cli_line('con0.input("./bin/parsecmgmt -a run -p canneal -n 4 -i
> simsmall -c gcc-hooks -d ~/phooks_run_small\n")')
>
> So this would mean canneal runs on cores 0-3 ? But, when I track the binary
> through a tracker in simics, the program runs in other cores as well.
>
> Am I missing something? Any pointers would be highly appreciated!
>
> Thank you very much!
> --
> Abhisek
> Live Long and Prosper
>
> _______________________________________________
> parsec-users mailing list
> parsec-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/parsec-users
> _______________________________________________
> parsec-users mailing list
> parsec-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/parsec-users
>



-- 
Abhisek
Live Long and Prosper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/parsec-users/attachments/20110913/c5b7363f/attachment.htm>


More information about the parsec-users mailing list