NAME qprepStateInitialize: set default values in table of qprep options USAGE qprepStateInitialize(\%state_table); DESCRIPTION This qprep generic internal routine performs preliminary initialization of the qprep state hash table. The qprepInitCallback routine performs initializations specific to the local site. The qprep delineates state variables into two categories: "parser controls" and "queue properties". Parser controls affect how qprep parses input. Queue properties are to be translated into directives in the target queue system. Among the differences between these two categories is when they are evaluated. Since parser controls affect how qprep parses input, parser control directives that occur on the qprep command line must be evaluated /before/ the input script. In contrast, qprep effectively delays evaluation of queue property directives that occur on the qprep command line until /after/ parsing the input script, which allows the user to override queue properties set by directives in the input script. ARGUMENTS %state_table (in/out): qprep options hash table On output, each key is the name of a qprep option or state variable, each value is the default value for the associated option name. NOTES By separating the state initialization into two pieces, we accomplish these things: () Make it clear (to the developers anyway) which qprep state variables fall into which categories. () Allow for calling qprepStateInitializeQueueProperties a second time, after the initial parsing of the command-line options to obtain the parser control values. The prescribed semantics of qprep indicate that directives that occur on the command-line supercede directives that occur within a script. In practice this happens by writing the command-line directives at the end of the script preamble. But some command-line directives only make sense if evaluated before the script is even opened for reading. This poses a conflict. To resolve the conflict, qprep evaluates the command-line directives twice; once before the input script and once after. At this time, I see no reason to effectively undo the evaluation of the queue properties directives, but it might come up that we want to explicitly undo (or perhaps even skip) evaluation of non-parser-control directives before evaluating the input script. This implementation mildly assumes that the target queue system can accept having the same options set multiple times. If that is not the case, then the local qprepPreTranslationCallback and qprepFinishPreambleCallback would have to implement a more sophisticated scheme that guarentees that all directives occur at most once within the script. As it happens, we imlpement that sort of scheme for some of the options for most queue systems anyway, so expanding that scheme for more directives would not pose undue problems for the local site administrator. SEE ALSO qprepStateInitializeParserControls(in 'qprep.pm'), qprepStateInitializeQueueProperties(in 'qprep.pm'), qprepInitCallback(in 'localQprep.pm') qprep(1) manual page for list of directives. Practical Supercomputing Toolkit web site: https://pstoolkit.nwra.com/ AUTHOR Written 2001 by Michael J. Gourlay in collaboration with Joe Werne, Chris Bizon and others.