Comment 6 for bug 1251209

Revision history for this message
Dave Love (fx-gnu) wrote :

James Hunt <email address hidden> writes:

> Hi Dave,
>
> The latest lp:procenv will now dump cpu affinity and NUMA details (I've
> ended up adding a dependency on libnuma as it's rather too awkward to
> not use this library :)
>
> Please could you try a build on one of your NUMA systems and see if the
> output looks sane?

Initially, I had to move it to a system with a more recent autoconf to
bootstrap but got

  configure.ac:59: option `serial-tests' not recognized

trying to reconf using autoconf 2.69/automake 1.11.6. I removed the
option and carried on.

Building it under RHEL6 and running on our cluster sandybridge login
node I get sensible-looking output with -C, but if I run it on a compute
node I get:

  cpu:
    number: 1 of 16
    affinity list: (null)

The only significant difference between them I think is that the login
node has hyperthreading on and the compute node which fails to fill in
the list doesn't. A westmere node without hyperthreading looks OK. I
don't have time to debug the failed case currently.

The other AMD systems I have are mostly under RHEL5, and procenv won't
build on that. I'll send a fix for 0.27 separately, but the bzr version
has the additional failures:

  gcc -DHAVE_CONFIG_H -I. -I.. -pedantic -std=gnu99 -Wall -Wunused -fstack-protector -Wformat -Werror=format-security -g -O2 -MT procenv-procenv.o -MD -MP -MF .deps/procenv-procenv.Tpo -c -o procenv-procenv.o `test -f 'procenv.c' || echo './'`procenv.c
  procenv.c: In function ‘show_cpu_affinities’:
  procenv.c:1913: warning: implicit declaration of function ‘CPU_ALLOC’
  procenv.c:1913: warning: assignment makes pointer from integer without a cast
  procenv.c:1916: warning: implicit declaration of function ‘CPU_ALLOC_SIZE’
  procenv.c:1917: warning: implicit declaration of function ‘CPU_ZERO_S’
  procenv.c:1986: warning: implicit declaration of function ‘CPU_FREE’
  procenv.c: In function ‘show_numa_memory’:
  procenv.c:3075: warning: implicit declaration of function ‘numa_num_possible_nodes’
  procenv.c:3076: warning: implicit declaration of function ‘numa_num_configured_nodes’
  procenv.c:3078: warning: implicit declaration of function ‘numa_get_mems_allowed’
  procenv.c:3078: warning: assignment makes pointer from integer without a cast
  procenv.c:3082: error: dereferencing pointer to incomplete type
  procenv.c:3083: warning: implicit declaration of function ‘numa_bitmask_isbitset’
  procenv.c: In function ‘show_linux_cpu’:
  procenv.c:5600: warning: implicit declaration of function ‘sched_getcpu’

The hwloc source might show what to do more portably; it works on RH5,
at least.

HTH.