Error when running R code on Mac

Error when running R code on Mac

Postby e88 » 2017-01-02 09:02:59

I successfully installed techila on R. I use Mac and followed the mac specific instructions. However when I try to make any calculation I
receive the following error message:

"Error in init(sdkroot = sdkroot, initFile = initFile, password =
password) :
/lib/techila.jar not found, set TECHILA_SDKROOT environment
variable"

Can you please help me with this?
e88
 
Posts: 59
Joined: 2013-05-23 06:41:34

Re: Error when running R code on Mac

Postby garrett » 2017-01-02 09:09:03

e88 wrote:...Error in init(sdkroot = sdkroot, initFile = initFile, password =
password) :
/lib/techila.jar not found, set TECHILA_SDKROOT environment
variable...

Have you set your current working directory to match the code you are trying to run?

I get a similar message if I don't change the current working directory before I run my code.
garrett
 
Posts: 23
Joined: 2013-05-23 07:19:20

Re: Error when running R code on Mac

Postby e88 » 2017-01-02 09:11:04

Let me be more specific. Imagine I run the following command:

“ results <- cloudfor(i = 1:10) %t% {i + 1} "

then I receive the following error message:

Estimating steps per worker...
Executed 10 loops in 0.025 seconds. Will perform max 8001 iterations per job
Error in init(sdkroot = sdkroot, initFile = initFile, password = password) :
/lib/techila.jar not found, set TECHILA_SDKROOT environment variable
e88
 
Posts: 59
Joined: 2013-05-23 06:41:34

Re: Error when running R code on Mac

Postby eerola » 2017-01-02 09:20:51

macOS is not an officially supported platform in the Techila Distributed Computing Engine. But because R is an interpreted language, and because of the architecture of the Techila SDK, you can run code that is written in R programming language from a Mac OS X computer. The Workers can be Linux or Windows.
eerola
Techila Staff
Techila Staff
 
Posts: 58
Joined: 2012-07-30 07:39:30

Re: Error when running R code on Mac

Postby eerola » 2017-01-02 09:27:32

I guess, in this case, the error message means that the Techila R components can't find the ‘techila.jar’ file. You can use the ‘.sdkroot’ parameter to set the path of your ‘techila’ directory.

If your ‘techila’ directory is ‘/Users/johndoe/techila’, then you would need to modify your cloudfor statement as shown below

results <- cloudfor(i = 1:10,.sdkroot="/Users/johndoe/techila") %t% {i + 1}

After setting the ‘.sdkroot’ parameter, please source the code and try running it again.

If you do not want to set the ‘techila’ directory location directly in your code, you can create an environment variable TECHILA_SDKROOT and set it to point to the ‘techila’ directory location. If you choose to use an environment variable to define the ‘techila’ directory location, please restart your R session after having set the environment variable.
eerola
Techila Staff
Techila Staff
 
Posts: 58
Joined: 2012-07-30 07:39:30

Re: Error when running R code on Mac

Postby hazimali » 2019-03-03 07:12:07

I agree with the first reply
hazimali
 
Posts: 1
Joined: 2019-02-27 07:16:20


Return to R

cron