[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] USER variable in HTCondor


In TCL, the env() array has to be flagged as a global, either with the "global" statement or the $::env() notation.  Try using "set USER $::env(USER) in the fslstart.tcl , or make sure there's a "global env" statement above line 6 in that file. Based on the fact that featregapply was able to find FSLDIR and source the fslstart.tcl file, there must be a "global env" somewhere prior to line 81 in there.

See also: http://wiki.tcl-lang.org/1624

I ran into what could be a similar problem with MATLAB - in some cases even MCC compiled code expects to see the USER environment variable, and since my job was submitted with "getenv = False" the USER variable had to be specifically included in the environment command in the submit description:

Environment = " USER = $ENV(USER) HOME=$ENV(HOME) LD_LIBRARY_PATH=...etc... "

I would also recommend looking at how you can use submit description directives to eliminate the need for wrapper scripts. Ideally, as I see it, the "executable" in the submit description should be the thing that actually does the work. In a situation or two, I've seen folks submit about three layers of scripts before getting to the CPU-intensive executable. The +PreCmd and +PostCmd attributes can come in handy here.

	-Michael Pelletier.

-----Original Message-----
From: HTCondor-users [mailto:htcondor-users-bounces@xxxxxxxxxxx] On Behalf Of Labounek René
Sent: Friday, October 14, 2016 8:48 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] USER variable in HTCondor


The /hd1/AnkleStim1_3.ica/condor_log/batch.error file:

can't read "env(USER)": no such element in array
     while executing
"set USER       $env(USER)"
     (file "/usr/share/fsl/5.0/tcl/fslstart.tcl" line 6)
     invoked from within
"source $env(FSLDIR)/tcl/fslstart.tcl"
     (file "/usr/lib/fsl/5.0/featregapply" line 81) _________________________________________________________________