Using Macros in Config Files
A macro works as a place-holder, and is replaced by a corresponding value after macro expansion is performed (during conversion of the front-end config file into the back-end config file). The name of a macro starts with a $ character, followed by a sequence of alphanumeric characters. A macro can be expanded only when its value is defined. If its value is undefined, the macro is left in the string unchanged.
For Desmond, the supported macros are listed in Table 1.
|
Macro Name |
Value defined |
Value |
|
|
Always |
The actual name of the job |
|
|
Only in Multisim |
The actual name of the master job |
|
|
Only for REMD jobs. |
The index of the replica. (Index starts from 0.) |
Optional string fragments that contain macros can also be defined. An optional fragment is a portion of a string enclosed by $[ and $]. Such a fragment, together with the $[ and $] characters, is deleted if there are one or more $ characters within the fragment. If there is no $ character within the fragment, only the $[ and $] are deleted. This operation is performed after macro expansion. To see its effect, consider the following example.
name = "$JOBNAME$[_replica$REPLICA$].dE"
If we have defined the values of $JOBNAME and $REPLICA to be myjob and 0, respectively, then the actual value for name will be myjob_replica0.dE. If we do not give a value to $REPLICA, macro expansion yields myjob$[_replica$REPLICA$].dE. Because there is a $ within the fragment, this fragment is deleted, so that the final value for name is myjob.dE.