JPH0689188A - Automatic parallel processing system - Google Patents

Automatic parallel processing system

Info

Publication number
JPH0689188A
JPH0689188A JP23948392A JP23948392A JPH0689188A JP H0689188 A JPH0689188 A JP H0689188A JP 23948392 A JP23948392 A JP 23948392A JP 23948392 A JP23948392 A JP 23948392A JP H0689188 A JPH0689188 A JP H0689188A
Authority
JP
Japan
Prior art keywords
data
task
parallel
program
loop
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.)
Withdrawn
Application number
JP23948392A
Other languages
Japanese (ja)
Inventor
Chiharu Kori
千治 郡
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.)
NEC Solution Innovators Ltd
Original Assignee
NEC Solution Innovators 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 NEC Solution Innovators Ltd filed Critical NEC Solution Innovators Ltd
Priority to JP23948392A priority Critical patent/JPH0689188A/en
Publication of JPH0689188A publication Critical patent/JPH0689188A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To suppress the overhead to improve the processing efficiency of the whole of a program by processing loops, where guarantee of end values of local data in micro tasks is required, in parallel without exclusive control or synchronous control by the automatic parallel function of a compiler. CONSTITUTION:A loop recognizing means 21 analyzes data dependence relations of loops by a data dependence relation analysis means 22. A parallelism discriminating means 23 recognizes loops which can be executed in parallel. An end value guarantee discriminating means 24 discriminates local data in each task and discriminates whether guarantee of the end value is required after the end of the loop or not. A memory assigning means 25 discriminates data hierarchies and assigns memories to individual hierarchies. A parallel code generating means 26 generates a code for parallel execution and end value guarantee. Thus, shared data between tasks executing the same process is used to guarantee the end values of local data in micro tasks without exclusive control or synchronous control, thereby shortening the execution time of the whole of the program.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、自動並列化処理方式に
関し、特に、コンパイラとリンカとタスクスケジューラ
とを備えるメモリ共有型のマルチプロセッサ計算機シス
テムの自動並列化処理方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an automatic parallel processing system, and more particularly to an automatic parallel processing system for a memory sharing type multiprocessor computer system having a compiler, a linker and a task scheduler.

【0002】[0002]

【従来の技術】流体解析,気象解析,プラズマ解析,構
造解析,資源探査,最適化問題等の科学技術計算分野に
おいては、大配列を幾つかのループを用いて処理するこ
とが多い。このような演算処理をループ構造に従って、
配列の中から1要素づつデータを取り出してスカラ命令
で順次実行する方式では、高性能な超大型計算機を占有
して実行させても、数十日かかることも珍しくなく、コ
ストパフォーマンス等を考えると実用的ではなかった。
2. Description of the Related Art In the field of science and technology calculation such as fluid analysis, meteorological analysis, plasma analysis, structural analysis, resource exploration, optimization problem, etc., a large array is often processed using some loops. According to the loop structure, such arithmetic processing is
In the method of fetching data one element at a time from the array and sequentially executing it with scalar instructions, it often takes tens of days to occupy and execute a high-performance ultra-large computer, and considering cost performance, etc. It wasn't practical.

【0003】また、ベクトル演算機能を有するベクトル
プロセッサを備えたスーパーコンピュータ等により、ベ
クトル命令で並列実行する方式でも、シングルプロセッ
サの場合には、プロセッサ自身の高速化にも限界があ
り、飛躍的な処理速度の向上は望めない。
Further, even in a method of executing parallel execution by vector instructions by a supercomputer or the like having a vector processor having a vector operation function, in the case of a single processor, there is a limit to the speedup of the processor itself, which is a great leap. No improvement in processing speed can be expected.

【0004】このために、マルチプロセッサで並列処理
可能なマルチタスキング方式が利用されるようになって
きている。また、並列処理には、サブルーチンあるいは
サブルーチン群を単位として処理するマクロタスキング
と、ループ,文あるいは文の集まりを単位として処理す
るマイクロタスキングとがある。
For this reason, a multitasking system capable of parallel processing by a multiprocessor has come to be used. Further, the parallel processing includes macro tasking which processes a subroutine or a group of subroutines as a unit, and microtasking which processes a loop, a sentence or a group of sentences as a unit.

【0005】利用者がマクロタスキングを用いる場合に
は、トップダウン的にプログラムのアルゴリズムが並列
処理に適しているかどうかを見直し、処理の並列性およ
びデータの独立性等を解析する必要があり、非常に高度
な技術が要求される。また、マイクロタスキングを用い
る場合には、ボトムアップ的にプログラムの局所的な部
分に着目し、各ループの繰り返しや文の集まり毎の処理
の並列性およびデータの独立性等を解析する必要があ
り、非常に細やかな注意力を要するために、コンパイラ
による自動並列化が不可欠である。
When a user uses macrotasking, it is necessary to review top-down whether the algorithm of the program is suitable for parallel processing and analyze the parallelism of processing and the independence of data. Very sophisticated technology is required. Also, when using microtasking, it is necessary to focus on the local part of the program from the bottom up and analyze the parallelism of the processing for each loop iteration and each group of statements, data independence, etc. Yes, automatic parallelization by the compiler is indispensable because it requires very careful attention.

【0006】自動並列化処理では、ループ等の制御構造
およびデータの定義引用関係等の情報を解析し、データ
の依存関係のない並列実行可能部分を判別し、その並列
実行用のコードを生成する。また、データの依存関係が
ある部分に対しても、排他制御や同期制御を行ったり、
ソースの変形を行ったりすることで並列実行を可能にし
ている。但し、一般的に、マイクロタスクは並列処理の
単位が小さいために、オーバーヘッドがプログラム全体
の処理時間に与える影響は大きい。従って、可能な限り
排他制御や同期制御を用いないで並列化を行い、オーバ
ーヘッドを抑止する必要がある。
In the automatic parallelization processing, information such as a control structure such as a loop and a definition quotation relation of data is analyzed, a parallel executable part having no data dependency is determined, and a code for the parallel execution is generated. . In addition, even for parts that have data dependencies, exclusive control and synchronization control can be performed,
By modifying the source, parallel execution is possible. However, in general, since the microtask has a small unit of parallel processing, the overhead has a large influence on the processing time of the entire program. Therefore, it is necessary to suppress the overhead by performing parallelization without using exclusive control or synchronous control as much as possible.

【0007】従来の自動並列化処理方式は、マイクロタ
スク内でローカルのデータが並列化の対象となるループ
の終了時に引用される場合には、ループの最終回をマル
チタスクのみで実行するようにシリアル制御し、マルチ
タスク内のローカルデータの最終回の値を、ループ終了
後に引用される当該データの記憶場所に設定することに
より、終値保証を行う必要があるが、そのオーバーヘッ
ドのために十分な高速化が図れなかった。
In the conventional automatic parallelization processing method, when local data in a microtask is quoted at the end of a loop to be parallelized, the final round of the loop is executed only by multitasking. It is necessary to guarantee the final price by performing serial control and setting the final value of the local data in the multitask to the storage location of the data that is quoted after the loop ends, but it is sufficient for the overhead. I couldn't speed it up.

【0008】[0008]

【発明が解決しようとする課題】上述した従来のマイク
ロタスキングによる自動並列化処理方式では、並列処理
単位を大きくし、且つ、排他制御や同期制御を抑止する
ことが並列化の処理効率の向上に大きく影響する。
In the above-described conventional automatic parallelization processing system by microtasking, it is necessary to increase the parallel processing unit and suppress exclusive control or synchronous control to improve the processing efficiency of parallelization. Greatly affect the.

【0009】本発明の目的は、マイクロタスク内のロー
カルデータの終値保証が必要となるループを排他制御や
同期制御を用いないで並列化し、オーバーヘッドを抑止
することにより、プログラム全体の処理効率を向上させ
る自動並列化処理方式を提供することにある。
An object of the present invention is to improve the processing efficiency of the entire program by parallelizing a loop that requires guarantee of the final value of local data in a microtask without using exclusive control or synchronous control and suppressing overhead. It is to provide an automatic parallelization processing method.

【0010】[0010]

【課題を解決するための手段】本発明の自動並列化処理
方式は、ソースプログラムを翻訳して並列実行用の目的
プログラムを生成するコンパイラと、前記目的プログラ
ムおよび実行時ルーチンを結合してマルチタスク構成の
実行可能プログラムを生成するリンカと、並列実行用の
タスクを管理するタスクスケジューラとを備えたメモリ
共有型のマルチプロセッサ計算機システムの自動並列化
処理方式において、コンパイラに、翻訳対象となるソー
スプログラムを入力後に、ソースプログラム内のループ
等の制御構造を認識するループ認識手段と、認識したル
ープ内のデータの定義引用関係を解析し、データの依存
関係を認識するデータ依存関係解析手段と、認識したル
ープの制御構造およびデータの依存関係により、並列実
行可能部分の判定および並列実行時のデータの定義引用
関係を保証するために、必要な排他制御や同期制御を認
識する並列性判定手段と、前記並列性判定手段により、
並列実行可能と判定されたループに対して、各タスク内
でローカルなデータを識別し、ループ終了時に終値保証
が必要か否かを判定する終値保証判定手段と、前記ソー
スプログラムの宣言情報、並列実行時のデータ依存関係
情報、終値保証情報およびシステムで利用可能な最大プ
ロセッサ数から、タスク間共有データおよび同一プロセ
ス実行タスク間共有データ並びにタスク内固有データの
データ階層を判別し、メモリへの割り当てを行うメモリ
割り当て手段と、前記並列性判定手段により、得られた
並列実行可能部分に対して、排他制御や同期制御用のモ
ードも含む並列実行用および終値保証用のコードを生成
する並列コード生成手段とを備え、タスクスケジューラ
に、前記コンパイラが生成した並列コードを含む前記目
的プログラムの実行時に要求される情報により、並列実
行用タスクを生成するタスク生成手段と、並列実行が要
求された時点で利用可能なプロセッサを確保し、確保し
たプロセッサを並列実行用タスクに割り当て、確保した
プロセッサ台数および各プロセッサを識別可能な識別番
号をプログラムに通知するタスク割り当て手段と、並列
実行のスケジューリングおよびタスク間の排他制御や同
期制御を行うタスク制御手段と、並列実行終了時にタス
クおよびプロセッサの解放を行うタスク解放手段とを備
え、前記タスクスケージューラから通知される並列実行
可能なプロセッサ台数およびそのプロセッサ識別番号情
報を利用することにより、同一プロセス実行タスク間共
有データというデータ階層を設け、排他制御や同期制御
を行わずに並列実行可能なタスク内でローカルなデータ
の終値保証を前記コンパイラで自動的に行うことにより
構成されている。
The automatic parallelization processing system of the present invention is a multitasking system in which a source program is translated to generate a target program for parallel execution, and the target program and a runtime routine are combined. A source program to be translated by a compiler in an automatic parallelization processing method of a memory-sharing multiprocessor computer system including a linker that generates an executable program of a configuration and a task scheduler that manages tasks for parallel execution After inputting, the loop recognition means for recognizing control structures such as loops in the source program, and the data dependence analysis means for recognizing the data reference relationship in the recognized loop and recognizing the data dependence relationship. Of executable parts in parallel by the control structure and data dependency of the created loop To ensure defined citation data at the time of the preliminary parallel execution, the parallel determination means for recognizing the exclusive control and synchronous control necessary, by the parallel determination means,
For a loop that is determined to be executable in parallel, final value guarantee determination means that identifies local data in each task and determines whether or not a final price guarantee is required at the end of the loop, declaration information of the source program, parallel The data hierarchy of shared data between tasks, shared data between tasks and shared data between tasks and unique data within a task is determined from the data dependency information at run time, end price guarantee information and the maximum number of processors that can be used in the system, and allocated to memory. A parallel code generation for generating a code for parallel execution and a final value guarantee including a mode for exclusive control and synchronous control for the obtained parallel executable part by the memory allocation means for performing the above and the parallelism determination means. Means for executing the execution of the target program including parallel code generated by the compiler in a task scheduler. Depending on the information that is sometimes requested, task generation means for generating a task for parallel execution and a processor that can be used at the time when parallel execution is requested are secured, the secured processor is assigned to the task for parallel execution, and the number of secured processors And a task allocation means for notifying the program of an identification number capable of identifying each processor, a task control means for scheduling parallel execution and exclusive control and synchronization control between tasks, and releasing the task and processor at the end of parallel execution. A task release means is provided, and by using the number of processors that can be executed in parallel and the processor identification number information notified from the task scheduler, a data hierarchy of shared data between same process execution tasks is provided to perform exclusive control and synchronization. In a task that can be executed in parallel without controlling And it is configured by automatically performing closing guarantee local data by the compiler.

【0011】[0011]

【作用】本発明の自動並列化処理方式は、タスクスケジ
ューラから通知される並列実行可能なプロセッサ台数と
そのプロセッサ識別番号情報とを利用することにより、
データスコープがタスク間共有データと同じであるが、
同一プロセス上で順次実行されるタスク間で共有され、
定義引用関係の順序性が保証される同一プロセス実行タ
スク間共有データというデータ階層を設け、排他制御や
同期制御を行わずに並列実行を可能とする並列コードの
生成とメモリ割り当てとをコンパイラで自動的に行って
いる。
The automatic parallelization processing method of the present invention uses the number of processors capable of parallel execution notified from the task scheduler and the processor identification number information,
The data scope is the same as the shared data between tasks,
Shared between tasks that are executed sequentially in the same process,
A data hierarchy called shared data between same process execution tasks that guarantees the ordering of definition quoting relationships is provided, and the compiler automatically generates parallel code that enables parallel execution without performing exclusive control or synchronization control, and memory allocation. I am doing it.

【0012】[0012]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。図1は、本発明の自動並列化処理方式の一
実施例を示すブロック図である。また、図2は、同一プ
ロセス実行タスク間共有データの概念を示す図である。
一方、図3は、ソースプログラム1の一例としてFOR
TRAN言語によるプログラムを示す図である。また、
図4は、図3のプログラムを従来の技術で並列化したプ
ログラムの一例を示す図である。他方、図5は、図3の
プログラムを従来の技術で並列化したデータ階層とメモ
リ割り当てとの状態の一例を示す図である。また、図6
は、図3のプログラムを従来の技術で並列化した各タス
クの実行状況の一例を示す図である。次に、図7は、図
3のプログラムを本実施例の自動並列化処理方式で並列
化したプログラムの一例を示す図である。また、図8
は、図3のプログラムを本実施例の自動並列化処理方式
で並列化したデータ階層とメモリ割り当てとの状態の一
例を示す図である。さらに、図9は、図3のプログラム
を本実施例の自動並列化処理方式で並列化した各タスク
の実行状況の一例を示す図である。
Embodiments of the present invention will now be described with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of an automatic parallelization processing system of the present invention. 2 is a diagram showing the concept of shared data between same process execution tasks.
On the other hand, FIG. 3 shows the FOR as an example of the source program 1.
It is a figure which shows the program by TRAN language. Also,
FIG. 4 is a diagram showing an example of a program in which the program of FIG. 3 is parallelized by a conventional technique. On the other hand, FIG. 5 is a diagram showing an example of a state of a data hierarchy and memory allocation in which the program of FIG. 3 is parallelized by a conventional technique. In addition, FIG.
FIG. 4 is a diagram showing an example of an execution status of each task in which the program of FIG. 3 is parallelized by a conventional technique. Next, FIG. 7 is a diagram showing an example of a program in which the program of FIG. 3 is parallelized by the automatic parallelization processing method of the present embodiment. Also, FIG.
FIG. 4 is a diagram showing an example of a state of a data hierarchy and memory allocation in which the program of FIG. 3 is parallelized by the automatic parallelization processing method of this embodiment. Further, FIG. 9 is a diagram showing an example of the execution status of each task in which the program of FIG. 3 is parallelized by the automatic parallelization processing method of the present embodiment.

【0013】図1に示すように、本実施例は、コンパイ
ラ2とリンカ5とタスクスケジューラ7とを備えてお
り、ソースプログラム1をコンパイラ2により翻訳し
て、並列実行用の目的プログラム3を生成し、その目的
プログラム3と実行時ルーチン4とをリンカ5により結
合してマルチタスク構成の実行可能プログラム6を生成
し、その実行可能プログラム6をタスクスケジューラ7
の制御の下で並列実行させている。
As shown in FIG. 1, this embodiment comprises a compiler 2, a linker 5 and a task scheduler 7. The source program 1 is translated by the compiler 2 to generate a target program 3 for parallel execution. Then, the target program 3 and the run-time routine 4 are linked by a linker 5 to generate an executable program 6 having a multitask structure, and the executable program 6 is linked to the task scheduler 7
Are executed in parallel under the control of.

【0014】ここで、本発明の特徴である同一プロセス
実行タスク間共有データの概念を図2を用いて説明す
る。並列実行可能な単位(例えば、ループ構造の1回の
繰り返し処理単位等)は、その単位間でデータの依存関
係がないことが前提であり、その単位を1つのタスクと
して並列処理を行う。この並列処理単位の間で共通にア
クセスされるデータ階層としてタスク間共有データ27
という概念がある。
The concept of shared data between same process execution tasks, which is a feature of the present invention, will be described with reference to FIG. It is premised that a unit that can be executed in parallel (for example, a unit of repeated processing of a loop structure, etc.) has no data dependency between the units, and that unit is used as one task for parallel processing. Intertask shared data 27 is used as a data hierarchy commonly accessed between the parallel processing units.
There is a concept.

【0015】図2の例では、FORTRAN言語のCO
MMON文で宣言された配列A,B,CがDOループ中
で参照されており、そのDOループが並列実行される場
合にタスク間共有データとして扱われる。配列A,B,
Cには、データの依存関係がなく、このDOループが2
台のプロセッサで並列実行される場合には、各並列処理
単位がタスクとして、順次にプロセッサに割り当てられ
る。
In the example of FIG. 2, the FORTRAN language CO is used.
The arrays A, B, and C declared in the MMON statement are referenced in the DO loop, and when the DO loop is executed in parallel, they are treated as inter-task shared data. Array A, B,
There is no data dependency in C, and this DO loop is 2
When parallel execution is performed by one processor, each parallel processing unit is sequentially assigned to the processor as a task.

【0016】このときに、プロセスとしてアクセスさ
れるデータは、図2に示すように、配列A,B,Cの第
1,3,5,……,99要素であり、そのアクセスの順
序性は保たれている。同様に、プロセスとしてアクセ
スされるデータは、配列A,B,Cの第2,4,6,…
…,100要素であり、そのアクセスの順序性も保たれ
ている。よって、同一プロセス上で実行されるタスク間
では、参照されるデータのアクセス順序は、スカラ命令
で順次に実行される場合と同様の順序性が保証されてい
ることになる。
At this time, the data accessed as a process are the first, third, fifth, ..., 99th elements of the arrays A, B, and C, as shown in FIG. It is kept. Similarly, the data accessed as a process is the second, fourth, sixth, ...
.., 100 elements, and the order of access is maintained. Therefore, between the tasks executed in the same process, the access order of the referenced data is guaranteed to be the same order as in the case of sequentially executing the scalar instructions.

【0017】この考え方に基づき、同一プロセス実行タ
スク間共有データ28というデータ階層を設けると、図
2に示すように、配列A,B,Cの第1,3,5……,
99要素は、プロセスの同一プロセス実行タスク間共
有データに割り当てることができる。同様に、配列A,
B,Cの第2,4,6,……,100要素は、プロセス
の同一プロセス実行タスク間共有データに割り当てる
ことができる。
Based on this concept, when a data hierarchy called shared data between same process execution tasks 28 is provided, as shown in FIG. 2, the first, third, fifth, ...
99 elements can be assigned to shared data between same process execution tasks of a process. Similarly, array A,
The second, fourth, sixth, ..., 100 elements of B and C can be assigned to the same process execution task shared data of the process.

【0018】同一プロセス実行タスク間共有データ28
は、タスク間共有データ27と同じデータスコープをも
つが、同一プロセス上で順次に実行されるタスク間での
み共有されることから、データの定義引用関係の順序性
が保証されるという特徴を有する。従って、従来の技術
に同一プロセス実行タスク間共有データ28という新し
いデータ階層を導入することにより、データの依存関係
がある並列処理単位を並列実行する場合に、依存関係の
あるデータをプロセス毎に割り当てることで排他制御や
同期制御を行わなくても並列実行を可能とすることがで
きる。
Shared data between same process execution tasks 28
Has the same data scope as the task-to-task shared data 27, but is shared only between tasks that are sequentially executed on the same process, and therefore has the characteristic that the order of the data definition citation relationship is guaranteed. . Therefore, by introducing a new data hierarchy called shared data between same process execution tasks 28 into the conventional technique, when parallel processing units having a data dependency relationship are executed in parallel, data having a dependency relationship is assigned to each process. Therefore, it is possible to perform parallel execution without performing exclusive control or synchronous control.

【0019】ソースプログラム1の一例は、図3に示す
ように、与えられた配列A,B,Cによりループ31で
演算し、その結果を配列Cおよび変数Xに格納して返却
するプログラムであり、ループ31を並列化した場合
に、変数Tの終値保証を必要とする。
As shown in FIG. 3, an example of the source program 1 is a program for operating in a loop 31 with given arrays A, B, and C, storing the result in an array C and a variable X, and returning the result. , When the loop 31 is parallelized, it is necessary to guarantee the final value of the variable T.

【0020】従来の技術で図3に示すプログラムを翻
訳,実行した場合には、図4,図6に示すように、RE
SERVEルーチン41を呼び出して、タスクスケジュ
ーラにより、タイミング61で、利用可能なプロセッサ
を確保し、タイミング62でPARALLEL_DOル
ーチン42を呼び出してN−1回のループ43を並列実
行する。
When the program shown in FIG. 3 is translated and executed by the conventional technique, as shown in FIGS.
The task scheduler calls the SERVE routine 41 to secure an available processor at timing 61, and calls the PARALLEL_DO routine 42 at timing 62 to execute the loop 43 N-1 times in parallel.

【0021】そして、タイミング63で、SERIAL
ルーチン44の呼び出しにより、ループ43の終了待ち
の同期をとり、ループ31の最終回(N回目)をシリア
ルセクション45としてマスタタスク(タスク1)で実
行することで、タスク内固有データT42の終値を代入
できる。
Then, at timing 63, SERIAL
By calling the routine 44, the end waiting of the loop 43 is synchronized, and the final time (Nth time) of the loop 31 is executed as the serial section 45 by the master task (task 1), and the final value of the in-task unique data T42 is determined. Can be assigned.

【0022】その後に、タイミング64で、END_S
ERIALルーチン46の呼び出しにより、シリアルセ
クション45の実行終了を待つスレーブタスク(タスク
2,〜タスクM)の待機状態を解除する。最後に、タイ
ミング65で、RELEASEルーチン47を呼び出し
てプロセッサを解放する。
Thereafter, at timing 64, END_S
By calling the ERIAL routine 46, the standby state of the slave tasks (task 2, task M) waiting for the completion of execution of the serial section 45 is released. Finally, at timing 65, the RELEASE routine 47 is called to free the processor.

【0023】本実施例では、図6のタイミング63,6
4の同期制御を抑止して、プログラム全体の実行効率を
高めるために、以下のような処理を行う。
In this embodiment, the timings 63 and 6 shown in FIG.
In order to suppress the synchronization control of No. 4 and improve the execution efficiency of the entire program, the following processing is performed.

【0024】コンパイラ2は、ループ認識手段21とデ
ータ依存関係解析手段22と並列性判定手段23と終値
保証判定手段24とメモリ割り当て手段25と並列コー
ド生成手段26とを備えている。
The compiler 2 comprises a loop recognizing means 21, a data dependency analyzing means 22, a parallelism determining means 23, a final price guarantee determining means 24, a memory allocating means 25 and a parallel code generating means 26.

【0025】ループ認識手段21は、入力したソースプ
ログラム1の制御構造を解析し、ループ31を認識す
る。データ依存関係解析手段22は、ループ31内のデ
ータの定義引用関係を解析し、ループの繰り返しにまた
がる依存関係がないことを認識する。並列性判定手段2
3は、ループ31全体が並列実行可能であることを判定
する。
The loop recognition means 21 analyzes the control structure of the input source program 1 and recognizes the loop 31. The data dependency relationship analyzing unit 22 analyzes the definition quotation relationship of the data in the loop 31 and recognizes that there is no dependency relationship that spans the repetition of the loop. Parallelism determination means 2
3 determines that the entire loop 31 can be executed in parallel.

【0026】また、終値保証判定手段24は、ループ3
1の終了時に引用されていることから、終値保証を行う
必要があると判定し、図8に示すように、同一プロセス
実行タスク間共有データ83として、システムで利用可
能な最大プロセッサ数だけの要素をもつPDO84(何
回目のループ実行であるかの識別用)とPT85(同一
プロセス上で実行するタスクは順次実行されることか
ら、変数Tを代替するデータ用)とを用意し、図7に示
すように、ループ31をループ74に変形し、ループ7
4の並列実行終了後に、ループ74の最終回を実行した
プロセスを判定し、そのプロセスに対応するPT85の
要素を変数Tの終値として変数Xに代入するテキスト列
75を生成する。
Further, the final price guarantee judging means 24 uses the loop 3
Since it is quoted at the end of 1, it is determined that it is necessary to guarantee the closing price, and as shown in FIG. 8, as the shared data 83 between the same process execution tasks, only the maximum number of processors available in the system 7 and PDO84 (for identifying how many times the loop is executed) and PT85 (for data that substitutes the variable T because the tasks executed in the same process are sequentially executed) are prepared. As shown, loop 31 is transformed into loop 74 and loop 7
After the end of the parallel execution of 4, the process that executed the final round of the loop 74 is determined, and the text string 75 that substitutes the element of PT85 corresponding to the process into the variable X as the final value of the variable T is generated.

【0027】一方、メモリ割り当て手段25は、プログ
ラム中に現れた各データを、図8のように、タスク間共
有データ87,同一プロセス実行タスク間共有データ8
3,タスク内固有データ88のデータ階層に分類して割
り当てる。並列コード生成手段26は、並列性判定手段
23で認識された並列実行可能部分や終値保証判定手段
24で変形および生成したテキスト部分も含めて、並列
実行用のコードを生成する。
On the other hand, the memory allocating means 25 converts the respective data appearing in the program into the inter-task shared data 87 and the same process execution task shared data 8 as shown in FIG.
3. Classify and assign to the data hierarchy of the in-task unique data 88. The parallel code generation unit 26 generates a code for parallel execution, including the parallel executable portion recognized by the parallelism determination unit 23 and the text portion modified and generated by the final price guarantee determination unit 24.

【0028】以上のように、本実施例の自動並列化処理
方式で図3に示すプログラムを翻訳して実行した場合に
は、図7,図9に示すように、タイミング91で、RE
SERVEルーチン71を呼び出して、タスクスケジュ
ーラにより利用可能なプロセッサが確保され、タスク間
共有データPNUM82に確保したプロセッサ台数が返
却される。また、IPIDルーチン72を呼び出して、
タスクスケジューラにより、自タスクが割り当てられた
プロセッサ識別番号を同一プロセス実行タスク間共有デ
ータPID86に返却される。
As described above, when the program shown in FIG. 3 is translated and executed by the automatic parallelization processing method of this embodiment, as shown in FIG. 7 and FIG.
The SERVER routine 71 is called, the available processor is secured by the task scheduler, and the secured number of processors is returned to the inter-task shared data PNUM 82. Also, by calling the IPID routine 72,
The task scheduler returns the processor identification number to which the own task is assigned to the same process execution task shared data PID86.

【0029】次に、タイミング92で、PARALLE
L_DOルーチン73を呼び出してループ74を並列実
行し、並列実行の終了したプロセスより順に、タイミン
グ93で、ループ74の最終回を実行したか否かを判定
し、最終回を実行したプロセスでは、変数Xに正しい終
値を代入する。その後に、タイミング94で、RELE
ASEルーチン76を呼び出してプロセッサを解放す
る。
Next, at a timing 92, PARALLE
The L_DO routine 73 is called to execute the loop 74 in parallel, and at the timing 93, it is determined whether or not the final round of the loop 74 has been executed in order from the process in which the parallel execution has ended. Substitute the correct closing price for X. After that, at timing 94, RELE
Call the ASE routine 76 to free the processor.

【0030】[0030]

【発明の効果】以上説明したように、本発明の自動並列
化処理方式は、マイクロタスク内のローカルデータの終
値保証が必要となるループを含むプログラムを自動並列
化する場合に、排他制御や同期制御を用いずに、同一プ
ロセス実行タスク間共有データというデータ階層を利用
することにより解消し、排他制御や同期制御のオーバー
ヘッドが抑止されることにより、プログラム全体の実行
時間を短縮できるという効果を有している。
As described above, according to the automatic parallelization processing method of the present invention, exclusive control or synchronization is performed in the case of automatically parallelizing a program including a loop in which a final value guarantee of local data in a microtask is required. This is solved by using the data hierarchy of shared data between same process execution tasks without using control, and the overhead of exclusive control and synchronous control is suppressed, which has the effect of reducing the execution time of the entire program. is doing.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の自動並列化処理方式の一実施例を示す
ブロック図である。
FIG. 1 is a block diagram showing an embodiment of an automatic parallelization processing system of the present invention.

【図2】同一プロセス実行タスク間共有データの概念を
示す図である。
FIG. 2 is a diagram showing a concept of shared data between same process execution tasks.

【図3】ソースプログラム1の一例としてFORTRA
N言語によるプログラムを示す図である。
FIG. 3 shows FORTRA as an example of the source program 1.
It is a figure which shows the program by N language.

【図4】図3のプログラムを従来の技術で並列化したプ
ログラムの一例を示す図である。
FIG. 4 is a diagram showing an example of a program in which the program of FIG. 3 is parallelized by a conventional technique.

【図5】図3のプログラムを従来の技術で並列化したデ
ータ階層とメモリ割り当てとの状態の一例を示す図であ
る。
5 is a diagram showing an example of a state of a data hierarchy and memory allocation in which the program of FIG. 3 is parallelized by a conventional technique.

【図6】図3のプログラムを従来の技術で並列化した各
タスクの実行状況の一例を示す図である。
FIG. 6 is a diagram showing an example of an execution status of each task in which the program of FIG. 3 is parallelized by a conventional technique.

【図7】図3のプログラムを本実施例の移動並列化処理
方式で並列化したプログラムの一例を示す図である。
FIG. 7 is a diagram showing an example of a program in which the program of FIG. 3 is parallelized by the moving parallelization processing method of the present exemplary embodiment.

【図8】図3のプログラムを本実施例の自動並列化処理
方式で並列化したデータ階層とメモリ割り当てとの状態
の一例を示す図である。
FIG. 8 is a diagram showing an example of a state of a data hierarchy and memory allocation in which the program of FIG. 3 is parallelized by the automatic parallelization processing method of the present embodiment.

【図9】図3のプログラムを本実施例の自動並列化処理
方式で並列化した各タスクの実行状況の一例を示す図で
ある。
FIG. 9 is a diagram showing an example of the execution status of each task in which the program of FIG. 3 is parallelized by the automatic parallelization processing method of the present embodiment.

【符号の説明】[Explanation of symbols]

1 ソースプログラム 2 コンパイラ 3 目的プログラム 4 実行時ルーチン 5 リンカ 6 実行可能プログラム 7 タスクスケジューラ 21 ループ認識手段 22 データ依存関係解析手段 23 並列性判定手段 24 終値保証判定手段 25 メモリ割り当て手段 26 並列コード生成手段 27 タスク間共有データ 28 同一プロセス実行タスク間共有データ 1 Source Program 2 Compiler 3 Target Program 4 Runtime Routine 5 Linker 6 Executable Program 7 Task Scheduler 21 Loop Recognition Means 22 Data Dependency Analysis Means 23 Parallelism Judgment Means 24 Final Value Guarantee Means 25 Memory Allocation Means 26 Parallel Code Generation Means 27 Shared data between tasks 28 Shared data between same process execution tasks

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 ソースプログラムを翻訳して並列実行用
の目的プログラムを生成するコンパイラと、前記目的プ
ログラムおよび実行時ルーチンを結合してマルチタスク
構成の実行可能プログラムを生成するリンカと、並列実
行用のタスクを管理するタスクスケジューラとを備えた
メモリ共有型のマルチプロセッサ計算機システムの自動
並列化処理方式において、 コンパイラに、 翻訳対象となるソースプログラムを入力後に、ソースプ
ログラム内のループ等の制御構造を認識するループ認識
手段と、 認識したループ内のデータの定義引用関係を解析し、デ
ータの依存関係を認識するデータ依存関係解析手段と、 認識したループの制御構造およびデータの依存関係によ
り、並列実行可能部分の判定および並列実行時のデータ
の定義引用関係を保証するために、必要な排他制御や同
期制御を認識する並列性判定手段と、 前記並列性判定手段により、並列実行可能と判定された
ループに対して、各タスク内でローカルなデータを識別
し、ループ終了時に終値保証が必要か否かを判定する終
値保証判定手段と、 前記ソースプログラムの宣言情報、並列実行時のデータ
依存関係情報、終値保証情報およびシステムで利用可能
な最大プロセッサ数から、タスク間共有データおよび同
一プロセス実行タスク間共有データ並びにタスク内固有
データのデータ階層を判別し、メモリへの割り当てを行
うメモリ割り当て手段と、 前記並列性判定手段により、得られた並列実行可能部分
に対して、排他制御や同期制御用のモードも含む並列実
行用および終値保証用のコードを生成する並列コード生
成手段とを備え、 タスクスケジューラに、 前記コンパイラが生成した並列コードを含む前記目的プ
ログラムの実行時に要求される情報により、並列実行用
タスクを生成するタスク生成手段と、 並列実行が要求された時点で利用可能なプロセッサを確
保し、確保したプロセッサを並列実行用タスクに割り当
て、確保したプロセッサ台数および各プロセッサを識別
可能な識別番号をプログラムに通知するタスク割り当て
手段と、 並列実行のスケジューリングおよびタスク間の排他制御
や同期制御を行うタスク制御手段と、 並列実行終了時にタスクおよびプロセッサの解放を行う
タスク解放手段とを備え、 前記タスクスケージューラから通知される並列実行可能
なプロセッサ台数およびそのプロセッサ識別番号情報を
利用することにより、同一プロセス実行タスク間共有デ
ータというデータ階層を設け、排他制御や同期制御を行
わずに並列実行可能なタスク内でローカルなデータの終
値保証を前記コンパイラで自動的に行うことを特徴とす
る自動並列化処理方式。
1. A compiler for translating a source program to generate an object program for parallel execution, a linker for combining the object program and a runtime routine to generate an executable program having a multitask structure, and for parallel execution. In the automatic parallelization processing method of the memory sharing type multiprocessor computer system with the task scheduler that manages the tasks of the above, after inputting the source program to be translated into the compiler, control structures such as loops in the source program are input. Parallel execution by the recognized loop recognition means, the data definition analysis means that recognizes the definition citation relationship of the data in the recognized loop and recognizes the data dependency relationship, and the recognized control structure of the loop and the data dependency relationship Judgment of feasible parts and definition of data during parallel execution In order to do so, the parallelism determining means for recognizing the necessary exclusive control and the synchronous control, and the loop determined to be parallel executable by the parallelism determining means identify the local data in each task, A closing price guarantee judging means for judging whether closing price guarantee is necessary at the end of the loop, and from the declaration information of the source program, data dependency information at the time of parallel execution, closing price guarantee information and the maximum number of processors available in the system, the task Memory allocating means for deciding the data hierarchy of inter-process shared data, inter-process shared task shared data, and in-task specific data, and allocating to the memory, and the parallelism determining means for the parallel executable parts obtained. And a parallel code generation means for generating code for parallel execution including the modes for exclusive control and synchronous control and for guaranteeing the closing price. And a task scheduler that generates a task for parallel execution according to the information required when the target program including the parallel code generated by the compiler is executed, and a task scheduler that can be used when parallel execution is requested. Secure processor, allocate the secured processor to the task for parallel execution, and notify the program of the number of secured processors and the identification number that can identify each processor, and scheduling of parallel execution and exclusive control between tasks And a task control means for performing synchronous control, and a task release means for releasing the task and the processor at the end of parallel execution. The number of processors capable of parallel execution and the processor identification number information notified from the task scheduler are used. By doing the same process Automatic parallelization processing characterized by providing a data hierarchy called shared data between row tasks and automatically performing local end-value guarantee of local data within a task that can be executed in parallel without performing exclusive control or synchronous control method.
JP23948392A 1992-09-08 1992-09-08 Automatic parallel processing system Withdrawn JPH0689188A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23948392A JPH0689188A (en) 1992-09-08 1992-09-08 Automatic parallel processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23948392A JPH0689188A (en) 1992-09-08 1992-09-08 Automatic parallel processing system

Publications (1)

Publication Number Publication Date
JPH0689188A true JPH0689188A (en) 1994-03-29

Family

ID=17045451

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23948392A Withdrawn JPH0689188A (en) 1992-09-08 1992-09-08 Automatic parallel processing system

Country Status (1)

Country Link
JP (1) JPH0689188A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11134307A (en) * 1997-10-31 1999-05-21 Toshiba Corp Program development supporting device and method therefor and recording medium for recording program development supporting software
US8656393B2 (en) 2008-12-25 2014-02-18 Fujitsu Semiconductor Limited Multi-core system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11134307A (en) * 1997-10-31 1999-05-21 Toshiba Corp Program development supporting device and method therefor and recording medium for recording program development supporting software
US8656393B2 (en) 2008-12-25 2014-02-18 Fujitsu Semiconductor Limited Multi-core system

Similar Documents

Publication Publication Date Title
US10949182B2 (en) Systems and methods for generating code for parallel processing units
EP1783604A2 (en) Object-oriented, parallel language, method of programming and multi-processor computer
Printz et al. Automatic mapping of large signal processing systems to a parallel machine
Lee et al. Orchestrating multiple data-parallel kernels on multiple devices
Saksena et al. Automatic synthesis of multi-tasking implementations from real-time object-oriented models
US8578389B1 (en) Method and system for merging directed acyclic graphs representing data flow codes
JP2818016B2 (en) Process parallel execution method and apparatus
Castelló et al. A review of lightweight thread approaches for high performance computing
Arandi et al. Combining compile and run-time dependency resolution in data-driven multithreading
Matheou et al. FREDDO: an efficient framework for runtime execution of data-driven objects
Odajima et al. GPU/CPU work sharing with parallel language XcalableMP-dev for parallelized accelerated computing
Planas et al. AMA: Asynchronous management of accelerators for task-based programming models
Wu et al. CGMBE: a model-based tool for the design and implementation of real-time image processing applications on CPU–GPU platforms
JPH0689188A (en) Automatic parallel processing system
Imam et al. The Eureka programming model for speculative task parallelism
JP6488738B2 (en) Parallelizing compilation method and parallelizing compiler
JPH06250988A (en) Automatic parallel processing method
Nair An Analytical study of Performance towards Task-level Parallelism on Many-core systems using Java API
Pinho et al. Real-time fine-grained parallelism in ada
Alrawais Parallel programming models and paradigms: Openmp analysis
JPH0561899A (en) Automatic parallel processing system for program
Alfa et al. Implications of job loading and scheduling structures on machine memory effectiveness
Verucchi et al. A survey on real-time DAG scheduling, revisiting the Global-Partitioned Infinity War
Czejdo et al. Practical Approach to Introducing Parallelism in Sequential Programs
Gentzsch et al. Use of parallel FORTRAN for engineering problems on the IBM 3090 vector multiprocessor

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19991130