Modify

Opened 9 years ago

Closed 9 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 by BrewManNH, 9 years ago

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.

comment:2 by BrewManNH, 9 years ago

Resolution: No Bug
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.