Julia and HTCondor - ENV["HOME"] causes error on Condor

254 views Asked by At

When I run a Julia Script that prints "Hello World" on HTCondor, I get the following error

fatal: error thrown and no exception handler available.
Base.InitError(mod=:Pkg, error=Base.KeyError(key="HOME"))

The code runs without a problem on my local Ubuntu machine. I can run

 eval  julia --version

in a bash script on condor and the output is

julia version 0.5.0

This problem has been discussed in two places on github: one, two. ENV["HOME"] is used in a single file and the common recommendation is to modify that. However, I cannot change the julia installation on condor.

Is there a way to fix this on the fly before running a script without sudo?

1

There are 1 answers

0
Edgar H On BEST ANSWER

As @sujeet suggested, it is possible to set environmental parameters in condor. The issue is resolved by adding the following line in the condor submit script

Environment = "HOME=""/tmp"""

, which sets the home directory to the tmp. Julia code runs fine then (as long one is careful not to write to home before resetting it in the script itself).