Zorro S is not using more than 1 CPU core

Posted By: jmlocatelli

Zorro S is not using more than 1 CPU core - 01/17/19 13:56

Hi,
I cannot make Zorro S use more than 1 CPU core during TRAIN mode, with or without Walk Forward.
This command has no effect:
if(is(INITRUN)) NumCores = -1;
No matters the number I assign to NumCores, the total CPU usage is around 15%. And I can see just one CPU running with Resouce Monitor.

Are there code restrictions to enable multi-core processing?

I'm using Zorro S 1.96 in an Intel i7 PC.

Thanks in advance.
jm
Posted By: AndrewAMD

Re: Zorro S is not using more than 1 CPU core - 01/17/19 15:57

Two things to check:

* When you start Zorro, make sure it says that you are running Zorro S.
* Once confirmed, observe your script. Maybe there is something wrong with it?

If you can't figure it out, post your script.
Posted By: jmlocatelli

Re: Zorro S is not using more than 1 CPU core - 01/17/19 16:19

During Zorro start:

Zorro S 1.96.4
(c) oP group Germany 2018
Zorro S Subscription

So this part seems ok.

I'll check the script.

Thanks for the help.
jm
Posted By: jmlocatelli

Re: Zorro S is not using more than 1 CPU core - 01/17/19 16:45

Checked the code. It seems ok.
Here it is:

function run()
{
set(PARAMETERS);
set(LOGFILE);
assetList("Assets_ALMA.csv");
if(is(INITRUN)) NumCores = -1;
BarPeriod = 10;
LookBack = 250;
StartDate = 20180701;
EndDate = 20181231;
// NumWFOCycles = -10;

while(loop(Assets))
{
asset(Loop1);
PIP = 0.01;
PIPCost = 0.01;
Spread = RollLong = RollShort = 0;
var PositionValue = 100000;
int pALMAPeriod = optimize(50,5,250);
var pALMASigma = optimize(6,1,20,1);
var pALMAOffset = optimize(0.85,0.01,1.00);
vars indALMA = series(ALMA(series(price()),pALMAPeriod,pALMASigma,pALMAOffset));
Lots = round(PositionValue/price()/100)*100;
if(valley(indALMA))
{
exitShort();
enterLong();
}
if(peak(indALMA))
{
exitLong();
enterShort();
}
}
}
Posted By: AndrewAMD

Re: Zorro S is not using more than 1 CPU core - 01/17/19 17:30

Originally Posted By: jmlocatelli
//NumWFOCycles = -10;
You can't do multiprocess with anchored, since cycle 3 depends on cycle 2, which depends on cycle 1.
Posted By: jmlocatelli

Re: Zorro S is not using more than 1 CPU core - 01/29/19 01:42

I didn't find any restriction in Zorro documentation regarding anchored WF and NumCores.
But anyway, it does not use more than 1 core in both WF configuration, anchored or not anchored.

It's a very basic script. Can any one run WF with this script and tell me if it can or can not use multiple cores?

regards, jm
Posted By: jcl

Re: Zorro S is not using more than 1 CPU core - 01/29/19 02:46

It cannot because you outcommented WFO.

If something particular does not work, first look into a script where it works - there are several scripts included that use multiple cores. Then check where yours is different. This way you can find the reason of such issues quickly without going at length through the manual.
© 2024 lite-C Forums