Macros and Directories

Macros are generic attributes that are replaced with specific values during execution of batch processing. Two useful predefined macros are $(Process) and $(Cluster), which return the process number or cluster number of a job.

For example, you can use the $(Process) macro to submit batch processing that executes the same job numerous times and uses individual input files for each execution. You create unique input files before you submit your batch processing, and use a consistent naming convention for each file that includes the full range of process IDs for your iterations. This enables Condor to match the process ID with the name of a file (or directory).

Another good use of the $(Process) macro combines the macro with the use of the initialdir attribute to perform iterative executions from within unique directories. The initialdir attribute gives individual job executions a directory for file input and output use. If you specify a path for this attribute, it is relative to the directory in which you execute the script or the condor_submit command. Note that the path to the executable is not related to the value of initialdir.

Another macro enables you to use the dollar sign ($) as a literal character. For example, to include a dollar sign in a file name, use the macro $(DOLLAR) before the symbol in the file name.