clangupc / clang-upc

Clang UPC Front-End
https://clangupc.github.io/
Other
16 stars 5 forks source link

RFE: add NUMA support for Solaris and {Free,Net,Open}BSD #64

Open PHHargrove opened 10 years ago

PHHargrove commented 10 years ago

Following up on something first mentioned in issue #63 ...

My runtime builts on Solaris-11.0, FreeBSD-10.0, NetBSD-6.1 and OpenBSD-5.5 all appear to lack support for the -sched-policy and -mem-policy flags. These are all amd64 systems.

Not surprisingly, my configure-based OpenBSD build says:

checking for Linux scheduling affinity... no
checking if NUMA available... no

In my cmake-based builds don't even see any output from cmake that suggests that cpu or memory affinity support has been probed.

My suggestion for resolving this is that cmake and configure should look for hwloc, and use it if present. That is a more portable (and lower effort) solution than trying to get the support right for Solaris and each BSD variant .

nenadv commented 10 years ago

I added CMAKE numa configuration and NUMA runtime support with this update - https://github.com/Intrepid/clang-upc/commit/5881e8b7d212f38a020d6e18d2878a41a0f010aa

Unfortunately, this is support by the Llinux systems only. Switching to hwloc would indeed cover all the targets (linux.bsd,solaris).

alarcher commented 9 years ago

How difficult would you evaluate enabling NUMA support via liblgrp on Solaris/Illumos ?

nenadv commented 9 years ago

Probably not that difficult if you can map linux numa policies into liblgrp. All the affinity/numa interfaces are inside the runtime: tools/clang/runtime/libupc/smp/[upc_numa.c,upc_affinity.c]. Files are rather small, but then you will have some cmake/configure work too.

Can you achieve the same by adding the code at the beginning of the UPC main thread? I am not familiar with Solaris liblgrp.

alarcher commented 9 years ago

Thank you for pointing me to the relevant files, I will have a look next month and keep you updated. Best regards,

Aurélien