Have Alaska some limit for use CPU ?
(switching between CPU ?)
I want make application, from which will be via Runshell starting other xx exe modules, every on own core
I tested only CPU with 4 cores
but my client want use 12 cores ? Is it possible ? What is numbers for other cpu ?
1,2,4,8 for CPU 1 to 4
and other will be
16,32,64,... ?
CPU number limitations
Re: CPU number limitations
Code: Select all
SetLogicalProcessor( RandomInt(GetLogicalProcessorCount()) )
The eXpress train is coming - and it has more cars.
Re: CPU number limitations
you can switch CPU and use Runshell() and CMD will show it.Victorio wrote:I want make application, from which will be via Runshell starting other xx exe modules, every on own core
but when start any Xbase++ Application it will switch back to CPU 0 ... except Xbase++ App switch CPU itself.
2 ^ INT(nCPU-1)Victorio wrote:but my client want use 12 cores ? Is it possible ? What is numbers for other cpu ?
1,2,4,8 for CPU 1 to 4
and other will be
16,32,64,... ?
Code: Select all
FUNCTION switchcpu(nCPU)
LOCAL nWorkCPU
DEFAULT nCPU TO 1
IF nCPU = 1
SmpSetCPU(1)
ELSE
nWorkCPU := 2 ^ INT(nCPU-1)
IF SmpSetCPU(nWorkCPU) = 0
SmpSetCPU(1)
ENDIF
ENDIF
nWorkCPU := SmpGetCPU()
RETURN nWorkCPU
greetings by OHR
Jimmy
Jimmy
Re: CPU number limitations
OK, I understand, I start external exe modules with parameter (numbercpu), then this exe run on this cpu.
My question was , if is some limit to number of CPU in alaska , or it is unlimited and controlled only with OS ? Can switch to cpu range from 1 to 12 ?
I have only 4core CPU, because I cannot examine it.
My question was , if is some limit to number of CPU in alaska , or it is unlimited and controlled only with OS ? Can switch to cpu range from 1 to 12 ?
I have only 4core CPU, because I cannot examine it.
Re: CPU number limitations
You can switch between up to 64 CPUs -it's the same mechanism. Above this value, CPUs are grouped and it gets complicated.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."