condor

HTCondor: In the submit file, how to evaluate the value of a variable in order to write it in an output file name?


I want to run several jobs with HTCondor, here is my submit file:

# Unix submit description file
b1=50+($(Process)%41)*10    
executable              = PATH/script.sh
arguments               = $(b1)
log                     = fit_it_data_$(b1).log
output                  = outfile_fit_$(b1).txt
error                   = errors_fit_$(b1).txt
transfer_input_files    = PATH
should_transfer_files   = Yes
when_to_transfer_output = ON_EXIT
queue 81

So my executable file is taking b1 in argument, which is defined by a function of $(Process). I want to write the value of b1 in my output files. The problem is that I obtain something like that:

outfile_fit_50+17%41_100.txt

Even when I try to define b1=$(50+($(Process)%41)*10) I am getting the same...Any idea how to fix it?


Solution

  • The syntax in a HTCondor submit file for evaluating a classad expression is "$$([ expression ]) ". So, if you change your submit file to

    output = output_file.$$([$(b1)])
    

    I think you'll get what you want. If you need to, you could put the same thing in the arguments command as well.