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

2018-09-04 Thread Brice Goglin
Hello The only public portability layer we have for PIDs is hwloc_pid_t when passed to things like set_proc_cpubind(). But we don't have a portable getpid() or printf(). You'll have to use getpid() and printf("%ld", (long)pid) on Unix. On Windows, hwloc_pid_t is a HANDLE, you don't want to print

[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