Skip to content

Instantly share code, notes, and snippets.

@alcides
Created July 23, 2010 16:53
Show Gist options
  • Save alcides/487706 to your computer and use it in GitHub Desktop.
Save alcides/487706 to your computer and use it in GitHub Desktop.
How to run a program with different number of cores.
@echo off
set A=0
:BEGIN
set /a A=1+%A%
echo Changing number of cores to %A%
IF %A% == 1 SET C=1
IF %A% == 2 SET C=3
IF %A% == 3 SET C=7
IF %A% == 4 SET C=F
IF %A% == 5 SET C=1F
IF %A% == 6 SET C=3F
IF %A% == 7 SET C=7F
IF %A% == 8 SET C=FF
C:\Windows\system32\cmd.exe /C start /WAIT /affinity %C% benchstart.bat %A%
IF %A% LSS 8 GOTO BEGIN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment