bashvariablescondor

Why converting to int the Process Id in Condor doesn't work this way?


So I have the following HTCondor submit description that works:

n = $(ProcId) + 1
arguments = read_$INT(n).fa

Why can't I do this instead?

n = $INT($(ProcId) + 1)
arguments = read_${n}.fa

Solution

  • HTCondor submit description files use their own format for substitutions, not bash/shell syntax.

    Macros

    Parameterless macros in the form of $(macro_name:default initial value) may be used anywhere in HTCondor submit description files to provide textual substitution at submit time. Macros can be defined by lines in the form of

    <macro_name> = <string>
    

    In order to refer to a macro (variable) n use $(n) instead of the bash syntax ${n}. Since macros cannot be nested, evaluating $INT based on another macro requires an intermediate variable:

    proc1 = $(ProcId) + 1
    n = $INT(proc1)
    arguments = read_$(n).fa