Thanks very much indeed for the speedy responses Paul and Jeff - that
fixes the problem.
I've a slightly unrelated question about the return from
plpa_sched_getaffinity. It seems that on a dual core, dual cpu AMD
system, with SuSE 10.0, all the bits are set. (I don't have such a
system here, this is a report from one of our customers). I don't see
this on other systems, and I don't understand the line in the man page
for sched_setaffinity that says: "Usually, all bits in the mask are set".
Trying to set the affinity to an invalid processor on this system with
plpa_sched_setaffinity fails, so I can determine which processors are
present that way - it just seems a bit strange...
David
Paul H. Hargrove wrote:
> I've now been able to reproduce David Creasy's bug myself. While my
> previous patch fixed an actual bug, it was not David's bug. However,
> the attached patch *does* fix David's bug in my own testing.
>
> -Paul
>
>
> ------------------------------------------------------------------------
>
> Index: src/libplpa/plpa_bottom.h
> ===================================================================
> --- src/libplpa/plpa_bottom.h (revision 71)
> +++ src/libplpa/plpa_bottom.h (working copy)
> @@ -69,15 +69,15 @@
>
> /* Public macro to set a bit in a PLPA cpu set */
> #define PLPA_CPU_SET(num, cpuset) \
> - (cpuset)->bitmask[PLPA_CPU_BYTE(num)] |= (1 << PLPA_CPU_BIT(num))
> + (cpuset)->bitmask[PLPA_CPU_BYTE(num)] |= ((PLPA_NAME(bitmask_t))1 << PLPA_CPU_BIT(num))
>
> /* Public macro to clear a bit in a PLPA cpu set */
> #define PLPA_CPU_CLR(num, cpuset) \
> - (cpuset)->bitmask[PLPA_CPU_BYTE(num)] &= ~(1 << PLPA_CPU_BIT(num))
> + (cpuset)->bitmask[PLPA_CPU_BYTE(num)] &= ~((PLPA_NAME(bitmask_t))1 << PLPA_CPU_BIT(num))
>
> /* Public macro to test if a bit is set in a PLPA cpu set */
> #define PLPA_CPU_ISSET(num, cpuset) \
> - (0 != ((cpuset)->bitmask[PLPA_CPU_BYTE(num)] & (1 << PLPA_CPU_BIT(num))))
> + (0 != ((cpuset)->bitmask[PLPA_CPU_BYTE(num)] & ((PLPA_NAME(bitmask_t))1 << PLPA_CPU_BIT(num))))
>
> /***************************************************************************/
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> plpa-users mailing list
> plpa-users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/plpa-users
--
David Creasy
Matrix Science
64 Baker Street
London W1U 7GB, UK
Tel: +44 (0)20 7486 1050
Fax: +44 (0)20 7224 1344
dcreasy_at_[hidden]
http://www.matrixscience.com
|