Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
ИНСАЙД ИНФА MPI.pdf
Скачиваний:
16
Добавлен:
15.04.2015
Размер:
3.3 Mб
Скачать

488

CHAPTER 16. LANGUAGE BINDINGS

11. Implementations are required to provide the le mpif.h, as described in the original

2

3

MPI-1 speci cation.

42. mpif.h must be valid and equivalent for both xedand freesource form.

5

6Advice to implementors. To make mpif.h compatible with both xedand free-source

7forms, to allow automatic inclusion by preprocessors, and to allow extended xed-form

8line length, it is recommended that requirement two be met by constructing mpif.h

9without any continuation lines. This should be possible because mpif.h contains

10only declarations, and because common block declarations can be split among several

11lines. To support Fortran 77 as well as Fortran 90, it may be necessary to eliminate

12all comments from mpif.h. (End of advice to implementors.)

13

 

14

16.2.4 Extended Fortran Support

15

16

17

18

Implementations with Extended Fortran support must provide:

1. An mpi module

192. A new set of functions to provide additional support for Fortran intrinsic numeric

20types, including parameterized types: MPI_SIZEOF, MPI_TYPE_MATCH_SIZE,

21MPI_TYPE_CREATE_F90_INTEGER, MPI_TYPE_CREATE_F90_REAL and

22MPI_TYPE_CREATE_F90_COMPLEX. Parameterized types are Fortran intrinsic types

23which are speci ed using KIND type parameters. These routines are described in detail

24in Section 16.2.5.

25

Additionally, high-quality implementations should provide a mechanism to prevent fatal

26

type mismatch errors for MPI routines with choice arguments.

27

28

The mpi Module

29

30An MPI implementation must provide a module named mpi that can be used in a Fortran

3190 program. This module must:

32

33

34

35

De ne all named MPI constants

Declare MPI functions that return a value.

36An MPI implementation may provide in the mpi module other features that enhance

37the usability of MPI while maintaining adherence to the standard. For example, it may:

38

39

40

41

Provide interfaces for all or for a subset of MPI routines.

Provide INTENT information in these interface blocks.

42Advice to implementors. The appropriate INTENT may be di erent from what is

43given in the MPI generic interface. Implementations must choose INTENT so that the

44function adheres to the MPI standard. (End of advice to implementors.)

45

46Rationale. The intent given by the MPI generic interface is not precisely de ned

47and does not in all cases correspond to the correct Fortran INTENT. For instance,

48receiving into a bu er speci ed by a datatype with absolute addresses may require