Bad R script performance

Bad R script performance

Postby e88 » 2015-04-29 07:35:28

I moved my Techila SDK to my new PC. When I run my R script from the new computer, the performance is really bad. From the old computer the performance is radically better.

I noticed that there is a warning message saying "object 'block' not found" followed by another warning which says "defaulting to steps = 1".

Code: Select all
In addition: Warning messages:
1: In eval(expr, envir, enclos) : object 'block' not found
2: In estimate(sblock, env, d, vectors, jobs, conf$estimateTarget,  :
   Defaulting to steps = 1


I added .steps to my cloudfor and now it runs nice also from the new computer.

Code: Select all
cloudfor(i = 1:noRuns .RVersion="310", .steps=1000)


I can live with the hardcoded .steps parameter, but I am still curious why does the original code on the new computer default to steps = 1?

I installed R version 3.1.2 on my new PC but I have not got R bundles in Techila for newer than 310. Because of this, I am using the .RVersion.
e88
 
Posts: 59
Joined: 2013-05-23 06:41:34

Re: Bad R script performance

Postby kari » 2017-04-05 07:04:25

When running cloudfor without .steps parameter it first evaluates the 'block' of code within cloudfor loops locally. This is done to estimate the time needed for one iteration of the loop and it tries to determine the optimal steps value for this particular case. The error is caused by something failing locally while evaluating the block and therefore it defaults to steps = 1.

You might have some missing dependencies on your new computer resulting in the failure. It still works on Techila because there the dependencies have already been bundled from the old computer. To debug this you could try running your code locally without cloudfors.

There has also been a fix for similar error to this in a later SDK version, so please first update your Techila SDK to the latest version.
kari
Techila Staff
Techila Staff
 
Posts: 48
Joined: 2012-07-18 11:14:09


Return to R

cron