[hwloc-users] Hang with SunOS

2019-07-08 Thread Junchao Zhang
Hello Brice,
  When I was installing PETSc with --download-mpich on a machine with uname
-a = "SunOS n-gage 5.11 illumos-a22312a201 i86pc i386 i86pc",  petsc
configure script hung in a conftest. I have the following stack trace. The
compiler is "Sun C 5.10 SunOS_i386 2009/06/03".
  Note MPICH was successfully installed by petsc. The error happened when
running a conftest program. Hope you can find clues from that.
  Thanks.

$cat test.c
#include 

int main() {
MPI_Aint size;
int ierr;
MPI_Init(0,0);
ierr = MPI_Type_extent(MPI_LONG_DOUBLE, );
if(ierr || (size == 0)) exit(1);
MPI_Finalize();
return 0;
}

(gdb) bt
#0  0xfc8db765 in hwloc_x86_cpuid (eax=0x803d5b4, ebx=0x803d5b8,
ecx=0x803d5b0, edx=0x803d5bc)
at
/export/home/jczhang/petsc/arch-opensolaris-pkgs-dbg/externalpackages/mpich-3.3.1/src/hwloc/include/private/cpuid-x86.h:79
#1  0xfc8dbbf1 in cpuid_or_from_dump (eax=0x803d5b4, ebx=0x803d5b8,
ecx=0x803d5b0, edx=0x803d5bc, src_cpuiddump=0x0) at topology-x86.c:165
#2  0xfc8dc33a in look_proc (backend=0x8412d80, infos=0x842dfe0,
highest_cpuid=13, highest_ext_cpuid=13, features=0x803d6d0,
cpuid_type=intel, src_cpuiddump=0x0)
at topology-x86.c:505
#3  0xfc8dda2a in look_procs (backend=0x8412d80, infos=0x842dfe0,
fulldiscovery=0, highest_cpuid=13, highest_ext_cpuid=13,
features=0x803d6d0, cpuid_type=intel,
get_cpubind=0xfc8d61c0 ,
set_cpubind=0xfc8d605c ) at
topology-x86.c:1083
#4  0xfc8de067 in hwloc_look_x86 (backend=0x8412d80, fulldiscovery=0) at
topology-x86.c:1279
#5  0xfc8de1ac in hwloc_x86_discover (backend=0x8412d80) at
topology-x86.c:1348
#6  0xfc89b899 in hwloc_discover (topology=0x84129f0) at topology.c:3007
#7  0xfc89c974 in hwloc_topology_load (topology=0x84129f0) at
topology.c:3618
#8  0xfbf150d8 in MPIR_Init_thread (argc=0x0, argv=0x0, required=0,
provided=0x803d8ac) at src/mpi/init/initthread.c:375
#9  0xfbf0c53b in PMPI_Init (argc=0x0, argv=0x0) at src/mpi/init/init.c:180
#10 0x08050acf in main () at test.c:6
(gdb) f 0
#0  0xfc8db765 in hwloc_x86_cpuid (eax=0x803d5b4, ebx=0x803d5b8,
ecx=0x803d5b0, edx=0x803d5bc)
at
/export/home/jczhang/petsc/arch-opensolaris-pkgs-dbg/externalpackages/mpich-3.3.1/src/hwloc/include/private/cpuid-x86.h:79
79  : "+a" (*eax), "=" (*ebx), "+c" (*ecx), "=" (*edx));
(gdb) l
74 #elif defined(HWLOC_X86_32_ARCH)
75  __asm__(
76  "mov %%ebx,%1\n\t"
77  "cpuid\n\t"
78  "xchg %%ebx,%1\n\t"
79  : "+a" (*eax), "=" (*ebx), "+c" (*ecx), "=" (*edx));
80 #else
81 #error unknown architecture
82 #endif
83 #endif /* HWLOC_HAVE_MSVC_CPUIDEX */


--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 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