Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [hwloc-devel] [hwloc-users] hwloc 1.5, freebsd and linux output on the same hardware
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2012-10-13 14:12:43


I committed (a better version of) this to trunk today. hwloc v1.6 should
work fine in your case. I didn't backport into v1.5.1 because I can't be
100% confident that I am not breaking some cases here. We'll see.

Brice

Le 11/10/2012 23:14, Brice Goglin a écrit :
> I think I would rather do something like below, to make sure we only
> modify the cpuset while discovering things.
> The code builds fine on FreeBSD9 and seems to work, but my testing of
> changing cpuset doesn't seem to work very well so I'd like a bit more
> testing.
>
> Brice
>
>
>
>
> Index: src/topology-freebsd.c
> ===================================================================
> --- src/topology-freebsd.c (révision 4893)
> +++ src/topology-freebsd.c (copie de travail)
> @@ -178,14 +178,21 @@
> hwloc_look_freebsd(struct hwloc_topology *topology)
> {
> unsigned nbprocs = hwloc_fallback_nbprocessors(topology);
> + cpusetid_t setid;
>
> #ifdef HAVE__SC_LARGE_PAGESIZE
> topology->levels[0][0]->attr->machine.huge_page_size_kB = sysconf(_SC_LARGE_PAGESIZE);
> #endif
>
> hwloc_set_freebsd_hooks(topology);
> +
> + cpuset_getid(CPU_LEVEL_CPUSET, CPU_WHICH_PID, -1, &setid);
> + cpuset_setid(CPU_WHICH_PID, -1, 0);
> +
> hwloc_look_x86(topology, nbprocs);
>
> + cpuset_setid(CPU_WHICH_PID, -1, setid);
> +
> hwloc_setup_pu_level(topology, nbprocs);
>
> #ifdef HAVE_SYSCTL
>
>
>
>
>
> Le 11/10/2012 18:39, Sebastian Kuzminsky a écrit :
>> This patch (against r4884) fixes the issue on my system. It moves the
>> lstopo process to cpuset 0, which includes all the CPUs in the system.
>>
>> --- r4884/hwloc-trunk.svn/tests/ports/topology-freebsd.c
>> 2012-10-02 16:13:06.000000000 -0600
>> +++ cpuset/hwloc-trunk.svn/tests/ports/topology-freebsd.c
>> 2012-10-11 10:36:18.326408333 -0600
>> @@ -197,6 +197,7 @@
>> void
>> hwloc_set_freebsd_hooks(struct hwloc_topology *topology)
>> {
>> + cpuset_setid(CPU_WHICH_PID, -1, 0);
>> #if defined(HAVE_SYS_CPUSET_H) && defined(HAVE_CPUSET_SETAFFINITY)
>> topology->set_thisproc_cpubind = hwloc_freebsd_set_thisproc_cpubind;
>> topology->get_thisproc_cpubind = hwloc_freebsd_get_thisproc_cpubind;
>>
> _______________________________________________
> hwloc-devel mailing list
> hwloc-devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel