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

454

CHAPTER 14. PROFILING INTERFACE

1di erent machines.

2Since MPI is a machine independent standard with many di erent implementations,

3it is unreasonable to expect that the authors of pro ling tools for MPI will have access to

4the source code that implements MPI on any particular machine. It is therefore necessary

5to provide a mechanism by which the implementors of such tools can collect whatever

6performance information they wish without access to the underlying implementation.

7We believe that having such an interface is important if MPI is to be attractive to end

8users, since the availability of many di erent tools will be a signi cant factor in attracting

9users to the MPI standard.

10The pro ling interface is just that, an interface. It says nothing about the way in which

11it is used. There is therefore no attempt to lay down what information is collected through

12the interface, or how the collected information is saved, ltered, or displayed.

13While the initial impetus for the development of this interface arose from the desire to

14permit the implementation of pro ling tools, it is clear that an interface like that speci ed

15may also prove useful for other purposes, such as \internetworking" multiple MPI imple-

16mentations. Since all that is de ned is an interface, there is no objection to its being used

17wherever it is useful.

18As the issues being addressed here are intimately tied up with the way in which ex-

19ecutable images are built, which may di er greatly on di erent machines, the examples

20given below should be treated solely as one way of implementing the objective of the MPI

21pro ling interface. The actual requirements made of an implementation are those detailed

22in the Requirements section above, the whole of the rest of this chapter is only present as

23justi cation and discussion of the logic for those requirements.

24The examples below show one way in which an implementation could be constructed to

25meet the requirements on a Unix system (there are doubtless others that would be equally

26valid).

27

28

14.3 Logic of the Design

29

30

Provided that an MPI implementation meets the requirements above, it is possible for the

31

implementor of the pro ling system to intercept all of the MPI calls that are made by

32

the user program. She can then collect whatever information she requires before calling

33

the underlying MPI implementation (through its name shifted entry points) to achieve the

34

desired e ects.

35

36

14.3.1 Miscellaneous Control of Pro ling

37

38There is a clear requirement for the user code to be able to control the pro ler dynamically

39at run time. This is normally used for (at least) the purposes of

40

41

42

43

44

45

46

Enabling and disabling pro ling depending on the state of the calculation.

Flushing trace bu ers at non-critical points in the calculation

Adding user events to a trace le.

These requirements are met by use of the MPI_PCONTROL.

47

48