[hwloc-users] How to get pid in hwloc?

2018-09-04 Thread Junchao Zhang
Hi,
  hwloc_set_proc_cpubind() has a pid argument. But how to get the pid
portably? In addition, I want to convert a pid to an integer and then print
it out. Does hwloc has APIs to support the needs?
  Thank you.
--Junchao Zhang
___
hwloc-users mailing list
hwloc-users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/hwloc-users

[hwloc-users] conflicts of multiple hwloc libraries

2018-09-01 Thread Junchao Zhang
Hi,
   My program calls a third party library, which in turn contains an
embedded hwloc library.  My program itself also calls hwloc, and I
installed a higher version of hwloc than the library's.  It seems this
setting works with dynamic build. But on Cray machines with static library,
I have a "multiple definition of `hwloc_linux_component'" error when
linking my code. How to fix that?
  Thank you.
--Junchao Zhang
___
hwloc-users mailing list
hwloc-users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/hwloc-users

[hwloc-users] Question about hwloc_bitmap_singlify

2018-08-28 Thread Junchao Zhang
Hi,
  On cpu binding, hwloc manual says "It is often useful to call
hwloc_bitmap_singlify() first so that a single CPU remains in the set. This
way, the process will not even migrate between different CPUs inside the
given set" . I don't understand it. If I do not do hwloc_bitmap_singlify,
what will happen? Suppose a process's old cpu binding is oldset, and I want
to bind it to newset. What should I do to use hwloc_bitmap_singlify?
  Thank you.
--Junchao Zhang
___
hwloc-users mailing list
hwloc-users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/hwloc-users

[hwloc-users] How to combine bitmaps on MPI ranks?

2018-08-28 Thread Junchao Zhang
Hello,
  Suppose I call hwloc on two MPI ranks and get a bitmap on each.  On rank
0, I want to bitwise OR the two. How to do that?  I did not find bitmap
APIs to pack/unpack bitmaps to/from ulongs for MPI send/recv purpose.
  Thank you.
--Junchao Zhang
___
hwloc-users mailing list
hwloc-users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/hwloc-users