> Date: Wed, 06 Sep 2006 11:38:21 -0700 (PDT)
> From: "Dave Z." <zhu_dave@xxxxxxxxx>
>
> --- Mike Marty <mikem@xxxxxxxxxxx> wrote:
>
> > > Is there a way to assign threads to
> > > processors? Like processor affinity in Linux?
> > >
> >
> > probably.
>
> Is it possible to configure GEMS to do that? Or should
> it be done in the program code?
>
Program code is probably your best bet. Look at the man page for
processor_bind().
To bind thread <thread-id> to processor <processor-id>, do the
following:
if (processor_bind(P_LWPID, P_MYID, <processor-id>, NULL) != 0) {
fprintf(stderr, "processor_bind(%d) failed for thread %d: ",
<processor-id>, <thread-id>);
perror("");
}
dann
>
> Thank you.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> Gems-users mailing list
> Gems-users@xxxxxxxxxxx
> https://lists.cs.wisc.edu/mailman/listinfo/gems-users
> Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.
>
|