Re: [hwloc-users] [windows] hwloc_get_proc_cpubind issue, even with current process handle as 2nd parameter

2014-01-06 Thread Eloi Gaudry
Yes, you're right, this is exactly what I did after my last email. Sorry for the convenience, that was a silly mistake from my own. I'm going to start another thread related to building from source on Windows, using Visual Studio. Thanks for the good work ! Eloi -Original Message- From:

Re: [hwloc-users] [windows] hwloc_get_proc_cpubind issue, even with current process handle as 2nd parameter

2014-01-06 Thread Samuel Thibault
Samuel Thibault, le Mon 06 Jan 2014 18:07:59 +0100, a écrit : > Eloi Gaudry, le Mon 06 Jan 2014 17:16:53 +0100, a écrit : > > the PID of the process. I was assuming that casting this member to a HANDLE > > object would allow me to use hwloc_get_proc_cpubind, Let me fix my typos: No, PIDs are

Re: [hwloc-users] [windows] hwloc_get_proc_cpubind issue, even with current process handle as 2nd parameter

2014-01-06 Thread Samuel Thibault
Eloi Gaudry, le Mon 06 Jan 2014 17:16:53 +0100, a écrit : > the PID of the process. I was assuming that casting this member to a HANDLE > object would allow me to use hwloc_get_proc_cpubind, No, PIDs are mere numbers, they have nothing to do with HANDLES. More interestingly, PID values are valid

Re: [hwloc-users] [windows] hwloc_get_proc_cpubind issue, even with current process handle as 2nd parameter

2014-01-06 Thread Eloi Gaudry
Well, it seems I'm using an invalid Handle as 2nd argument. I'm basically using CreateToolhelp32Snapshot to get a snapshot of the running processes, then looping over each process from the snapshot using Process32Next method. The PROCESSENTRY32 I receive from Process32Next has a member

Re: [hwloc-users] [windows] hwloc_get_proc_cpubind issue, even with current process handle as 2nd parameter

2014-01-06 Thread Eloi Gaudry
Yes, Windows 7 SP1. Let me call GetLastError inside hwloc_win_get_proc_cpubind and give you the results. -Original Message- From: hwloc-users [mailto:hwloc-users-boun...@open-mpi.org] On Behalf Of Samuel Thibault Sent: lundi 6 janvier 2014 16:43 To: Hardware locality user list Subject:

Re: [hwloc-users] [windows] hwloc_get_proc_cpubind issue, even with current process handle as 2nd parameter

2014-01-06 Thread Samuel Thibault
Eloi Gaudry, le Mon 06 Jan 2014 16:37:55 +0100, a écrit : > AFAIK, the issue seems related to the GetAffinityMask call inside > hwloc_win_get_proc_cpubind : it always returns 0. So it's really the win32 layer which does not like seeing GetAffinityMask called. Just to make sure: you are using at

Re: [hwloc-users] [windows] hwloc_get_proc_cpubind issue, even with current process handle as 2nd parameter

2014-01-06 Thread Samuel Thibault
Eloi Gaudry, le Mon 06 Jan 2014 16:04:27 +0100, a écrit : > On Windows, hwloc_get_cpubind and hwloc_set_cpubind works correctly but I > cannot use hwloc_get_proc_cpubind or hwloc_set_proc_cpubind using the current > process handle as 2^nd parameter (no matter what the last one is). > > Any clue

Re: [hwloc-users] [windows] hwloc_get_proc_cpubind issue, even with current process handle as 2nd parameter

2014-01-06 Thread Eloi Gaudry
Hi Brice, I tried to use every flag but MEMBIND. AFAIK, the issue seems related to the GetAffinityMask call inside hwloc_win_get_proc_cpubind : it always returns 0. I'll try to get more error information tomorrow. Regards, Eloi From: hwloc-users [mailto:hwloc-users-boun...@open-mpi.org] On

[hwloc-users] [windows] hwloc_get_proc_cpubind issue, even with current process handle as 2nd parameter

2014-01-06 Thread Eloi Gaudry
Hi, On Windows, hwloc_get_cpubind and hwloc_set_cpubind works correctly but I cannot use hwloc_get_proc_cpubind or hwloc_set_proc_cpubind using the current process handle as 2nd parameter (no matter what the last one is). Any clue on this ? I'm trying to add support for Windows to an hwloc-ps