fdvmUGe (1158424)

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

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

17


Keldysh Institute of Applied Mathematics

Russian Academy of Sciences

Fortran DVM compiler

User’s guide

Mart 2000

Contents

1 Introduction 3

2 Compiler role 3

3 Invoking the compiler 3

4 Compiler options 4

5 Debugging mode of compilation 5

6 Compiling HPF-DVM program 8

7 Compiler messages 9



1Introduction

This document describes how to use the Fortran DVM (FDVM) compiler. It is part of set manuals describing DVM-system.

The following notations for syntax constructs are used in this guide:

::= is by definition

| an alternative construct

[x] encloses optional construct

y-list list of elements y [ , y ]…

2Compiler role

Fortran DVM (FDVM) language is an extension of the Fortran 77 language for parallel programming in DVM model. The extension is implemented as special comments (directives) that annotate sequential program in Fortran 77.

The input to the compiler is source code in Fortran DVM and HPF-DVM. The compiler produces the following output programs.

  • Parallel program in Fortran 77 language including runtime system function calls (Lib-DVM) for parallel execution. This program can be executed in the pseudo-parallel mode on a single processor (work station) and in parallel mode on a multiprocessor system.

  • Sequential program in Fortran 77 language which includes calls of functions accumulating information for debugging and performance analyzing. The program is executed on a single processor in sequential mode.

  • HPF program.

3Invoking the compiler

The following command line starts FDVM compiler up:

dvm fdv [ <options> ] <file-name>

where:

<options>

- specify compilation modes. If some option is omitted, default value is used. If two options contradict each other, the last one in the command line takes precedence;

<file-name>

- name (without extension) of source FDVM program file. The file must have .fdv extension. The current directory is searched for the source file.

4Compiler options

The compiler has some optional features that you select by including options on the command line of the compiler. The format of an option consists of a hyphen followed immediately by the option name. Some options require arguments. To describe option syntax following notations are used. Option names are typed in bold, and option arguments are typed in italics. The compiler options are listed and briefly described below.

-o file

Place output in the file file.

-s

Produce sequential program;

-p

Produce parallel program;

-hpf1

Produce HPF1 program;

-hpf2

Produce HPF2 program;

-v

Display the invocations of compiler phases and version number;

-w

Display all the warning messages;

-Idir

Add directory dir to the list of directories searched for include files;

-bindk

Specifies the compatibility of data types between Fortan and C.

-dleveld[:fr-list]

Produce additional code for the program debugging;

-elevele[:fr-list]

Produce additional code for program performance analyzing.

Output file. Name of output file, the compiler places output program in, is specified by the option

-o file

where file is the file name. If this option is omitted, the default name is <file-name>.f or <file-name>.hpf in mode of producing HPF program. Output file is placed to the current directory.

Produced program type. The type of produced program is specified by following options:

-s
–p
–hpf1
–hpf2

- sequential program
parallel program
HPF1 program
HPF2 program

Parallel program is produced by default.

Directories for include-files. If the source program has INCLUDE statements and not all include-files are in the current directory, it is necessary to use the option

-Idir

where dir is directory name. First, the compiler searches for an include-file in the directories and in the order specified in command line. Then the current directory is seached for file.

Additional information. To display the compiler version and invoking compilation phases, it is necessary to use the option

-v

Use the option

-w

to display all the warning messages.

Compatibility of data types. Compatibility of data types in Fortan and C compilers for the computer the produced program will be executed on is specified by the option

-bindk

where k is an integer pointing to compatibility table number.

k = 0:

Fortran Type

C Type

Size (bytes)

integer

long

4

real

float

4

double precision

double

8

character

char

1

logical

long

4

k = 1:

Fortran Type

C Type

Size (bytes)

integer

int

4

real

float

4

double precision

double

8

character

char

1

logical

int

4

integer*8

long

8

Compatibility of types is defined by standard C and Fortran compilers for the computer. By default, k = 0.

Attention. The –bind, –d, and –e options don’t affect HPF program generation (‑hpf1 and –hpf2 mode).

5Debugging mode of compilation

There are two ways to debug FDVM programs:

  • Functional debug, that allows to test correctness of program execution;

  • Program performance debug, that allows to test effectiveness of parallel execution.

Some debug levels are defined for each of them.

Functional debug levels. Functional debug level (leveld) is an integer (from 0 to 4) specifying the events, of which the Debugger is informed:

0 - no events;

1 - modification of distributed arrays,

2 - modification and usage of distributed arrays,

3 - modification of all the variables,

4 - modification and usage of all the variables.

Performance debug levels. The performance debug level (levele) is an integer (from 0 to 4) specifying which program segments are examined as execution intervals. The performance characteristics may be estimated for each of these intervals.

0 - no intervals;

1 - parallel loops and surrounding sequential loops;

2 - statement intervals, specified in the program by INTERVAL and END INTERVAL directives;

3 - combination of the level 1 and 2;

4 - all the loops and intervals specified by INTERVAL and END INTERVAL directives.

A sequence of statements is declared as interval by the following directives:

CDVM$ INTERVAL [<integer-expression>]

<statement-sequence>

CDVM$ END INTERVAL

Each interval must satisfy statement block conditions:

  • interval execution always starts with first statement,

  • interval execution always ends with last statement.

In other words transfer of control from outside the interval into it and from within the interval to a statement outside it is prohibited.

Program fragments. A program may be devied into separate statement fragments to be debugged. The fragment is specified by the folowing directives:

CDVM$ DEBUG <fragment-number> [( <parameter> )]

<statement-fragment>

CDVM$ END DEBUG <fragment-number>

<fragment-number>

::=

<integer>

<parameter>

::=

D = levele

|

E = leveld

|

D = leveld , E = levele

where

parameter D specifies the greatest allowed level of functional debug for the fragment,

parameter E specifies the greatest allowed level of performance debug for the fragment,

leveld – an integer number (from 0 to 4),

levele – an integer number (from 0 to 4).

Each fragment must satisfy statement block conditions.

The enclosed fragments are permitted. Let f1 denotes the set of statements that are composed surrounded fragment, l1 denotes the debug level that is specified in DEBUG directive, and f2 , l2 denote the set of statements and debug level of enclosed fragment. Then the greatest allowed level for set f1 f2 is l1 and for set f2 is l2.

By default, whole program is the fragment of number 0 and the greatest allowed level for it is D = 4 , E = 4.

Let the following structure of fragments in program unit is specified:

SUBROUTINE SUB(…)

S1

CDVM$ DEBUG 1 (D = 4 , E = 1)

S2

CDVM$ DEBUG 2 (D = 1 , E = 3)

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

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

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

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

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

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

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