DEB_GUID (1158345)

Файл №1158345 DEB_GUID (Раздаточные материалы)DEB_GUID (1158345)2019-09-18СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла

25


Debugging DVM-programs.

User's guide.

Table of contents.

1. Introduction 1

2. What is DVM-program? 2

3. Error types in DVM-program. 2

4. Dynamic control of DVM-directives. 3

5. Comparison of execution results. 3

6. System trace accumulation tools and its examining. 4

7. DVM-system tuning. 4

8. Options of converters. 5

8.1. Converter options controlling program execution modes. 5

8.2. Options of converters for dynamic debugger. 6

8.3. Options of converters for performance analysis. 6

9. DVM-system commands. 6

9.1. Programs, using sequential program libraries. 9

10. Methods of debugging DVM-programs. 9

10.1. Debugging ordinary sequential program. 9

10.2. Obtaining debug versions of DVM-program for sequential and parallel execution. 9

10.3. Program execution in mode of dynamic control of DVM-directives. 9

10.4. Accumulation of reference file of DVM-program trace. 10

10.5. Comparing reference trace with results of parallel program execution on single processor. 10

10.6. Comparing parallel execution trace with reference one. 11

10.7. Accumulating parallel program trace. 12

10.8. Parallel execution with real data. 13

10.9. Estimating trace size. 13

10.10. Controlling size of trace file. 14

10.11. Program startup with non-standard parameter set. 15

11. Parameters of DVM-system. 15

11.1. The parameters of dynamic control 16

11.2. Parameters of trace accumulation and comparison. 17

11.3. Output parameters of informational messages of Run-Time Library. 19

11.4. Parameters controlling system tracing. 19

12. Diagnostics messages of dynamic debugger. 20

12.1. Dynamic control. 21

12.2. Trace accumulation and comparison. 22

13. Structure of loop description file 22

14. Execution trace structure. 23

15. Error messages of Run-Time Library. 24

16. Structure of system trace file. 25

1.Introduction

C-DVM and Fortran-DVM languages (F-DVM below) are intended for the development of portable and efficient parallel computational applications for different architecture computers. They are extensions of standard C and Fortran 77 languages. A parallel program is a usual sequential program, expanded by DVM-directives, defining its parallel execution. DVM-directives are transparent for usual compilers, so the compilers process DVM-program as usual sequential program.

The following approach is used to debug DVM-programs.

First, the program is debugged on a workstation as a sequential program (in the mode of ignoring DVM-directives) using ordinary debugging methods and tools. Then the program is executed at the workstation in the special mode of dynamic control of DVM-directives that allows verifying the correctness and fullness of the DVM-directives. At the next step the program may be executed at a parallel computer of a cluster of workstations (or on the workstation with simulation of parallel execution) in the mode of comparison its intermediate results with the reference ones obtained, for example, as a result of its sequential execution. Moreover, to localize errors during parallel program execution the tools for accumulation of the trace information are provided.

2.What is DVM-program?

DVM-program is one or several source files in C-DVM or F-DVM languages having extensions .cdv and .fdv respectively.

Ready-to-run program (executable file) is obtained in three steps:

  • conversion of C-DVM or F-DVM program to C or Fortran program and obtaining as a result the same named file (files) having extensions .c or .f respectively;

  • compilation of obtained on the previous step file (files) using standard C or Fortran compilers;

  • linking obtained object module (modules) with program libraries (if it is needed) and Lib-DVM library, that is Run-Time Library for parallel DVM-program execution.

3.Error types in DVM-program.

DVM-program can contain errors of different kinds. The errors can be subdivided on several classes by degree of their influencing on program robustness, by the easiness to detect and so on.

Generally, the following five classes of errors can be distinguished in DVM-program:

  1. Errors in sequential program.

  2. Syntax errors in DVM directives (incorrect usage of a statement, missing of brackets and so on) and violation of static semantics also.

  3. Incorrect order of DVM directives execution or invalid parameters of DVM directives.

  4. Wrong computation due to DVM directive incorrectness and errors, not detected when program was executed in sequential mode.

  5. Abnormal termination of parallel program execution (abend, infinite loops, hanging up) due to DVM directive incorrectness and errors, not detected when program was executed in sequential mode.

The errors of the first class are detected by:

  • standard C or Fortran compilers when a program is compiled in the mode of ignoring DVM-directives (see section Error: Reference source not found);

  • debugging tools used for ordinary sequential programs.

The errors of the second class are detected while converting C-DVM or F-DVM programs (see sections Error: Reference source not found and Error: Reference source not found). A list of diagnostics messages of C-DVM and F-DVM compilers is presented in the C-DVM and F-DVM compiler user manuals respectively.

The errors of the third class are detected by Lib-DVM library when the program is executed in parallel mode. Lib-DVM functions check the correctness of DVM-directives order and passed parameters (a list of error messages see in section Error: Reference source not found).

The errors of fourth class are detected by DVM-debugger when

  • DVM-program is executed on a single processor in dynamic control mode (see section Error: Reference source not found),

  • DVM-program is executed on a single or several processors in the mode of comparison of sequential (reference) and parallel trace.

The errors of the fifth class can be detected by:

  • examining the computation trace of parallel program execution of a program (see section Error: Reference source not found);

  • examining accumulated system trace, that is the trace of Lib-DVM function calls (see section Error: Reference source not found).

4.Dynamic control of DVM-directives.

Dynamic control of DVM-directives allows verifying correctness of the program parallization by DVM-directives. The dynamic control is based on simulation of DVM-program parallel execution during its sequential execution on a single processor.

For dynamic control a program should be converted in a mode of obtaining a debug version of the parallel program (see sections Error: Reference source not found and п.Error: Reference source not found).

However using this method essentially degrades the program execution and considerable additional memory resources are required. Therefore the program is recommended to debug using test data of limited volume only.

The dynamic control allows to detect the following kinds of errors:

  1. Undeclared cross-iteration dependencies of data in a parallel loop.

  2. Using of non-initialized private variables inside or outside of a parallel loop.

  3. Modification of read-only variables.

  4. Using reduction variables after an asynchronous reduction start but before its completion.

  5. Undeclared access to non-local elements of a distributed array.

  6. Writing to shadow edges of a distributed array.

  7. Reading shadow elements before their update completion.

  8. Modifying non-local element of a distributed array in sequential part of the program.

  9. Violation of a distributed array bounds.

  10. Writing to remote access buffer.

5.Comparison of execution results.

Lack of dynamic control errors does not guarantee correct execution of parallel program due to following reasons:

  • Dynamic control does not check correctness of reduction operation descriptions.

  • Errors can occur in called from DVM-program procedures, written in other languages and not controlled.

  • The tested sequential program can contain errors not appeared during sequential execution, but these errors could occur during the parallel execution.

To find such errors the mode of accumulation and comparison of execution traces is used. It allows to localize the program point and moment, when the results are beginning to differ.

When tracing execution, the information about the following events is gathered: all variables reads and writes, entering and exiting parallel loops, start and end of each loop iteration.

Tracing as well as dynamic control results in considerable overhead. Therefore the program is recommended to debug using test data and then on the real data. However when executing the program with real data, it is not always possible to accumulate full trace due to its large volume. In such a case it is necessary to estimate the trace size as for whole program as for its parts.

The detail level (and the size) of the trace can be controlled by:

  • options of C-DVM and F-DVM converters while converting a program (see section Error: Reference source not found);

  • trace parameters when the program is executed (see section Error: Reference source not found);

  • loop description file, when the program is executed (see section Error: Reference source not found).

6.System trace accumulation tools and its examining.

A system trace (the trace of Lib-DVM function calls) allows to trace sequence of function calls, their parameters and execution times. There are two modes of the system trace accumulation (see section Error: Reference source not found):

  • buffering in the memory of the each processor with the followed by writing to a file after successful program completion (writing to the file is performed on input/output processor);

  • writing to a file on each processor without buffering (with possibility to upload information about each event from system buffers).

Trace detail level is controlled by the parameters (see section Error: Reference source not found). It is necessary to remember that for tracing some frequently used Lib-DVM functions the library must be compiled in special mode, specified by computation variables. The full list of traced events is presented in file events.def in directory \SOURCE of DVM-system. In this file event number is corresponded to the name of each event.

System trace files have text format and can be examined using ordinary editors.

7.DVM-system tuning.

DVM-system is tuned to a user environment in two steps:

  • before installation the file, starting DVM-system installation, is tuned (see DVM-system installation - file readme.txt);

  • after installation, but before beginning dealing with user tasks, the file of starting dvm-commands is tuned. This file the user previously moves to his own directory from \USER directory of DVM-system.

The following environment variables that can be modified by a user are defined in the file of starting DVM-commands.

dvmdir

- full name (with path) of DVM-system directory (it is tuned automatically when the system is installed).

dvmpar

- directory and extensions of base parameter set files of DVM-system.

usrpar

- directories and names (with extensions) of DVM-system parameter files, in which a user can modify base parameter set (a variable can have several values, separated by spaces);

optconv

- and options of C-DVM and F-DVM converters;

optcomp

- invocation and options of standard C-compiler;

optfcomp

- invocation and options of standard Fortran-compiler;

optlink

- linker options;

dvmlib

- run-time library for DVM-programs (\LIB\dvm.lib);

usrlib

- libraries, used by user program;

dvmout

- enable (on) or disable (off) message output of:

- C-DVM and F-DVM converters,
- standard C and Fortran compilers
- run-time library (parameter SysInfoPrint is set equal to 1 or 0) (see section Error: Reference source not found);

dvmoutfile

- name of file for output of user task messages (if it is not specified, then messages will be output to the screen).

dvmlog

- enable (1) or disable (0 or <empty>) user session protocol (if dvmoutfile is not specified, the protocol is outputted to the file dvm.log).

dvmshow

- enable (1) or disable (0 or <empty>) output of all executed DVM-commands to the screen;

dvmsave

- enable (1) or disable (0 or <empty>) keeping intermediate files (of conversion, compilation and so on).

In own working directory (where a task is started) a user can have several versions of file of starting DVM-command with different names, containing different values of environment variables. Then at dvm-command startup the corresponding prefix is used (see section Error: Reference source not found).

8.Options of converters.

Options of C-DVM and F-DVM converters control:

  • DVM-program execution modes (sequential or parallel);

  • target file name (.c or .f).

  • output of converter version number and some other information;

  • detail level of data, traced by dynamic debugger (see section Error: Reference source not found);

  • partitioning a program by intervals for analyzing program performance.

8.1.Converter options controlling program execution modes.

-p

- (by default) obtaining parallel version of the program: all DVM-directives are processed,

-s

- obtaining sequential version of the program: only DVM-directives, necessary for execution tracing and performance analysis are processed. The data processing is not changed, that allow to debug such program using ordinary tools.

-o<file>

- name of target .c or .f file

-v

- output of version number, source file name and so on.

8.2.Options of converters for dynamic debugger.

-d1

- tracing only distributed array updating is performed

-d2

- tracing distributed array reading and updating is performed

-d3

- tracing all data updating is performed

-d4

- tracing all data reading and updating is performed

8.3.Options of converters for performance analysis.

-e1

- all parallel loops and nesting sequential loops are intervals;

-e2

- all parallel loops and statement sequences, declared by a user, are intervals;

-e3

= e1 + e2;

-e4

= e3+ all sequential loops are intervals

9.DVM-system commands.

DVM-system commands have the following form:

Характеристики

Тип файла документ

Документы такого типа открываются такими программами, как Microsoft Office Word на компьютерах Windows, Apple Pages на компьютерах Mac, Open Office - бесплатная альтернатива на различных платформах, в том числе Linux. Наиболее простым и современным решением будут Google документы, так как открываются онлайн без скачивания прямо в браузере на любой платформе. Существуют российские качественные аналоги, например от Яндекса.

Будьте внимательны на мобильных устройствах, так как там используются упрощённый функционал даже в официальном приложении от Microsoft, поэтому для просмотра скачивайте PDF-версию. А если нужно редактировать файл, то используйте оригинальный файл.

Файлы такого типа обычно разбиты на страницы, а текст может быть форматированным (жирный, курсив, выбор шрифта, таблицы и т.п.), а также в него можно добавлять изображения. Формат идеально подходит для рефератов, докладов и РПЗ курсовых проектов, которые необходимо распечатать. Кстати перед печатью также сохраняйте файл в PDF, так как принтер может начудить со шрифтами.

Список файлов учебной работы

Свежие статьи
Популярно сейчас
Зачем заказывать выполнение своего задания, если оно уже было выполнено много много раз? Его можно просто купить или даже скачать бесплатно на СтудИзбе. Найдите нужный учебный материал у нас!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
7031
Авторов
на СтудИзбе
260
Средний доход
с одного платного файла
Обучение Подробнее