JP2012032986A - Compile method and program - Google Patents

Compile method and program Download PDF

Info

Publication number
JP2012032986A
JP2012032986A JP2010171661A JP2010171661A JP2012032986A JP 2012032986 A JP2012032986 A JP 2012032986A JP 2010171661 A JP2010171661 A JP 2010171661A JP 2010171661 A JP2010171661 A JP 2010171661A JP 2012032986 A JP2012032986 A JP 2012032986A
Authority
JP
Japan
Prior art keywords
profile information
program
code
function
parallel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010171661A
Other languages
Japanese (ja)
Inventor
Masaki Arai
正樹 新井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2010171661A priority Critical patent/JP2012032986A/en
Publication of JP2012032986A publication Critical patent/JP2012032986A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a compile method and a program capable of more reducing a used amount of a storage medium necessary for collection of profile information than before.SOLUTION: A CPU contained in a front end node executes: an insertion step for inserting an aggregation code for aggregating profile information acquired by each parallel computation device and corresponding to a designated range in a parallel computation program in a parallel computation device allocated to each designated range in the parallel computation program and a compression and integration code for compressing and integrating the aggregated profile information into the parallel computation program; and a compile step for compiling the parallel computation program into which the aggregation code and the compression code are inserted.

Description

本発明は、プロファイル方法及びプログラムに関する。   The present invention relates to a profile method and a program.

従来より、複数のプロセッサからなる並列計算機上で動作する並列プログラムの実行性能を解析して、プロファイル情報を出力する技術が知られている。また、トレースデータの重複部分を削除する技術やトレースデータの実行回数を指定する技術が知られている。   2. Description of the Related Art Conventionally, a technique for analyzing the performance of a parallel program running on a parallel computer composed of a plurality of processors and outputting profile information is known. In addition, a technique for deleting an overlapping portion of trace data and a technique for designating the number of execution times of trace data are known.

また、大規模並列計算機で動作するプログラムとして、SPMD(Single-Program, Multiple-Data)プログラムが知られている。大規模並列計算機は、コンピュータで構成される、1つのフロントエンドノード及び複数(例えば数万個)の計算ノードを含む。フロントエンドノード及び複数の計算ノードは、ネットワークを介して互いに接続されている。また、フロントエンドノードは、SPMDプログラム及びコンパイラを備えている。コンパイラは、SPMDプログラムをコンパイルすることによって、実行可能ファイルを作成する。   As a program that operates on a large-scale parallel computer, an SPMD (Single-Program, Multiple-Data) program is known. A large-scale parallel computer includes one front-end node and a plurality of (for example, tens of thousands) computation nodes configured by computers. The front end node and the plurality of calculation nodes are connected to each other via a network. The front-end node includes an SPMD program and a compiler. The compiler creates an executable file by compiling the SPMD program.

この種の大規模並列計算機は、実行可能ファイルを以下の手順で実行する。まず、フロントエンドノードが、使用する計算ノード番号の最大値を決定する。つまり、使用する計算ノードの最大数が決定される。次に、フロントエンドノードが、コンパイラによって作成された実行可能ファイルを各計算ノードへコピーする。その後、各計算ノードが実行可能ファイルを実行する。   This type of massively parallel computer executes an executable file according to the following procedure. First, the front-end node determines the maximum value of the calculation node number to be used. That is, the maximum number of calculation nodes to be used is determined. Next, the front end node copies the executable file created by the compiler to each compute node. Thereafter, each compute node executes the executable file.

ところで、SPMDプログラムから作成された実行可能ファイルの実行時の振舞いを調査するために、フロントエンドノードは、プロファイル情報を取得することがある。既存の技術では、以下の手順に従って、プロファイル情報を取得する。まず、各計算ノードは、実行可能ファイルを実行しながらSPMDプログラムのある位置の実行回数やある範囲の実行時間を取得し、実行可能ファイルの実行終了時に、取得された実行回数や実行時間の情報をプロファイル情報として記憶する(手順1)。次に、フロントエンドノードが、実行可能ファイルの実行終了時に、各計算ノードに記憶されたプロファイル情報を取得し、1つのプロファイル情報を作成する(手順2)。このようにして、フロントエンドノードは1つのプロファイル情報を取得する。   By the way, in order to investigate the behavior at the time of execution of the executable file created from the SPMD program, the front-end node may acquire profile information. In the existing technology, profile information is acquired according to the following procedure. First, each computation node acquires the number of executions at a certain position of the SPMD program and a certain range of execution time while executing the executable file, and when the execution of the executable file ends, information on the acquired number of executions and execution time is obtained. Is stored as profile information (procedure 1). Next, at the end of execution of the executable file, the front-end node acquires profile information stored in each calculation node and creates one profile information (procedure 2). In this way, the front-end node acquires one profile information.

特開平10−63550号公報JP-A-10-63550

特開2001−147833号公報JP 2001-147833 A

特開平10−11321号公報JP-A-10-11321

しかしながら、各計算ノードで収集される詳細なプロファイル情報のデータサイズは巨大なので、上記手順2で作成される1つのプロファイル情報は膨大なデータ量になる。特に、SPMDコードでは、複数の計算ノードによって、同様の処理が実行される場合も多いので、各計算ノードで個別に収集したプロファイル情報には、冗長な情報も大量に含まれる。よって、各計算ノード及びフロントエンドノードにおいて、プロファイル情報の収集に必要な記憶媒体の容量、即ち、メモリ又はハードディスクの容量が、無駄に消費されることがある。   However, since the data size of the detailed profile information collected at each calculation node is huge, one profile information created in the procedure 2 has a huge amount of data. In particular, in the SPMD code, the same processing is often executed by a plurality of calculation nodes. Therefore, a large amount of redundant information is included in the profile information collected individually at each calculation node. Therefore, the capacity of the storage medium necessary for collecting the profile information, that is, the capacity of the memory or the hard disk may be wasted in each calculation node and front-end node.

上記課題に鑑み、開示されたコンパイル方法、プログラム実行方法及びプログラムは、従来よりもプロファイル情報の収集に必要な記憶媒体の使用量を低減することができることを目的とする。   In view of the above problems, it is an object of the disclosed compiling method, program execution method, and program to reduce the amount of storage medium used necessary for collecting profile information as compared with the related art.

上記目的を達成するため、開示されたコンパイル方法は、コンピュータに、並列計算機の各々が取得する、並列計算用プログラムの指定された範囲に対応するプロファイル情報を当該並列計算用プログラムの指定された範囲毎に割り当てられた並列計算機に集約する集約コード及び前記集約されたプロファイル情報を圧縮且つ統合する圧縮統合コードを並列計算用プログラムに挿入する挿入工程と、前記集約コード及び前記圧縮コードを挿入された並列計算用プログラムをコンパイルするコンパイル工程とを実行させる。   In order to achieve the above-described object, the disclosed compiling method is a method in which profile information corresponding to a specified range of a parallel calculation program acquired by each of the parallel computers is stored in a specified range of the parallel calculation program. An insertion step of inserting into the parallel calculation program an aggregated code that is aggregated to a parallel computer assigned for each time and a compressed integrated code that compresses and integrates the aggregated profile information; and the aggregated code and the compressed code are inserted And a compiling step of compiling a parallel computing program.

開示されたプログラムは、コンピュータに、並列計算機の各々が取得する、並列計算用プログラムの指定された範囲に対応するプロファイル情報を当該並列計算用プログラムの指定された範囲毎に割り当てられた並列計算機に集約する集約コード及び前記集約されたプロファイル情報を圧縮且つ統合する圧縮統合コードを並列計算用プログラムに挿入する挿入工程と、前記集約コード及び前記圧縮コードを挿入された並列計算用プログラムをコンパイルするコンパイル工程とを実行させる。   The disclosed program is obtained by assigning profile information corresponding to a designated range of a parallel computing program acquired by each of the parallel computers to a parallel computer assigned to each designated range of the parallel computing program. An insertion step of inserting into the parallel calculation program an aggregate code to be aggregated and a compressed integrated code for compressing and integrating the aggregated profile information, and compiling to compile the parallel computation program into which the aggregate code and the compressed code are inserted Process.

開示されたコンパイル方法及びプログラムによれば、従来よりもプロファイル情報の収集に必要な記憶媒体の使用量を低減することができる。   According to the disclosed compiling method and program, it is possible to reduce the usage amount of the storage medium necessary for collecting profile information as compared with the related art.

本実施の形態に係る並列計算機の概略構成図である。It is a schematic block diagram of the parallel computer which concerns on this Embodiment. フロントエンドノード2及び計算ノード3−0〜3−Nの概略構成図である。It is a schematic block diagram of the front end node 2 and the calculation nodes 3-0 to 3-N. コンパイラ12で実行される処理を示すフローチャートである。3 is a flowchart showing processing executed by a compiler 12. SPMDプログラム11の一例を示す図である。2 is a diagram illustrating an example of an SPMD program 11. FIG. SPMDプログラム11に対応する関数呼び出しグラフ及び各関数の制御フローグラフの例を示す図である。It is a figure which shows the example of the function call graph corresponding to the SPMD program 11, and the control flow graph of each function. SPMDプログラム11に対応する関数呼び出しグラフ及び各関数の制御フローグラフの例を示す図である。It is a figure which shows the example of the function call graph corresponding to the SPMD program 11, and the control flow graph of each function. SPMDプログラム11に対応する関数呼び出しグラフ及び各関数の制御フローグラフの例を示す図である。It is a figure which shows the example of the function call graph corresponding to the SPMD program 11, and the control flow graph of each function. SPMDプログラム11に対応する関数呼び出しグラフ及び各関数の制御フローグラフの例を示す図である。It is a figure which shows the example of the function call graph corresponding to the SPMD program 11, and the control flow graph of each function. SPMDプログラム11に対応する関数呼び出しグラフ及び各関数の制御フローグラフの例を示す図である。It is a figure which shows the example of the function call graph corresponding to the SPMD program 11, and the control flow graph of each function. プロファイル情報の取得処理を示すフローチャートである。It is a flowchart which shows the acquisition process of profile information. 各計算ノード3−0〜3−3が有するプロファイル情報の状態を示す図である。It is a figure which shows the state of the profile information which each calculation node 3-0 3-3 has. 複数のプロファイル情報が圧縮且つ統合された後の各計算ノード3−0〜3−3の状態を示す図である。It is a figure which shows the state of each calculation node 3-0 -3-3 after several profile information is compressed and integrated. 計算ノード3−0及び計算ノード3−3に集約されたプロファイル情報が存在する状態を示す図である。It is a figure which shows the state in which the profile information aggregated to the calculation node 3-0 and the calculation node 3-3 exists. 計算ノード3−0及び計算ノード3−3で圧縮且つ統合されたプロファイル情報を1つのプロファイル情報に集約した状態を示す図である。It is a figure which shows the state which aggregated the profile information compressed and integrated by the calculation node 3-0 and the calculation node 3-3 to one profile information. プロファイル情報処理関数(profile_start及びprofile_end)を含むコードの一例を示す図である。It is a figure which shows an example of the code | cord | chord containing a profile information processing function (profile_start and profile_end). 実行可能ファイル13の一例を示す図である。4 is a diagram illustrating an example of an executable file 13. FIG. 関数PARTを含むコードの一例を示す図である。It is a figure which shows an example of the code containing the function PART. 関数CHOOSE_MAXを含むコードの一例を示す図である。It is a figure which shows an example of the code containing function CHOOSE_MAX.

以下、本発明の実施の形態について、図面を参照して説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は、本実施の形態に係る並列計算機の概略構成図である。   FIG. 1 is a schematic configuration diagram of a parallel computer according to the present embodiment.

図1において、並列計算機1は、フロントエンドノード2、及び並列計算装置としての計算ノード3−0〜3−N(N:自然数)を備えている。フロントエンドノード2及び計算ノード3−0〜3−Nは、コンピュータなどのハードウエアであり、ネットワーク4を介して互いに接続されている。フロントエンドノード2は、並列計算用のプログラムであるSPMD(Single-Program, Multiple-Data)プログラム11、コンパイラ12、及び実行可能プログラム13を備えている。尚、図1中の「K」は各計算ノードのノード番号を示す。例えば、「K=0」は、計算ノード3−0のノード番号が0であることを示し、「K=N」は、計算ノード3−Nのノード番号がN(N:自然数)であることを示す。   In FIG. 1, a parallel computer 1 includes a front-end node 2 and computation nodes 3-0 to 3-N (N: natural number) as parallel computing devices. The front-end node 2 and the computation nodes 3-0 to 3-N are hardware such as a computer and are connected to each other via the network 4. The front-end node 2 includes an SPMD (Single-Program, Multiple-Data) program 11, a compiler 12, and an executable program 13, which are programs for parallel computation. Note that “K” in FIG. 1 indicates the node number of each computation node. For example, “K = 0” indicates that the node number of the calculation node 3-0 is 0, and “K = N” indicates that the node number of the calculation node 3-N is N (N: natural number). Indicates.

各計算ノードは、CPU21−K及びメモリ22−Kを有する。Kは、各計算ノードに対応するノード番号である。尚、各計算ノードの詳細な構成は、後述する。   Each computation node has a CPU 21-K and a memory 22-K. K is a node number corresponding to each calculation node. The detailed configuration of each calculation node will be described later.

SPMDプログラム11は、並列計算用のプログラムである。SPMDプログラム11は、全ノード番号をいくつかのグループに分けて利用する。従って、SPMDプログラム11内のノード番号に関する処理に基づいて作成される実行可能プログラムの数は、計算ノードの数よりも少ない。   The SPMD program 11 is a program for parallel calculation. The SPMD program 11 uses all node numbers divided into several groups. Therefore, the number of executable programs created based on the processing related to the node number in the SPMD program 11 is smaller than the number of calculation nodes.

コンパイラ12は、SPMDプログラム11をコンパイルし、実行可能プログラム13を作成する。尚、コンパイラ12により作成される実行可能プログラムの数は、1つに限定されるものではない。複数の実行可能プログラムが作成されてもよい。作成された実行可能プログラム13は、計算ノード3−0〜3−Nに送信され、各計算ノードにより実行される。   The compiler 12 compiles the SPMD program 11 and creates an executable program 13. Note that the number of executable programs created by the compiler 12 is not limited to one. A plurality of executable programs may be created. The created executable program 13 is transmitted to the computation nodes 3-0 to 3-N and executed by each computation node.

図2は、フロントエンドノード2及び計算ノード3−0〜3−Nの概略構成図である。尚、計算ノード3−0〜3−Nの各々の構成は、フロントエンドノード2の構成と同一であるため、その説明は省略する。   FIG. 2 is a schematic configuration diagram of the front-end node 2 and the calculation nodes 3-0 to 3-N. Note that the configuration of each of the computation nodes 3-0 to 3-N is the same as that of the front end node 2, and therefore the description thereof is omitted.

フロントエンドノード2は、フロントエンドノード2全体を制御するCPU21、各種の情報やプログラムを備えるメモリ22を備えている。また、フロントエンドノード2は、OS、各種の情報やプログラムを備えるハードディスクドライブ(HDD)23、各計算ノードを接続する通信インターフェース24を備えている。さらに、フロントエンドノード2は、マウス及びキーボードのような入力装置31からデータを入力する入力部25、及びモニタ又はプリンタのような出力装置32にデータやメッセージを出力する出力部26を備えている。CPU21は、バス27を介して、メモリ22、HDD23、通信インターフェース24、入力部25、及び出力部26に接続されている。   The front end node 2 includes a CPU 21 that controls the entire front end node 2 and a memory 22 that includes various information and programs. The front-end node 2 also includes an OS, a hard disk drive (HDD) 23 having various information and programs, and a communication interface 24 for connecting each calculation node. Further, the front-end node 2 includes an input unit 25 that inputs data from an input device 31 such as a mouse and a keyboard, and an output unit 26 that outputs data and messages to an output device 32 such as a monitor or a printer. . The CPU 21 is connected to the memory 22, HDD 23, communication interface 24, input unit 25, and output unit 26 via the bus 27.

図1のSPMDプログラム11、コンパイラ12及び実行可能プログラム13は、メモリ22又はHDD23に格納されている。コンパイラ12は、CPU21の制御により動作する。尚、フロントエンドノード2は、これらの要素以外にも、CD−Rドライブのようなデータの読み書き装置や、不揮発性ROM等を備えていてもよい。   The SPMD program 11, the compiler 12, and the executable program 13 in FIG. 1 are stored in the memory 22 or the HDD 23. The compiler 12 operates under the control of the CPU 21. The front end node 2 may include a data read / write device such as a CD-R drive, a nonvolatile ROM, and the like in addition to these elements.

図3は、コンパイラ12で実行される処理を示すフローチャートである。図4は、SPMDプログラム11の一例を示す図である。図4のSPMDプログラム11では、関数Hに通信処理SEND()及び通信処理RECEIVE()を含む。   FIG. 3 is a flowchart showing processing executed by the compiler 12. FIG. 4 is a diagram illustrating an example of the SPMD program 11. In the SPMD program 11 of FIG. 4, the function H includes a communication process SEND () and a communication process RECEIVE ().

図3において、コンパイラ12は、SPMDプログラム11に対応するプログラム全体の関数呼び出しグラフ及び各関数の制御フローグラフを作成する(ステップC1)。関数呼び出しグラフは、SPMDプログラム11のソースコードに書いてある関数の呼び出し関係を示すグラフである。制御フローグラフは、プログラムを実行したときに通る可能性のある全経路を表したグラフである。   In FIG. 3, the compiler 12 creates a function call graph of the entire program corresponding to the SPMD program 11 and a control flow graph of each function (step C1). The function call graph is a graph showing a function call relationship written in the source code of the SPMD program 11. The control flow graph is a graph that represents all paths that may be taken when the program is executed.

ここで、図4のSPMDプログラム11に対応する関数呼び出しグラフ及び各関数の制御フローグラフを図5に示す。図5では、制御のフローを実線で表し、関数の呼び出し及び関数からの復帰を点線で表している。図5では、main関数が、基本ブロック41〜44(コード片A,関数Gの呼び出し、関数Hの呼び出し、コード片B)を含む。関数Gは、基本ブロック421〜424を含み、関数Hは、基本ブロック431〜434を含む。基本ブロックは、コンパイラ最適化を行うための最小単位である。   Here, FIG. 5 shows a function call graph corresponding to the SPMD program 11 of FIG. 4 and a control flow graph of each function. In FIG. 5, the control flow is represented by a solid line, and the function call and the return from the function are represented by a dotted line. In FIG. 5, the main function includes basic blocks 41 to 44 (code piece A, function G call, function H call, code piece B). The function G includes basic blocks 421 to 424, and the function H includes basic blocks 431 to 434. The basic block is a minimum unit for performing compiler optimization.

次に、コンパイラ12は、プロファイル情報を取得する範囲(以下、対象範囲という)を決定する(ステップC2)。プロファイル情報は、SPMDプログラム11のある位置の実行回数やある範囲の実行時間を纏めた情報であり、本実施の形態では、計算ノード番号、範囲名、位置識別情報及び実行時間を含む。計算ノード番号、範囲名、位置識別情報及び実行時間の詳細は後述する。対象範囲は、例えば、関数単位又は基本ブロック単位などである。どのような範囲でプロファイル情報を取得するかは、プログラムがコンパイルオプションによって指定する。尚、コンパイルオプションは、プログラマが知っている情報を正確にコンパイラに知らせるために実行時に指定するオプションである。ここでは、対象範囲は関数単位及び基本ブロック単位に設定されているものとする。   Next, the compiler 12 determines a range for acquiring profile information (hereinafter referred to as a target range) (step C2). The profile information is information that summarizes the number of times the SPMD program 11 is executed and a certain range of execution time. In the present embodiment, the profile information includes a calculation node number, a range name, position identification information, and an execution time. Details of the calculation node number, range name, position identification information, and execution time will be described later. The target range is, for example, a function unit or a basic block unit. The range in which profile information is acquired is specified by the program using compile options. The compile option is an option that is specified at the time of execution in order to accurately inform the compiler of information known to the programmer. Here, it is assumed that the target range is set in function units and basic block units.

次いで、コンパイラ12は、対象範囲に範囲名を割り当て、対象範囲の開始地点にプロファイル情報の測定を開始するコードを挿入し、対象範囲の終了地点にプロファイル情報の測定を終了するコードを挿入する(ステップC3)。図6の例では、コンパイラ12は、対象範囲に、範囲名Rn(n=0〜11)を割り当てている。また、コンパイラ12は、プロファイル情報の測定を開始するコード(profile_start)及びプロファイル情報の測定を終了するコード(profile_end)を基本ブロックに挿入している。   Next, the compiler 12 assigns a range name to the target range, inserts a code for starting the measurement of profile information at the start point of the target range, and inserts a code for ending the measurement of profile information at the end point of the target range ( Step C3). In the example of FIG. 6, the compiler 12 assigns the range name Rn (n = 0 to 11) to the target range. Further, the compiler 12 inserts into the basic block a code (profile_start) for starting measurement of profile information and a code (profile_end) for ending measurement of profile information.

コンパイラ12は、関数呼び出しグラフ及び制御フローグラフを利用し、各対象範囲内に通信処理を含むか否かを判定する。コンパイラ12は、通信処理の有無に応じて、ステップC3で挿入されたprofile_startコードに設定される、対象範囲に含まれるプログラムの実行時間を丸めるラウンド関数を変更する(ステップC4)。図7では、基本ブロック432,433が通信処理(SEND()及びRECEIVE())を含むので、関数Hも通信処理を含むことになる。図7では、通信処理を含む基本ブロック432,433及び関数Hは網掛けで表示されている。   The compiler 12 uses the function call graph and the control flow graph to determine whether or not communication processing is included in each target range. The compiler 12 changes the round function for rounding the execution time of the program included in the target range, which is set in the profile_start code inserted in step C3, according to the presence / absence of communication processing (step C4). In FIG. 7, since the basic blocks 432 and 433 include communication processing (SEND () and RECEIVE ()), the function H also includes communication processing. In FIG. 7, the basic blocks 432 and 433 including the communication process and the function H are displayed by shading.

コンパイラ12は、関数呼び出しグラフ及び制御フローグラフを利用し、各対象範囲のプロファイル情報処理位置を決定する(ステップC5)。プロファイル情報処理位置は、各対象範囲から得られるプロファイル情報をダンプする(出力する)位置である。ある対象範囲Rのためのプロファイル情報処理位置は、下記の条件(1)〜(4)を全て満たすプログラム上の位置Xである。
(1)対象範囲Rの実行後に到達するプログラム上の位置X
(2)対象範囲Rを実行した場合は、必ず位置Xを通る
(3)プログラムの実行中に、同じ位置識別情報(位置識別情報については後述する)について、位置Xを一度だけ通る
(4)位置Xを通った後に、同じ位置識別情報について、対象範囲Rを再び通ることはない
一般に、1つのプロファイル情報処理位置は、複数の対象範囲をカバーする。各対象範囲のプロファイル情報処理位置を関数呼び出しグラフ及び制御フローグラフに挿入した例を図8に示す。図8では、プロファイル情報処理位置はprofile_dumpコードで示されている。
The compiler 12 determines the profile information processing position of each target range using the function call graph and the control flow graph (step C5). The profile information processing position is a position where profile information obtained from each target range is dumped (output). The profile information processing position for a certain target range R is a position X on the program that satisfies all of the following conditions (1) to (4).
(1) Program position X reached after execution of the target range R
(2) When the target range R is executed, it always passes through the position X. (3) During the execution of the program, the same position identification information (position identification information will be described later) passes through the position X only once (4). After passing through the position X, the same position identification information does not pass through the target range R again. In general, one profile information processing position covers a plurality of target ranges. An example in which the profile information processing position of each target range is inserted into the function call graph and the control flow graph is shown in FIG. In FIG. 8, the profile information processing position is indicated by a profile_dump code.

コンパイラ12は、複数のプロファイル情報処理位置をグループ化する(ステップC6)。複数のプロファイル情報処理位置をグループ化した例を図9に示す。図9では、コンパイラ12は、関数Gあるいは関数Hを呼び出す基本ブロックからなるループの直下又は関数G,Hに含まれる最後の基本ブロックの直下にプロファイル情報処理位置が設定されるように、複数のプロファイル情報処理位置をグループ化している。   The compiler 12 groups a plurality of profile information processing positions (step C6). FIG. 9 shows an example in which a plurality of profile information processing positions are grouped. In FIG. 9, the compiler 12 sets a plurality of profile information processing positions so that the profile information processing position is set immediately below the loop composed of basic blocks that call the function G or function H or immediately below the last basic block included in the functions G and H. Profile information processing positions are grouped.

最後に、コンパイラ12は、profile_startコード、profile_endコード及びprofile_dampコードの挿入されたSPMDプログラム11をコンパイルし、実行可能ファイル13を作成する(ステップC7)。   Finally, the compiler 12 compiles the SPMD program 11 into which the profile_start code, profile_end code, and profile_damp code are inserted, and creates an executable file 13 (step C7).

ステップC1〜C6は、コンパイラ12が自動的にプロファイル情報取得用の仕組みをSPMDプログラム11に組み込む処理である。ステップC1〜C6は、コンパイラ12が実行する代わりにプログラマが直接行うこともできる。つまり、対象範囲の指定とプロファイル情報処理位置の指定は、下記の3つの方法のいずれかで実現できる。
(1)コンパイラが自動的に範囲指定関数及び処理位置をSPMDプログラム11のソースコードに挿入する(自動)。
(2)プログラマが範囲指定関数及び処理位置をSPMDプログラム11のソースコードに書く(手動)。
(3)プログラマが、必要な部分の範囲指定関数及び処理位置をSPMDプログラム11のソースコードに書き、残りの部分はコンパイラが自動的に処理する(半自動)。
Steps C <b> 1 to C <b> 6 are processes in which the compiler 12 automatically incorporates a mechanism for acquiring profile information into the SPMD program 11. Steps C1 to C6 can be performed directly by the programmer instead of being executed by the compiler 12. That is, the specification of the target range and the specification of the profile information processing position can be realized by one of the following three methods.
(1) The compiler automatically inserts the range specification function and processing position into the source code of the SPMD program 11 (automatic).
(2) The programmer writes the range specification function and processing position in the source code of the SPMD program 11 (manual).
(3) The programmer writes the range specification function and processing position of the necessary part in the source code of the SPMD program 11, and the compiler automatically processes the remaining part (semi-automatic).

次に、各計算ノード3−0〜3−Nが実行可能プログラム13を実行し、プロファイル情報を取得する処理を説明する。図10は、プロファイル情報の取得処理を示すフローチャートである。   Next, a process in which each of the calculation nodes 3-0 to 3-N executes the executable program 13 and acquires profile information will be described. FIG. 10 is a flowchart showing the profile information acquisition process.

まず、各計算ノード3−0〜3−Nが実行可能プログラム13の実行を開始する(ステップE1)。尚、実行可能プログラム13は、図3の処理に従って、SPMDプログラム11がコンパイルされて、得られたプログラムである。   First, each calculation node 3-0 to 3-N starts execution of the executable program 13 (step E1). The executable program 13 is a program obtained by compiling the SPMD program 11 according to the processing of FIG.

各計算ノード3−0〜3−Nは、プロファイル情報処理関数に到達したら、その関数の種類を判断する(ステップE2)。プロファイル情報処理関数は、profile_start、profile_end又はprofile_dumpである。   When each calculation node 3-0 to 3-N reaches the profile information processing function, it determines the type of the function (step E2). The profile information processing function is profile_start, profile_end, or profile_dump.

プロファイル情報処理関数がprofile_startである場合には、各計算ノード3−0〜3−Nは、対象範囲に含まれるプログラムの実行時間の測定を開始する(ステップE3)。   When the profile information processing function is profile_start, each of the calculation nodes 3-0 to 3-N starts measuring the execution time of the program included in the target range (step E3).

プロファイル情報処理関数がprofile_endである場合には、各計算ノード3−0〜3−Nは、対象範囲に含まれるプログラムの実行時間の測定を終了し、プロファイル情報をメモリ22−0〜22−Nに保存する(ステップE4)。   When the profile information processing function is profile_end, each of the calculation nodes 3-0 to 3-N ends the measurement of the execution time of the program included in the target range and stores the profile information in the memories 22-0 to 22-N. (Step E4).

プロファイル情報処理関数がprofile_dumpである場合には、各計算ノード3−0〜3−Nは、複数の対象範囲のプロファイル情報を予め決められたそれぞれの計算ノードへ送信すると共に、取得した複数のプロファイル情報を圧縮し且つ統合する(ステップE5)。ここでは、プロファイル情報を保存するノードとして、計算ノード3−0〜3−Nを順番に利用する。例えば、範囲名(R0)のプロファイル情報は、計算ノード3−0に送信され、範囲名(R1)のプロファイル情報は、計算ノード3−1に送信される。範囲名(Rn)のプロファイル情報は、計算ノード3−Nに送信される。対象範囲の個数nが計算ノードの総数Nよりも多い場合には、対象範囲の個数nを計算ノードの総数Nで割算した場合の余りに対応する対象範囲のプロファイル情報は、余りに対応する計算ノード番号の計算ノードに送信される。例えば、対象範囲が102個であり、計算ノードの総数が100である場合、101,102番目の対象範囲のプロファイル情報はそれぞれ計算ノード番号1,2の計算ノードに送信される。   When the profile information processing function is profile_dump, each of the calculation nodes 3-0 to 3-N transmits profile information of a plurality of target ranges to each of the predetermined calculation nodes, and the acquired plurality of profiles The information is compressed and integrated (step E5). Here, calculation nodes 3-0 to 3-N are used in order as nodes for storing profile information. For example, the profile information of the range name (R0) is transmitted to the calculation node 3-0, and the profile information of the range name (R1) is transmitted to the calculation node 3-1. The profile information of the range name (Rn) is transmitted to the calculation node 3-N. When the number n of target ranges is larger than the total number N of calculation nodes, the profile information of the target range corresponding to the remainder when the number n of target ranges is divided by the total number N of calculation nodes is the calculation node corresponding to the remainder. Sent to the number calculation node. For example, if the target range is 102 and the total number of calculation nodes is 100, the profile information of the 101st and 102nd target ranges is transmitted to the calculation nodes of calculation node numbers 1 and 2, respectively.

各計算ノード3−0〜3−Nは実行可能プログラム13が終了するまで、ステップE2〜E5の処理を繰り返す(ステップE6)。最後に、実行可能プログラム13の実行終了時に、フロントエンドノード2が、各計算ノード3−0〜3−Nで圧縮且つ統合されたプロファイル情報を1つに集約する(ステップE7)。   Each of the computation nodes 3-0 to 3-N repeats the processes of steps E2 to E5 until the executable program 13 ends (step E6). Finally, at the end of execution of the executable program 13, the front-end node 2 aggregates the profile information compressed and integrated by the calculation nodes 3-0 to 3-N into one (step E7).

次に、プロファイル情報の取得処理を図9及び図10を参照しながら詳細に説明する。ここでは、4つの計算ノード3−0〜3−3を利用するものとする。   Next, profile information acquisition processing will be described in detail with reference to FIGS. Here, four calculation nodes 3-0 to 3-3 are used.

実行可能プログラム13の実行開始後に、各計算ノード3−0〜3−3は、最初に到達するプロファイル情報処理の関数が、図9より、profile_start(R0,...) であると判断する(ステップE1,2)。従って、各計算ノード3−0〜3−3は、範囲名R0の対象範囲に含まれるプログラムの実行時間の測定を開始する(ステップE3)。次に、各計算ノード3−0〜3−3は、プロファイル情報処理関数profile_end(R0,...) に到達するので、範囲名R0の対象範囲に含まれるプログラムの実行時間の測定を終了する(ステップE4)。ステップE3,4により得られるプロファイル情報は、下記の表1である。   After the execution of the executable program 13 is started, each of the computation nodes 3-0 to 3-3 determines that the profile information processing function that arrives first is profile_start (R0,...) From FIG. Step E1,2). Therefore, each calculation node 3-0 to 3-3 starts measuring the execution time of the program included in the target range of the range name R0 (step E3). Next, since each of the calculation nodes 3-0 to 3-3 reaches the profile information processing function profile_end (R0,...), The measurement of the execution time of the program included in the target range of the range name R0 is terminated. (Step E4). The profile information obtained in steps E3 and E4 is shown in Table 1 below.

Figure 2012032986
表1の計算ノード番号は、計算ノードの番号Kを表す。範囲名は、関数profile_startと関数profile_endで指定される対象範囲の名前を表す。位置識別情報は、対象範囲に到達した履歴を表す履歴情報である。ここでは、対象名R0の対象範囲が関数main()内に存在することを示す(main)が位置識別情報である。実行時間は、各計算ノード3−0〜3−3で対象範囲のプログラムを実行するのにかかった時間を表す。各計算ノード3−0〜3−3が、表1の実行時間の1の位を四捨五入して、実行時間を10の倍数に丸めた場合の、各計算ノード3−0〜3−3が有するプロファイル情報の状態を図11に示す。
Figure 2012032986
The calculation node number in Table 1 represents the calculation node number K. The range name represents the name of the target range specified by the function profile_start and the function profile_end. The position identification information is history information representing a history of reaching the target range. Here, (main) indicating that the target range of the target name R0 exists in the function main () is the position identification information. The execution time represents the time taken to execute the program in the target range at each of the calculation nodes 3-0 to 3-3. Each calculation node 3-0 to 3-3 has the execution time rounded to a multiple of 10 by rounding the execution time in Table 1 to the first decimal place. The state of profile information is shown in FIG.

各計算ノード3−0〜3−3がプロファイル情報処理の関数profile_dump(R0,R1)に到達すると、計算ノード3−0は範囲名R0の対象範囲のプロファイル情報を集約し、集約したプロファイル情報を圧縮し且つ統合する(ステップE5)。複数のプロファイル情報が圧縮且つ統合された後の各計算ノード3−0〜3−3の状態を図12に示す。図12では、計算ノード3−0は、同じ実行時間を有するプロファイル情報を圧縮した形式で保持している。このとき、範囲名R0の対象範囲のプロファイル情報はすべて計算ノード3−0に集約されているため、他の計算ノード3−1〜3−3には、範囲名R0の対象範囲のプロファイル情報は存在しない。   When each of the calculation nodes 3-0 to 3-3 reaches the profile information processing function profile_dump (R0, R1), the calculation node 3-0 aggregates the profile information of the target range of the range name R0, and displays the aggregated profile information. Compress and integrate (step E5). FIG. 12 shows a state of each of the calculation nodes 3-0 to 3-3 after a plurality of profile information is compressed and integrated. In FIG. 12, the computation node 3-0 holds profile information having the same execution time in a compressed format. At this time, since the profile information of the target range of the range name R0 is all collected in the calculation node 3-0, the profile information of the target range of the range name R0 is stored in the other calculation nodes 3-1 to 3-3. not exist.

上述した、ステップE1〜E5の処理は、対象名R1〜R3の対象範囲のプログラムに対しても実行される(ステップE6)。従って、実行可能プログラム13の実行終了時には、各計算ノード3−0〜3−3に集約されたプロファイル情報が分散して存在している。例えば、計算ノード3−0及び計算ノード3−3に集約されたプロファイル情報が存在する状態を図13に示す。図13では、計算ノード3−3は、範囲名R3の対象範囲のプロファイル情報を圧縮した形式で保持している。   The above-described processing of steps E1 to E5 is also executed for the program in the target range of the target names R1 to R3 (step E6). Therefore, at the end of execution of the executable program 13, the profile information aggregated in each of the calculation nodes 3-0 to 3-3 is distributed. For example, FIG. 13 shows a state where profile information aggregated in the computation nodes 3-0 and 3-3 exists. In FIG. 13, the computation node 3-3 holds the profile information of the target range of the range name R3 in a compressed format.

実行可能プログラム13の実行終了時には、フロントエンドノード2が計算ノード3−0及び計算ノード3−3で圧縮且つ統合された複数のプロファイル情報を1つのプロファイル情報に集約する(ステップE7)。計算ノード3−0及び計算ノード3−3で圧縮且つ統合されたプロファイル情報を1つのプロファイル情報に集約した状態を図14に示す。   At the end of execution of the executable program 13, the front end node 2 aggregates a plurality of profile information compressed and integrated by the calculation nodes 3-0 and 3-3 into one profile information (step E7). FIG. 14 shows a state in which the profile information compressed and integrated by the calculation node 3-0 and the calculation node 3-3 is integrated into one profile information.

上述したように、各計算ノード3−0〜3−3は、ステップE5で部分的にプロファイル情報の圧縮と統合を行うので、最終的にステップE7で作成されるプロファイル情報のデータ量を大幅に削減できる。また、ステップE1〜E5の処理に複数の計算ノードが利用されるので、プロファイル情報の集約、圧縮及び統合の処理を並列に実行することができる。   As described above, since each of the calculation nodes 3-0 to 3-3 partially compresses and integrates the profile information at step E5, the data amount of the profile information finally created at step E7 is greatly increased. Can be reduced. In addition, since a plurality of calculation nodes are used for the processing of steps E1 to E5, the processing of aggregation, compression, and integration of profile information can be executed in parallel.

次に、プロファイル情報処理関数について説明する。   Next, the profile information processing function will be described.

コンパイラ12は、ステップC2でSPMDプログラム11内の、実行時間のプロファイル情報を取得する範囲(対象範囲)を決定する。このとき、コンパイラ12は、図15に示すプロファイル情報処理関数(profile_start及びprofile_end)を含むコードを使って、対象範囲を指定する。   The compiler 12 determines a range (target range) in which the execution time profile information is acquired in the SPMD program 11 in step C2. At this time, the compiler 12 designates the target range using a code including profile information processing functions (profile_start and profile_end) shown in FIG.

ここで、対象範囲の指定に使用されるプロファイル情報処理関数の各パラメータの意味は次の通りである。図15のREGION_NAMEは、対象範囲を区別するための名前を表す。図15のSELECTORは、プロファイル情報を取捨選択するための関数を指定する。関数の引数は位置識別情報である。各計算ノード3−0〜3−3にプロファイル情報を取捨選択させない場合は、SELECTORにはNULLが指定される。   Here, the meaning of each parameter of the profile information processing function used for specifying the target range is as follows. REGION_NAME in FIG. 15 represents a name for distinguishing the target range. SELECTOR in FIG. 15 specifies a function for selecting profile information. The argument of the function is position identification information. If the calculation nodes 3-0 to 3-3 do not select the profile information, NULL is specified for SELECTOR.

図15のCOMPRESSORは、プロファイル情報を圧縮且つ統合するための関数を指定する。関数profile_startのCOMPRESSORで指定される関数を含むコードは圧縮統合コードとして機能する。関数の引数は実行時間である。例えば、関数ROUND10がCOMPRESSORとして指定された場合には、実行時間をtとし、測定された実行時間tの1の位が四捨五入され、実行時間tは10の倍数に丸められる。関数ROUND10000がCOMPRESSORとして指定された場合には、測定された実行時間tの千の位が四捨五入され、実行時間tは10000の倍数に丸められる。   COMPRESSOR in FIG. 15 specifies a function for compressing and integrating profile information. The code including the function specified by COMPRESSOR of the function profile_start functions as a compression integrated code. The function argument is the execution time. For example, when the function ROUND10 is designated as COMPRESSOR, the execution time is t, the 1's place of the measured execution time t is rounded off, and the execution time t is rounded to a multiple of 10. When the function ROUND10000 is designated as COMPRESSOR, the thousands of the measured execution time t is rounded off, and the execution time t is rounded to a multiple of 10,000.

図15のANALYZERは、圧縮したプロファイル情報から分析対象のプロファイル情報を抽出するための関数を指定する。関数の引数は圧縮したプロファイル情報の表である。圧縮したプロファイル情報から分析対象のプロファイル情報を抽出しない場合には、ANALYZERには、NULLが指定される。   ANALYZER in FIG. 15 specifies a function for extracting profile information to be analyzed from the compressed profile information. The function argument is a table of compressed profile information. If analysis target profile information is not extracted from the compressed profile information, NULL is specified for ANALYZER.

これらのパラメータは、コンパイラ12がデフォルトで利用できる。また、コンパイラ12にオプションの指定をすることで、これらのパラメータはユーザ指定の処理に差し替えられることができる。   These parameters are available by default by the compiler 12. Also, by specifying options in the compiler 12, these parameters can be replaced with user-specified processing.

また、コンパイラ12は、プロファイル情報処理位置を「profile_dump (REGION_NAME)」により指定する(ステップC5)。関数profile_dumpは、実行時に次の処理(1),(2)を行うライブラリ関数である。   Further, the compiler 12 designates the profile information processing position by “profile_dump (REGION_NAME)” (step C5). The function profile_dump is a library function that performs the following processes (1) and (2) at the time of execution.

処理(1):各計算ノード3−0〜3−Nに分散されている範囲名REGION_NAMEの対象範囲のプロファイル情報を集める。このために、各計算ノード3−0〜3−Nは互いに通信する。例えば、図11において、計算ノード3−0は、各計算ノード3−1〜3−3に分散されている範囲名R0の対象範囲のプロファイル情報を集める。このように、関数profile_dumpを含むコードは、SPMDプログラム11の指定された対象範囲のプロファイル情報を集約する集約コードとして機能する。   Process (1): Collect profile information of the target range of the range name REGION_NAME distributed to the respective computation nodes 3-0 to 3-N. For this purpose, the computation nodes 3-0 to 3-N communicate with each other. For example, in FIG. 11, the computation node 3-0 collects profile information of the target range of the range name R0 distributed to the computation nodes 3-1 to 3-3. As described above, the code including the function profile_dump functions as an aggregation code for aggregating profile information in the target range specified by the SPMD program 11.

処理(2):各計算ノード3−Nが集めたプロファイル情報をprofile_startのパラメータで指定された関数を使って圧縮し、統合する。例えば、図11において、計算ノード3−0は、各計算ノード3−1〜3−3に分散されている範囲名R0の対象範囲のプロファイル情報を集めて、集められたプロファイル情報を圧縮し且つ統合する。圧縮且つ統合後のプロファイル情報は図12のようになる。   Process (2): The profile information collected by each computation node 3-N is compressed and integrated using the function specified by the parameter of profile_start. For example, in FIG. 11, the computation node 3-0 collects profile information of the target range of the range name R0 distributed to the computation nodes 3-1 to 3-3, compresses the collected profile information, and Integrate. The profile information after compression and integration is as shown in FIG.

また、コンパイラ12は、範囲名REGION_NAMEとして、範囲名のリスト(即ち、複数の範囲名)を指定してもよい。この場合、複数の対象範囲について、上記の処理(1),(2)が実行される。複数の範囲名が指定された場合、計算ノード3−0〜3−3がそれぞれ範囲名R0〜R3の対象範囲のプロファイル情報を圧縮且つ統合するので、複数のプロファイル情報の圧縮及び統合を並列処理することができる。従って、従来のように、フロントエンドノードに全プロファイル情報を集めて処理する方法と比べて、利用する計算ノードリソース(即ち、各計算ノードに含まれるメモリやディスクの使用量)を低減することができる。また、複数の計算ノードの並列処理により、処理速度が向上する。   Further, the compiler 12 may specify a list of range names (that is, a plurality of range names) as the range name REGION_NAME. In this case, the above processes (1) and (2) are executed for a plurality of target ranges. When a plurality of range names are specified, since the computation nodes 3-0 to 3-3 compress and integrate the profile information of the target ranges of the range names R0 to R3, respectively, compression and integration of the plurality of profile information are performed in parallel. can do. Therefore, as compared with the conventional method of collecting and processing all profile information in the front-end node, it is possible to reduce the computing node resources (that is, the amount of memory and disk used in each computing node) to be used. it can. In addition, the processing speed is improved by parallel processing of a plurality of calculation nodes.

次に、図15のパラメータCOMPRESSORについて説明する。   Next, the parameter COMPRESSOR in FIG. 15 will be described.

例えば、4個の計算ノード3−0〜3−3が、図16に示すような、実行可能ファイル13を実行した場合、計算ノード3−0は上述した表1のプロファイル情報を取得する。プロファイル情報が解析される場合、実行時間の詳細な差は重要ではないので、計算ノード3−0は、表1に示すような実際の実行時間を保存するのではなく、パラメータCOMPRESSOR(ここでは関数ROUND10)によって丸められた実行時間を保存する。計算ノード3−0がパラメータCOMPRESSORに従って実行時間を丸めた結果を表2に示す。   For example, when the four calculation nodes 3-0 to 3-3 execute the executable file 13 as shown in FIG. 16, the calculation node 3-0 acquires the profile information of Table 1 described above. When profile information is analyzed, the detailed difference in execution time is not important, so the computation node 3-0 does not store the actual execution time as shown in Table 1, but instead uses the parameter COMPRESSOR (here function Save the execution time rounded by ROUND10). Table 2 shows the result of the calculation node 3-0 rounding the execution time according to the parameter COMPRESSOR.

Figure 2012032986
表2に示すように、同じ実行時間のプロファイル情報を有する計算ノードが多数存在する可能性が高まる。
Figure 2012032986
As shown in Table 2, there is a high possibility that there are a large number of computation nodes having the same execution time profile information.

コンパイラ12は、ステップC4で、対象範囲内に通信処理を含むか否かを判定し、判定結果に応じて、ステップC3で挿入したprofile_startのパラメータCOMPRESSORに対して、異なるパラメータCOMPRESSOR(ラウンド関数)を設定することができる。例えば、図9で通信処理を含む対象範囲(基本ブロック432,433及び関数Hの呼び出しを含む基本ブロック43)では、コンパイラ12は、関数ROUND10に代えて、関数ROUND10000で実行時間を丸めるようにパラメータCOMPRESSORを変更することができる。この場合、コンパイラ12は、ステップC4において、対象範囲内に通信処理を含む場合には、profile_startのパラメータCOMPRESSORに関数ROUND10000を設定し、対象範囲内に通信処理を含まない場合には、profile_startのパラメータCOMPRESSORに関数ROUND10を設定する。これにより、通信処理を含む対象範囲のプロファイル情報内の実行時間は1万の倍数になり、通信処理を含まない対象範囲のプロファイル情報内の実行時間は10の倍数になる。   In step C4, the compiler 12 determines whether or not communication processing is included in the target range, and sets a different parameter COMPRESSOR (round function) to the parameter COMPRESSOR of profile_start inserted in step C3 according to the determination result. Can be set. For example, in the target range including the communication processing in FIG. 9 (basic blocks 432 and 433 and the basic block 43 including the call to the function H), the compiler 12 sets the parameter to round the execution time with the function ROUND10000 instead of the function ROUND10. You can change COMPRESSOR. In this case, in step C4, the compiler 12 sets the function ROUND10000 in the parameter COMPRESSOR of the profile_start when the communication process is included in the target range, and the profile_start parameter when the communication process is not included in the target range. Set the function ROUND10 to COMPRESSOR. Thereby, the execution time in the profile information of the target range including the communication process is a multiple of 10,000, and the execution time in the profile information of the target range not including the communication process is a multiple of 10.

この結果、プロファイル情報の分析者又は分析装置は、集約されたプロファイル情報を参照したときに、通信処理を含む対象範囲と通信処理を含まない対象範囲とを一見して区別することができ、効率的にSPMDプログラム11の特徴を把握することができる。尚、実行時間tを丸める関数は、ROUND10及びROUND10000に限定されるものではなく、ROUND100、ROUND1000、又はROUND100000でもよい。   As a result, when referring to the aggregated profile information, the profile information analyst or the analysis apparatus can distinguish the target range including the communication process from the target range not including the communication process at a glance. In particular, the features of the SPMD program 11 can be grasped. The function for rounding the execution time t is not limited to ROUND10 and ROUND10000, but may be ROUND100, ROUND1000, or ROUND100000.

次に、図15のパラメータSELECTORについて説明する。   Next, the parameter SELECTOR in FIG. 15 will be described.

例えば、図9では、関数Gに含まれる範囲名R4の対象範囲(基本ブロック421)は、main関数のループにより複数回実行される可能性がある。このため、ループの回転数(即ち対象範囲の実行回数)を識別するために、位置識別情報を利用する。範囲名R4の対象範囲は、main関数のループ(以下L0とする)からループインデックスiで指定された回転数だけ実行される可能性があるので、ループの回転数を識別するために、位置識別情報を(main, L0, i)で表す。例えば、main関数のループが計算ノード3−0〜3−3で3回回転する場合のプロファイル情報を表3に示す。   For example, in FIG. 9, the target range (basic block 421) of the range name R4 included in the function G may be executed a plurality of times by the loop of the main function. For this reason, position identification information is used to identify the number of rotations of the loop (that is, the number of executions of the target range). Since the target range of the range name R4 may be executed from the loop of the main function (hereinafter referred to as L0) by the number of rotations specified by the loop index i, the position identification is used to identify the number of rotations of the loop. Information is represented by (main, L0, i). For example, Table 3 shows profile information when the loop of the main function rotates three times at the calculation nodes 3-0 to 3-3.

Figure 2012032986
ループの回転数が多い場合は、プロファイル情報のデータ量が膨大になるため、すべてのプロファイル情報を保存するのは現実的ではない。このような場合に、コンパイラ12は、ステップC3で挿入したprofile_startのパラメータSELECTORに取捨選択関数として関数PARTを設定する。関数PARTは、位置識別情報をプロファイル情報の取捨選択の判定に利用する。また、例えば、最初の2回のループのプロファイル情報を取得する場合は、コンパイラ12は、図17に示すような、関数PARTを含むコードをSPMDプログラム11に設定する。
Figure 2012032986
When the number of rotations of the loop is large, the amount of profile information data is enormous, so it is not realistic to save all the profile information. In such a case, the compiler 12 sets the function PART as a selection function in the parameter SELECTOR of profile_start inserted in step C3. The function PART uses position identification information for determination of selection of profile information. For example, when acquiring the profile information of the first two loops, the compiler 12 sets a code including the function PART as shown in FIG.

図17において、位置情報Pはリスト形式をもち、P[x]は、x番目の要素を取り出すものとする。また、図17では、パラメータSELECTORに設定した関数PARTが、1を返す場合は、対象範囲の実行時間が測定され、0を返す場合は、対象範囲の実行時間が測定されない。コンパイラ12が、図17に示す関数PARTを範囲名R4の対象範囲のprofile_startに設定すると、計算ノード3−0〜3−3は表4に示すプロファイル情報を取得する(ステップE4)。   In FIG. 17, the position information P has a list format, and P [x] takes out the x-th element. In FIG. 17, when the function PART set in the parameter SELECTOR returns 1, the execution time of the target range is measured, and when it returns 0, the execution time of the target range is not measured. When the compiler 12 sets the function PART shown in FIG. 17 to profile_start of the target range of the range name R4, the calculation nodes 3-0 to 3-3 acquire the profile information shown in Table 4 (step E4).

Figure 2012032986
最終的に、フロントエンド2は表5に示すプロファイル情報を取得する(ステップE7)。
Figure 2012032986
Finally, the front end 2 acquires the profile information shown in Table 5 (step E7).

Figure 2012032986
取捨選択関数としての関数PARTは、各計算ノード3−0〜3−NがステップE3で実行可能プログラム13の実行時間の測定を開始するときに、各計算ノード3−0〜3−Nが指定されたループの回転数に対応する対象範囲の実行時間の取得を開始するかどうかを判断するために利用される。
Figure 2012032986
The function PART as the selection function is designated by each calculation node 3-0 to 3-N when each calculation node 3-0 to 3-N starts measuring the execution time of the executable program 13 in step E3. This is used to determine whether or not to start the execution time of the target range corresponding to the number of rotations of the loop that has been made.

次に、図15のパラメータANALYZERについて説明する。   Next, the parameter ANALYZER in FIG. 15 will be described.

フロントエンド2が、表5に示すプロファイル情報ではなく、ループの回転数が0又は1であり、且つ範囲名R4の対象範囲の実行時間が最も長いプロファイル情報を取得する場合を考える。この場合、コンパイラ12は、ステップC3で挿入したprofile_startのパラメータANALYZERに分析関数として関数CHOOSE_MAXを設定し、図18に示すような、関数CHOOSE_MAXを含むコードをSPMDプログラム11に設定する。関数CHOOSE_MAXでは、表4に示すデータから実行時間が10であるプロファイル情報が削除されるので、最終的に表6に示すプロファイル情報が作成される。   Consider a case in which the front end 2 acquires not the profile information shown in Table 5 but profile information in which the number of rotations of the loop is 0 or 1 and the execution time of the target range of the range name R4 is the longest. In this case, the compiler 12 sets the function CHOOSE_MAX as an analysis function in the parameter ANALYZER of profile_start inserted in step C3, and sets the code including the function CHOOSE_MAX as shown in FIG. In the function CHOOSE_MAX, the profile information whose execution time is 10 is deleted from the data shown in Table 4, so that the profile information shown in Table 6 is finally created.

Figure 2012032986
分析関数としての関数CHOOSE_MAXは、各計算ノード3−0〜3−NがステップE5で対象範囲のプロファイル情報を統合する場合に利用することができる。
Figure 2012032986
The function CHOOSE_MAX as the analysis function can be used when each calculation node 3-0 to 3-N integrates the profile information of the target range in step E5.

取捨選択関数はステップE3で利用され、分析関数はステップE5で利用される。これらの関数により、各計算ノード3−0〜3−Nが取得するプロファイル情報が削減される。各計算ノード3−0〜3−Nが取捨選択関数又は分析関数を利用する場合、フロントエンドノード2が全てのプロファイル情報を集約した後に特定のプロファイル情報のみを抽出する方法と比較して、プロファイル情報の取得に必要となる、一時的なメモリやディスクスペースの使用量を低減することができる。   The sorting function is used in step E3, and the analysis function is used in step E5. With these functions, the profile information acquired by each of the calculation nodes 3-0 to 3-N is reduced. When each calculation node 3-0 to 3-N uses a selection function or an analysis function, the profile is compared with the method in which the front-end node 2 extracts only specific profile information after aggregating all the profile information. It is possible to reduce the amount of temporary memory and disk space required for acquiring information.

以上の実施の形態に関し、更に以下の付記を開示する。   Regarding the above embodiment, the following additional notes are disclosed.

(付記1)コンピュータに、並列計算装置の各々が取得する、並列計算用プログラムの指定された範囲に対応するプロファイル情報を当該並列計算用プログラムの指定された範囲毎に割り当てられた並列計算装置に集約する集約コード及び前記集約されたプロファイル情報を圧縮且つ統合する圧縮統合コードを並列計算用プログラムに挿入する挿入工程と、前記集約コード及び前記圧縮コードを挿入された並列計算用プログラムをコンパイルするコンパイル工程とを実行させることを特徴とするコンパイル方法。かかる構成によれば、各並列計算装置が実行可能ファイルとして並列計算用プログラムを実行するときに、各並列計算装置が、取得した複数のプロファイル情報を圧縮し且つ統合するので、従来よりもプロファイル情報の収集に必要な記憶媒体の使用量を低減することができる。   (Supplementary Note 1) Profile information corresponding to a specified range of the parallel calculation program acquired by each of the parallel calculation devices is assigned to the parallel calculation device assigned to each specified range of the parallel calculation program. An insertion step of inserting into the parallel calculation program an aggregate code to be aggregated and a compressed integrated code for compressing and integrating the aggregated profile information, and compiling to compile the parallel computation program into which the aggregate code and the compressed code are inserted A compiling method characterized in that the process is executed. According to such a configuration, when each parallel computing device executes the parallel computing program as an executable file, each parallel computing device compresses and integrates the acquired plurality of profile information. It is possible to reduce the amount of storage medium used necessary for collecting data.

(付記2)前記挿入工程は、さらに、各プロファイル情報を取捨選択する取捨選択コード又は前記圧縮且つ統合されたプロファイル情報から分析対象のプロファイル情報を抽出する分析コードの少なくとも一方を並列計算用プログラムに挿入することを特徴とする付記1のコンパイル方法。かかる構成によれば、各並列計算装置で取得されるプロファイル情報が削減されるので、従来よりもプロファイル情報の収集に必要な記憶媒体の使用量を低減することができる。   (Supplementary Note 2) In the insertion step, at least one of a selection code for selecting each profile information or an analysis code for extracting profile information to be analyzed from the compressed and integrated profile information is used as a parallel calculation program. The compiling method according to Supplementary Note 1, wherein the compiling method is inserted. According to such a configuration, the profile information acquired by each parallel computing device is reduced, so that it is possible to reduce the usage amount of the storage medium necessary for collecting profile information as compared with the related art.

(付記3)前記圧縮統合コードは、前記並列計算用プログラムの指定された範囲が通信処理を含むか否かに応じて、前記プロファイル情報に含まれる実行時間の情報を異なる桁数で丸めることを特徴とする付記1又は2に記載のコンパイル方法。かかる構成によれば、プロファイル情報の分析者又は分析装置は、通信処理を含む範囲と通信処理を含まない範囲とを明確に区別できるので、効率的に並列計算用プログラムの特徴を把握することができる。   (Additional remark 3) The said compression integration code rounds the information of the execution time contained in the said profile information by a different number of digits according to whether the designated range of the said parallel calculation program includes communication processing. 3. The compiling method according to appendix 1 or 2, which is a feature. According to such a configuration, the profile information analyst or the analysis device can clearly distinguish the range including the communication processing from the range not including the communication processing, and thus can efficiently grasp the characteristics of the parallel calculation program. it can.

(付記4)前記並列計算用プログラム全体の関数呼び出しグラフ及び各関数の制御フローグラフを作成し、前記関数呼び出しグラフ及び前記制御フローグラフに含まれる関数単位又は基本ブロック単位の少なくとも一方で、前記プロファイル情報を取得する範囲を指定する指定工程をさらに含むことを特徴とする付記1乃至3のいずれかに記載のコンパイル方法。かかる構成によれば、各並列計算装置が並列計算用プログラムを実行するときに、自動的にプロファイル情報を取得する範囲を指定できる。   (Supplementary Note 4) A function call graph of the entire parallel computing program and a control flow graph of each function are created, and at least one of a function unit or a basic block unit included in the function call graph and the control flow graph, the profile 4. The compiling method according to any one of appendices 1 to 3, further comprising a specifying step of specifying a range for acquiring information. According to such a configuration, it is possible to designate a range in which profile information is automatically acquired when each parallel computing device executes a parallel computing program.

(付記5)コンピュータに、並列計算装置の各々が取得する、並列計算用プログラムの指定された範囲に対応するプロファイル情報を当該並列計算用プログラムの指定された範囲毎に割り当てられた並列計算装置に集約する集約コード及び前記集約されたプロファイル情報を圧縮且つ統合する圧縮統合コードを並列計算用プログラムに挿入する挿入工程と、前記集約コード及び前記圧縮コードを挿入された並列計算用プログラムをコンパイルするコンパイル工程とを実行させることを特徴とするプログラム。上記付記1と同様の効果を奏する。   (Supplementary Note 5) Profile information corresponding to the designated range of the parallel computing program acquired by each of the parallel computing devices is assigned to the parallel computing device assigned to each designated range of the parallel computing program. An insertion step of inserting into the parallel calculation program an aggregate code to be aggregated and a compressed integrated code for compressing and integrating the aggregated profile information, and compiling to compile the parallel computation program into which the aggregate code and the compressed code are inserted A program characterized by causing a process to be executed. The same effect as the above supplementary note 1 is achieved.

1 並列計算機、2 フロントエンドノード、3−1〜3−N 計算ノード、11 SPMDプログラム、12 コンパイラ、13 実行可能プログラム、21 CPU、22 メモリ、23 ハードディスクドライブ(HDD)、24 通信インターフェース、25 入力部、26 出力部   1 parallel computer, 2 front-end node, 3-1 to 3-N computation node, 11 SPMD program, 12 compiler, 13 executable program, 21 CPU, 22 memory, 23 hard disk drive (HDD), 24 communication interface, 25 input Part, 26 output part

Claims (4)

コンピュータに、
並列計算装置の各々が取得する、並列計算用プログラムの指定された範囲に対応するプロファイル情報を当該並列計算用プログラムの指定された範囲毎に割り当てられた並列計算装置に集約する集約コード及び前記集約されたプロファイル情報を圧縮且つ統合する圧縮統合コードを並列計算用プログラムに挿入する挿入工程と、
前記集約コード及び前記圧縮コードを挿入された並列計算用プログラムをコンパイルするコンパイル工程と
を実行させることを特徴とするコンパイル方法。
On the computer,
An aggregation code for collecting profile information corresponding to a designated range of a parallel computing program acquired by each of the parallel computing devices to a parallel computing device assigned for each designated range of the parallel computing program, and the aggregation An insertion step of inserting a compression integration code for compressing and integrating the profile information obtained into the parallel calculation program;
And a compiling step of compiling the parallel calculation program into which the aggregated code and the compressed code are inserted.
前記挿入工程は、さらに、各プロファイル情報を取捨選択する取捨選択コード又は前記圧縮且つ統合されたプロファイル情報から分析対象のプロファイル情報を抽出する分析コードの少なくとも一方を並列計算用プログラムに挿入することを特徴とする請求項1のコンパイル方法。   The inserting step further includes inserting at least one of a selection code for selecting each profile information or an analysis code for extracting analysis target profile information from the compressed and integrated profile information into the parallel calculation program. The compiling method according to claim 1, wherein: 前記圧縮統合コードは、前記並列計算用プログラムの指定された範囲が通信処理を含むか否かに応じて、前記プロファイル情報に含まれる実行時間の情報を異なる桁数で丸めることを特徴とする請求項1又は2に記載のコンパイル方法。   The compression integration code rounds the execution time information included in the profile information with a different number of digits according to whether or not a specified range of the parallel calculation program includes communication processing. Item 3. The compiling method according to item 1 or 2. コンピュータに、
並列計算装置の各々が取得する、並列計算用プログラムの指定された範囲に対応するプロファイル情報を当該並列計算用プログラムの指定された範囲毎に割り当てられた並列計算装置に集約する集約コード及び前記集約されたプロファイル情報を圧縮且つ統合する圧縮統合コードを並列計算用プログラムに挿入する挿入工程と、
前記集約コード及び前記圧縮コードを挿入された並列計算用プログラムをコンパイルするコンパイル工程と
を実行させることを特徴とするプログラム。
On the computer,
An aggregation code for collecting profile information corresponding to a designated range of a parallel computing program acquired by each of the parallel computing devices to a parallel computing device assigned for each designated range of the parallel computing program, and the aggregation An insertion step of inserting a compression integration code for compressing and integrating the profile information obtained into the parallel calculation program;
And a compiling step of compiling the parallel calculation program into which the aggregated code and the compressed code are inserted.
JP2010171661A 2010-07-30 2010-07-30 Compile method and program Pending JP2012032986A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010171661A JP2012032986A (en) 2010-07-30 2010-07-30 Compile method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010171661A JP2012032986A (en) 2010-07-30 2010-07-30 Compile method and program

Publications (1)

Publication Number Publication Date
JP2012032986A true JP2012032986A (en) 2012-02-16

Family

ID=45846325

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010171661A Pending JP2012032986A (en) 2010-07-30 2010-07-30 Compile method and program

Country Status (1)

Country Link
JP (1) JP2012032986A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020524318A (en) * 2017-06-19 2020-08-13 グーグル エルエルシー Alternate loop limit

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0619749A (en) * 1992-07-01 1994-01-28 Fujitsu Ltd Log data compression device
JPH0844680A (en) * 1994-08-03 1996-02-16 Hitachi Ltd Collecting method for monitor data in parallel computer system
JPH1063550A (en) * 1996-08-23 1998-03-06 Fujitsu Ltd Executing performance analytic display method and medium stored with program executing the method
JP2005099976A (en) * 2003-09-24 2005-04-14 Hitachi Ltd Configuration/performance information acquiring method
JP2007199956A (en) * 2006-01-25 2007-08-09 Fujitsu Ltd Logging information management method and logging information management system
JP2007207173A (en) * 2006-02-06 2007-08-16 Fujitsu Ltd Performance analysis program, performance analysis method, and performance analysis device
JP2009503686A (en) * 2005-07-26 2009-01-29 インターナショナル・ビジネス・マシーンズ・コーポレーション System and method for adaptively collecting performance and event information
JP2009070047A (en) * 2007-09-12 2009-04-02 Ricoh Co Ltd Image forming apparatus with log collection mechanism

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0619749A (en) * 1992-07-01 1994-01-28 Fujitsu Ltd Log data compression device
JPH0844680A (en) * 1994-08-03 1996-02-16 Hitachi Ltd Collecting method for monitor data in parallel computer system
JPH1063550A (en) * 1996-08-23 1998-03-06 Fujitsu Ltd Executing performance analytic display method and medium stored with program executing the method
JP2005099976A (en) * 2003-09-24 2005-04-14 Hitachi Ltd Configuration/performance information acquiring method
JP2009503686A (en) * 2005-07-26 2009-01-29 インターナショナル・ビジネス・マシーンズ・コーポレーション System and method for adaptively collecting performance and event information
JP2007199956A (en) * 2006-01-25 2007-08-09 Fujitsu Ltd Logging information management method and logging information management system
JP2007207173A (en) * 2006-02-06 2007-08-16 Fujitsu Ltd Performance analysis program, performance analysis method, and performance analysis device
JP2009070047A (en) * 2007-09-12 2009-04-02 Ricoh Co Ltd Image forming apparatus with log collection mechanism

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CSNG200401853012; 白勢健一郎、小川宏高、中田秀基、松岡 聡: 'グリッドコンピューティングにおけるモニタリングシステムの自律的構成' 情報処理学会研究報告 Vol.2003,No.83, 20030806, p.90, 社団法人情報処理学会 *
JPN6014001029; 白勢健一郎、小川宏高、中田秀基、松岡 聡: 'グリッドコンピューティングにおけるモニタリングシステムの自律的構成' 情報処理学会研究報告 Vol.2003,No.83, 20030806, p.90, 社団法人情報処理学会 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020524318A (en) * 2017-06-19 2020-08-13 グーグル エルエルシー Alternate loop limit
JP7035080B2 (en) 2017-06-19 2022-03-14 グーグル エルエルシー Alternate loop limit

Similar Documents

Publication Publication Date Title
US11620286B2 (en) Continuous cloud-scale query optimization and processing
Ousterhout et al. Making sense of performance in data analytics frameworks
EP2956858B1 (en) Periodicity optimization in an automated tracing system
Geimer et al. The Scalasca performance toolset architecture
US9658936B2 (en) Optimization analysis using similar frequencies
Chen et al. The case for evaluating mapreduce performance using workload suites
US7660884B2 (en) Apparatus, system, and method for generating a resource utilization description for a parallel data processing system
US8631392B1 (en) Analysis of a sequence of data in object-oriented environments
EP2390790A1 (en) Profiling of software applications
US20140189652A1 (en) Filtering and Transforming a Graph Representing an Application
JP2016100006A (en) Method and device for generating benchmark application for performance test
US8745622B2 (en) Standalone software performance optimizer system for hybrid systems
CN104077328B (en) The operation diagnostic method and equipment of MapReduce distributed system
CN110399182B (en) CUDA thread placement optimization method
CN108363660B (en) Test program generation method and device
US9164746B2 (en) Automatic topology extraction and plotting with correlation to real time analytic data
Guo et al. Correlation-based performance analysis for full-system MapReduce optimization
US9348566B1 (en) Continuous profiling for automatic feedback directed optimization
Bhimani et al. Auto-tuning parameters for emerging multi-stream flash-based storage drives through new I/O pattern generations
CN104461832A (en) Method and device for monitoring resources of application server
JP2012032986A (en) Compile method and program
Watkinson et al. Updating Gin's profiler for current Java
US10956303B2 (en) Trace data representation
CN113360334A (en) Early warning method and device for memory resources and computer readable storage medium
CN115757066A (en) Hard disk performance test method, device, equipment, storage medium and program product

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130604

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140121

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140312

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20140902