DEB_METH (Раздаточные материалы)
Описание файла
Файл "DEB_METH" внутри архива находится в папке "Раздаточные материалы". Документ из архива "Раздаточные материалы", который расположен в категории "". Всё это находится в предмете "модели параллельных вычислений и dvm технология разработки параллельных программ" из 7 семестр, которые можно найти в файловом архиве МГУ им. Ломоносова. Не смотря на прямую связь этого архива с МГУ им. Ломоносова, его также можно найти и в других разделах. .
Онлайн просмотр документа "DEB_METH"
Текст из документа "DEB_METH"
Methods of debugging DVM-programs
Files containing texts of programs written in C-DVM language and Fortran DVM should have extension .cdv and .fdv respectively. It is recommended to debug programs first on tests, and then on the real data in the following sequence:
-
Debug DVM-program at workstation as a usual sequential program in C or Fortran 77 using usual compilers and debuggers. To start compilation and execution use commands:
dvmcs < filename of С-DVM program (without extension) >
dvmfs < filename of Fortran DVM program (without extension) >
-
Execute program using special mode to check DVM-directives. To start compilation and execution of DVM-program use commands:
dvmcerr < filename >
dvmferr < filename>
It is necessary to take into account, that execution of the program in such a mode requires considerable resources of additional memory and processor time. Therefore you should choose parameters of the program (number and size of arrays, number of iterations or accuracy of calculations) to minimize memory resources and processor time.
In case wrong DVM-directives are found, diagnostics about type of error, line from the source text and numbers of iterations of all nesting loops is output in <stderr> stream.
The absence of the error does not guarantee correct parallel program execution due to the following reasons:
-
Correctness of reduction operation descriptions is not checked.
-
Errors can occur in procedures called from DVM-programs, which are written in other languages and not controlled.
-
The tested sequential program can contain errors not appeared during sequential execution, but these errors could be detected during parallel execution.
To find such errors you should use the method based on comparison between sequential execution trace and parallel execution trace.
-
Obtain reference trace file as a result of sequential execution of the program and compare it with the trace of parallel execution of the program on one processor. Thus the correctness of reduction operation descriptions is checked. It is carried out by means of a special mode of parallel execution on one processor. In this case the reduction variables are calculated according to the reduction operation descriptions given by programmer. Use following commands:
dvmcred < filename >
dvmfred < filename >
If differences are detected in compared results diagnostics is output to <stderr> stream.
-
Start up parallel program in a mode of emulation of multiprocessor system on a workstation and compare the execution trace with the reference one. Use following commands:
dvmcdif N1 N2 N3 < filename >
dvmfdif N1 N2 N3 < filename >
Where N1, N2, N3 - sizes of processor matrix (it is possible to specify <N1 N2> or N1 only).
Note. If during the parallel program execution (or during its emulation on one workstation) error situation arise on some processor (or reference trace differs from the trace of current execution) the program can hang-up. If you stop execution (CTRL-C), you can lose standard output stream directed into files. In such case <stderr> stream should not be directed into files.
-
If there is no differences between reference trace and the trace of current parallel execution, it is possible to consider the program working correctly on test parameters. Now you can proceed to parallel execution of the program on cluster of workstations with real parameters. Use following commands:
dvmc < filename > (for compilation)
dvmf < filename >
dvmrun –m N1 N2 N3 < filename > (for execution)
Note. If during the program execution with real parameters parallel execution results differ from sequential execution results you can use above method of comparison of traces by setting the mode of selective accumulation of the reference trace. In such case before item 3 make an estimation of the size of a file with reference trace. Use following commands:
dvmcsize < filename >
dvmfsize < filename >
After that it is possible to set the mode of selective accumulation of the reference trace, completely or partially canceled accumulation of tracing (see DVM-debugger User’s guide) for some loops and to repeat an estimation of the file size. If results are acceptable you can proceed to item 3.