rtsDDe (1158446), страница 5
Текст из файла (страница 5)
CurrentPar[0] = <parameter>;
CurrentPar[1] = <parameter>;
. . . . . . . . . . . . . . . . . . . . . . . .
CurrentPar[n] = <parameter>;
The parameters, placed from the right of "=" and determining information output, can be:
-
+o[<path, specifying file>]
This parameter instructs Run-Time System to redirect stdout stream to the specified file. If the path, specifying the file, is not given, then stdout is redirected to the file stdout.out.
-
+e[<path, specifying file>]
This parameter redirects stderr stream to the specified file. If the path, specifying the file, is not given, then stderr is redirected to the file stderr.out.
-
+i[<symbols, determining streams>]
This parameter instructs Run-Time System to redirect informational messages to the streams, determined by specified symbols.
The symbols, determining the streams, can be:
"o" stdout stream;
"e" stderr stream;
"f" file.
If both symbols "o" and "e" are specified and stdout and stderr streams are not redirected to the files or redirected to the same file, informational messages will be output to stdout stream only (informational messages are not duplicated). When informational messages are directed to the file (symbol "f" is specified) the file name (path) is defined by SysInfoFileName parameter in parameter syspar.* files (see below). If no symbols are specified informational messages will not be output.
Redirection of stdout and stderr streams to the files can be done using following parameters, specified in syspar.* files:
| StdOutToFile | | flag to redirect standard output stream stdout into the file; |
| StdOutFileName | | path, determining a file for stdout stream redirection. If the parameter is omitted or dummy path is specified, then stdout stream will be redirected to the file stdout.out (if redirection is set by the parameter StdOutToFile); |
| StdErrToFile | | flag to redirect standard error output stream stderr to the file; |
| StdErrFileName | | path, determining a file for stderr stream redirection. If the parameter is omitted or dummy path is specified, then stderr stream will be redirected to the file stderr.out (if it is set by the parameter StdErrToFile); |
| DelStdStream | | flag to delete "old" (kept from previous startup) files containing output streams. |
When parameters are output and processed the first specification of standard output stream redirection to the file has the highest priority. Partially stdout and stderr streams redirection using "+o" and "+e" parameters of current.par file suppresses the stream redirection by listed above parameters of syspar.* files (the file current.par is output and processed earlier than syspar.* file).
If the instruction "+i" is omitted in the file current.par the informational message output is determined by the parameters, specified in syspar.* file.
The parameters are:
| SysInfoPrint | | common flag of enabled output of informational messages; |
| SysInfoStdOut | | flag to output informational messages to stdout stream provided that it is redirected to the file; |
| SysInfoStdErr | | flag to output informational messages to stderr stream; |
| SysInfoFile | | flag to output informational messages to the file. |
If value of the parameters SysInfoStdOut and SysInfoStdErr is equal to 1 then informational messages are also redirected to the file and are output to the screen if stdout is redirected to the file (redirection of a user program output to the file must be specified by "+o" parameter of current.par file). Controlling values of the parameters any combination of SCREEN STDOUT, REDIRECTED TO THE FILE can be obtained. If SysInfoStdOut and SysInfoStdErr parameters are equal to one, and stdout and stderr streams are not redirected or redirected to the same file informational messages will be output to stdout stream only (informational messages are not duplicated).
Note, that the redirection of informational messages using the current.par parameter "+i" has priority under the redirection, specified by the parameters SysInfoStdOut, SysInfoStdErr and SysInfoFile of syspar.* file.
Output of informational messages to the file (SysInfoFile = 1) is also controlled by next parameters of syspar.* file:
| SysInfoFileName | | path, specifying a file for informational messages accumulating; |
| FatInfoNoOpen | | flag to terminate the work in the case of opening failure of the file for the informational messages; |
| SysInfoSepFile | | flag to accumulate informational messages in separate for each processor file; |
| DelSysInfo | | flag to delete “old” (kept from previous startup) files containing informational messages. |
If FatInfoNoOpen parameter is equal to zero opening failure of informational message file causes warning output to the error message stream and then the program will run without output of informational messages to the file.
If SysInfoSepFile is equal to 0, each processor outputs informational messages directly to the file, specified by SysInfoFileName parameter. If SysInfoSepFile is equal to 1, each processor accumulates informational messages in its own temporary file, having name <internal processor number>.out. After work completion all temporary files are jointed in the one file (specified by parameter SysInfoFileName), and then are deleted.
All error messages are:
-
output to stderr stream, if stdout and stderr streams are not redirected to the same file;
-
directed to the stdout stream, if user program output (or stderr stream) was redirected to the file;
-
output to the file, specified by the parameter SysInfoFileName, if SysInfoFile parameter is equal to 1 (to the file, informational messages are output to).
Therefore error messages always:
-
accompany output of the user program;
-
are output to the screen (if stdout and stderr are not simultaneously redirected to the files).
Note 1. Output of informational messages before input of SysInfoPrint parameter value is determined by state of common flag of informational messages output at program startup (before Run-Time System initialization). The flag is assigned by non-zero value in the case if Run-Time System was compiled with predefined compilation variable _INIT_INFO_. Otherwise informational messages are not output up to input of SysInfoPrint parameter.
Note 2. Usually output of informational messages is performed as follows. Up to input of parameters informational messages are directed to the stdout stream. After SysInfoStdOut and SysInfoStdErr parameters input if the fist parameter is equal to zero but the second one is not, informational messages will be redirected to stderr stream. If both parameters are not equal to zero, and stdout and stderr streams are redirected to the screen or to the same file, informational message will be output to the stdout stream only.
Informational message output with stderr stream priority is provided as alternative. For this purpose Run-Time System should be compiled with defined compilation variable _INFO_STDERR_. As result stderr stream will be play the same role as stdout stream in standard scheme considered above.
Note 3. If informational message output is set to the file and to stdout (stderr) stream, but stdout (stderr) stream is also redirected to this file, output of informational messages to the file is locked (SysInfoFile parameter is set to zero).
8.3Classes of informational messages and their output controlling
All informational messages are divided on non-crossed classes; each of them is corresponded to functioning of certain component of Run-Time System. Output of each class messages is controlled independently by listed below parameters from syspar.*, statist.*, systrace.* and usrdebug.* files. The parameter is considered to be specified in syspar.* files by default.
-
VersStartPrint – flag to output Run-Time System version number before starting the program.
-
VersFullStartPrint – flag to output Run-Time System version number and version numbers of all parameter files before starting the program.
-
VersFinishPrint – flag to output Run-Time System version number after the program termination.
-
VersFullFinishPrint – flag to output Run-Time System version number and version numbers of all parameter files after the program termination.
-
SysParPrint – flag to output Run-Time System initialization parameters before starting the program.
-
ProcListPrint – flag to output processor matrix before starting the program. Internal and external numbers and identifier are reported for each processor.
-
WeightListPrint – flag to output coordinate processor weights before starting the program.
-
ParamRunPrint – flag to output information about initial parameters and starting modes of Run-Time System before starting the program (standard or non-standard startup, base message passing system type and so on).
-
EndProgMemoryPrint – flag to output information about non-freed memory when terminating work.
-
EndProgObjectPrint – flag to output information about not deleted static DVM-objects when terminating work.
-
EndProgCheckSumPrint – flag to output information about state of checked memory areas when terminating work.
-
InputParPrint – flag to output messages about input beginning for each parameter file.
-
EndReadParPrint – flag to output messages about input completion for each parameter file.
-
TimeExpendPrint mode to output time spent by the program. If the parameter is equal to zero, time consumption information is not reported. The parameter, equal to 1, specifies brief output mode of time consumption information. The parameter with value, more than 1 (2,3,4,5) specifies detailed mode. The parameter is set in files with statist name.
-
CallCountPrint – flag to output statistics of Run-Time System function calls, acceptable for the user program (for each function the count of function calls is reported). The parameter is set in the files with statist name. If CalìCountPrint value is equal to one the information about functions, invoked at least one time, is output only and if the value is equal to 2, information about all functions is output.
-
TraceClosePrint – flag to output messages about completion of uploading each buffer with accumulated system trace into a file (when tracing in memory buffer). The parameter is set in the files with name systrace.
-
DbgInfoPrint – flag to output informational messages of dynamic control subsystem and execution trace. The parameter is set in files with usrdebug name.
Messages of any class are output only in the case if common flag of informational message output is set (using SysInfoPrint parameter, considered in section 8.2).
9Measuring time of user program interval execution
In addition to main tools of performance analysis and gathering information, required for it, Run-Time System provides subsidiary mechanism of measuring execution time of user program intervals. When this mechanism is used the results of measuring are output to system trace streams. To mark beginning and end of measured interval macrocalls MeasureStart and MeasureFinish are used. Measured intervals can be nested:
| MeasureStart; /* interval 1 beginning */ | ||
| MeasureStart; /* interval 2 beginning */ | ||
| MeasureStart; /* interval N beginning / | ||
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | ||
| MeasureFinish; /* interval 2 end */ | ||
| MeasureFinish; /* interval 1 end */ | ||
The macrocall MeasureStart is equivalent to the function dvm_trace call (see section ) with event number 1 (the event name is MeasureStart), and macrocall MeasureFinish is equivalent to dvm_trace function call with event number 2 (the event name is MeasureFinish). As additional information for the macrocall MeasureStart the enclosure level of measured interval (1,2, …, N in the scheme above) is output and for the macrocall MeasureFinish the enclosure level and program execution time, passed from MeasureStart macrocall moment with the same enclosure level, are output to the opened streams.















