Modify ↓
Opened 8 years ago
Closed 8 years ago
#3528 closed Bug (No Bug)
Set Affinity to more than 32 Cores
Reported by: | contact@… | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.14.0 | Severity: | None |
Keywords: | Cc: |
Description
It seems not possible to set more than 32 cores to Cpu Affinity.
Exemple of working code:
#include <WinAPI.au3> #include <Constants.au3> $begin = TimerInit() While 1 If ProcessExists("notepad.exe") Then $process= ProcessList("notepad.exe") $sPID = $process[1][1] $hProc = _WinAPI_OpenProcess($PROCESS_ALL_ACCESS, False, $sPID) $aRet = _WinAPI_GetProcessAffinityMask($hProc) _WinAPI_SetProcessAffinityMask($hProc,0xFFFFFFFF) _WinAPI_CloseHandle($hProc) EndIf Sleep(3000) WEnd
So this is working:
_WinAPI_SetProcessAffinityMask($hProc,0xFFFFFFFF)
But this is not working!
_WinAPI_SetProcessAffinityMask($hProc,0x00FFFFFFFFFFFFFC)
Now, Cpu are not limited to 32 Cores. Mine is 56 threads.
_WinAPI_SetProcessAffinityMask must be updated to work with int64.
Attachments (0)
Change History (2)
comment:1 Changed 8 years ago by BrewManNH
comment:2 Changed 8 years ago by BrewManNH
- Resolution set to No Bug
- Status changed from new to closed
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Note: See
TracTickets for help on using
tickets.
What processor do you have that has more than 64 cores? Do you understand the difference between threads and cores, and what the affinity mask is setting? Your first line
_WinAPI_SetProcessAffinityMask($hProc,0xFFFFFFFF)
will set the affinity mask to every core in a 64 core processor. Your second line will set the affinity mask for a 1000(?) core processor, so unless you're running NASA I'm skeptical you're getting the results you THINK you're getting.