JPH1139271A - Library system and method for assigning library - Google Patents

Library system and method for assigning library

Info

Publication number
JPH1139271A
JPH1139271A JP18972797A JP18972797A JPH1139271A JP H1139271 A JPH1139271 A JP H1139271A JP 18972797 A JP18972797 A JP 18972797A JP 18972797 A JP18972797 A JP 18972797A JP H1139271 A JPH1139271 A JP H1139271A
Authority
JP
Japan
Prior art keywords
processor elements
library
data
subroutine
size
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
JP18972797A
Other languages
Japanese (ja)
Inventor
Satoshi Ito
聡 伊藤
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP18972797A priority Critical patent/JPH1139271A/en
Publication of JPH1139271A publication Critical patent/JPH1139271A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)
  • Complex Calculations (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a library system which assigns a library using an appropriate number of processor elements in accordance with a delivered data size. SOLUTION: A library system 20 stores a plurality of libraries 21 in which the numbers of processor elements 11 are optimized in accordance with data sizes. The optimization is performed by making a parallel computer thoroughly process at least one or more sets of performance evaluating data, with each set being composed of a plurality of data having different sizes, by changing the number of used processor elements 11 when the system 20 is introduced. When the data a user wants to solve are delivered, the library system 20 selects the library 21 using the optimum number of processor elements regardless of the number of the used processor elements designated from the user and assigns the library 21.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、たとえば大規模
科学技術計算を実行する複数のプロセッサエレメントか
ら構成された並列計算機システムなどに適用して好適な
ライブラリシステムおよびライブラリの割り当て方法に
係り、特に受け渡されたデータサイズに応じて適切な数
のプロセッサエレメントを使用するサブルーチンを割り
当てるライブラリシステムおよびライブラリの割り当て
方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a library system and a library allocating method suitable for application to, for example, a parallel computer system constituted by a plurality of processor elements for executing large-scale scientific and technical calculations. The present invention relates to a library system and a library allocating method for allocating a subroutine using an appropriate number of processor elements according to a passed data size.

【0002】[0002]

【従来の技術】複数のプロセッサエレメントを持ち、数
値計算を並列・分散的に処理する並列計算機には、その
メモリ構成によって分散メモリ型、共有メモリ型、分散
共有メモリ型などいろいろなものが提案、登場している
が、いずれにしても近い将来、現在の科学技術計算の主
流であるベクトル型スーパーコンピュータに取って代わ
る次世代のスーパーコンピュータであると目されてい
る。
2. Description of the Related Art Various types of parallel computers having a plurality of processor elements and processing numerical calculations in parallel and in a distributed manner have been proposed depending on the memory configuration, such as a distributed memory type, a shared memory type, and a distributed shared memory type. In any case, in the near future, it is expected to be the next generation supercomputer to replace the vector supercomputer, which is currently the mainstream of scientific computing.

【0003】このような計算機で大規模計算を行なう
際、従来の計算機と同じく、ユーザはそれぞれのデータ
(問題)に適したプログラムをHPF(high pe
rformance FORTRAN)やMPI(me
ssage passinginterface)とい
った言語で記述することになる。これらの計算機言語
は、従来のFORTRANやCなどとは異なり、複数の
プロセッサエレメントの制御を可能とする並列・分散処
理システム用の言語であり、個々の数値計算の実行には
従来のFORTRANやCを使ってコーディングするこ
とができる。この場合、多くの分野で現れるひとまとま
りのプログラム手順をライブラリとして作っておくこと
は、現実的な計算機システムとしては非常に重要であ
る。現在、このような並列計算機向き数学ライブラリ
は、主に米国の研究機関を中心に開発が進められてい
る。そのうちで代表的なものに、scaLAPACKと
呼ばれるものがある。このscaLAPACKは、複数
のプロセッサエレメントを使用した場合に比較的多数個
のプロセッサエレメントを使っている利点が発揮される
ようなアルゴリズムを使用し、その特性が生かされるよ
うなコーディングが行なわれたライブラリであって、い
わゆるスケーラビリティーに優れていることを特徴とし
ている。
When a large-scale calculation is performed by using such a computer, a user can select a program suitable for each data (problem) using an HPF (high pe
rformance FORTRAN) and MPI (me
It will be described in a language such as "ssaging passing interface". Unlike conventional FORTRAN and C, these computer languages are languages for parallel / distributed processing systems that enable control of a plurality of processor elements. Can be coded using In this case, it is very important for a practical computer system to make a set of program procedures that appear in many fields as a library. At present, such mathematical libraries for parallel computers are being developed mainly by research institutions in the United States. Among them, a typical one is called scalAPACK. This scalAPACK is a library in which an algorithm is used in which the advantage of using a relatively large number of processor elements is exhibited when a plurality of processor elements are used, and coding is performed to take advantage of the characteristics. Therefore, it is characterized by excellent scalability.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、現実に
はこのスケーラビリティーは完全に成り立つものではな
い。すなわち、ある程度以上の数のプロセッサエレメン
トを使用しても処理時間が短くならないばかりか、かえ
って増えてしまうことが多い。これは、通常の数学的な
アルゴリズムは完全な並列動作が原理的に可能でないた
めに、プロセッサエレメント間の通信を発生させてしま
うからである。プロセッサエレメント内部の演算は、通
常非常に高速に処理されるが、プロセッサエレメント間
の通信速度は、プロセッサエレメント内部の処理速度に
比べれば現状では非常に遅い。超高速通信の技術も研究
開発がすすんでいるが、プロセッサエレメント内部の処
理速度とプロセッサエレメント間の通信速度との差は今
後もなくなることはないと予測される。したがって、非
常に多数個のプロセッサエレメントを使用したときの頭
打ち現象を避けることは現実には困難である。しかしな
がら、これまでのライブラリでは、これに対する直接的
な対策はとられてはいない。
However, in reality, this scalability is not completely satisfied. That is, even if a certain number or more processor elements are used, the processing time is not only shortened but often increased. This is because normal mathematical algorithms do not allow perfect parallel operation in principle, and thus cause communication between processor elements. The operation inside the processor element is usually processed at a very high speed, but the communication speed between the processor elements is very slow at present compared with the processing speed inside the processor element. Research and development of ultra-high-speed communication technology is progressing, but it is expected that the difference between the processing speed inside the processor element and the communication speed between the processor elements will not disappear in the future. Therefore, it is actually difficult to avoid the plateau phenomenon when a very large number of processor elements are used. However, no direct measures have been taken in the existing libraries.

【0005】スケーラビリティーに優れたアルゴリズム
およびプログラムの開発は、非常に重要であるが、現実
には困難であり、また原理的に不可能であることもあ
る。たとえば、信号処理などでよく使われる高速フーリ
エ変換(FFT)では、すべてのデータに適当な位相因
子を掛け和をとる変換を要素ごとに分解し、いわゆるバ
タフライ演算を実行するが、このとき、個々のバタフラ
イ演算を個々のプロセッサエレメントに割り当てること
はできても、次のバタフライ演算にすすむときには必ず
データをプロセッサエレメント間で交換する必要があ
る。このような問題をデータの非局所性と呼ぶ。データ
の非局所性を考慮した単一アルゴリズムの研究も多くな
されているが、多くの問題でそれは未解決である。
[0005] The development of highly scalable algorithms and programs is very important, but is difficult in practice and sometimes impossible in principle. For example, in fast Fourier transform (FFT), which is often used in signal processing, etc., a so-called butterfly operation is performed by decomposing a transform for summing all data with an appropriate phase factor and performing a so-called butterfly operation. Can be assigned to each processor element, but data must be exchanged between the processor elements when proceeding to the next butterfly operation. Such a problem is called non-locality of data. There have been many studies on single algorithms that take data nonlocality into account, but many problems have not been resolved.

【0006】実用上は、データの非局所性を考慮した最
良の単一アルゴリズムは必ずしも必要ではない。また、
データの非局所性は、データサイズ(問題のサイズ)と
単純な比例関係である場合が多い。すなわち、プロセッ
サエレメントの処理能力とプロセッサエレメント間の通
信速度との間には差があるので、データサイズにより見
掛け上のデータの非局所性は変化する。これに関して
は、これまでの計算機システムはほとんど考慮してこな
かった。現在までに実現されている数学計算ライブラリ
では、データ(問題)に対して適切なアルゴリズムを選
択するのではなく、ユーザが指定したアルゴリズムのサ
ブルーチンが選択されるようになっていた。しかしなが
ら、ユーザの介在なしに最適なアルゴリズムをライブラ
リ側に選択させることも可能である。
[0006] In practice, the best single algorithm considering the nonlocality of data is not always necessary. Also,
Data nonlocality is often a simple proportional relationship to data size (the size of the problem). That is, since there is a difference between the processing capability of the processor element and the communication speed between the processor elements, the apparent non-locality of the data changes depending on the data size. In this regard, computer systems so far have hardly been considered. In the mathematical calculation library implemented to date, a subroutine of an algorithm specified by a user is selected instead of selecting an appropriate algorithm for data (problem). However, it is also possible for the library to select an optimal algorithm without user intervention.

【0007】このようなことから、同じ数学的なデータ
であっても、色々なアルゴリズムからなる複数のサブル
ーチンを用意しておき、これを予め与えられた基準にし
たがってデータに応じて選択してリンクさせるといった
方式も考えられている。しかしながら、このような方式
を含めて、データサイズとデータの見かけ上の非局所性
との問題については、これまでまったく検討されてこな
かった。
For this reason, even if the mathematical data is the same, a plurality of subroutines including various algorithms are prepared, and the subroutines are selected according to the data according to a predetermined reference and linked. There is also a scheme to make it work. However, the problem of data size and apparent non-locality of data, including such a method, has not been studied at all.

【0008】この発明は、このような実情に鑑みてなさ
れたものであり、受け渡されたデータサイズに応じて適
切な数のプロセッサエレメントを使用するサブルーチン
を割り当てるライブラリシステムおよびライブラリの割
り当て方法を提供することを目的とする。
The present invention has been made in view of such circumstances, and provides a library system and a library allocating method for allocating a subroutine that uses an appropriate number of processor elements according to a transferred data size. The purpose is to do.

【0009】[0009]

【課題を解決するための手段】この発明は、前述した目
的を達成するために、使用するプロセッサエレメントの
数がデータサイズに応じて最適化された複数のサブルー
チンを格納するライブラリを設けておき、データが受け
渡されたときに、そのデータのサイズに応じてライブラ
リに格納された複数のサブルーチンの中から最適なサブ
ルーチンを選択して割り当てるようにしたものである。
According to the present invention, a library for storing a plurality of subroutines in which the number of processor elements to be used is optimized according to the data size is provided. When data is transferred, an optimum subroutine is selected from a plurality of subroutines stored in a library and assigned according to the size of the data.

【0010】この発明においては、ユーザが指定する使
用プロセッサエレメント数とは無関係に、ユーザが解こ
うとするデータのサイズに応じて最適な数のプロセッサ
エレメントを使用するサブルーチンが選択されて割り当
てられるため、並列計算機システムの資源を適切に使用
することが可能となる。
In the present invention, a subroutine that uses an optimal number of processor elements is selected and assigned according to the size of data to be solved by the user, regardless of the number of used processor elements specified by the user. Thus, the resources of the parallel computer system can be used appropriately.

【0011】なお、最適なプロセッサエレメントの数
は、並列計算機ごとに異なるため、この発明では、イン
ストールの段階で、性能評価用データを用いてその値を
決定するようにした。すなわち、この発明においては、
並列計算機ごとにカスタマイズが適切に施されることに
なる。
Since the optimum number of processor elements differs for each parallel computer, in the present invention, the value is determined at the installation stage by using performance evaluation data. That is, in the present invention,
Customization will be appropriately performed for each parallel computer.

【0012】[0012]

【発明の実施の形態】以下、図面を参照してこの発明の
実施の形態を説明する。 (第1実施形態)まず、この発明の第1実施形態を説明
する。ここでは、計算機言語としてワークパラレル型処
理言語であるMPI(message passing
interface)と通常のFORTRAN言語と
を用い、計算アルゴリズムとして3次元高速フーリエ変
換(FFT)を使用するアプリケーションプログラムを
例に説明する。図1はこの第1実施形態に係る並列計算
機システムの概略構成図であり、図2はこの並列計算機
システムの動作原理を説明するためのフローチャートで
ある。
Embodiments of the present invention will be described below with reference to the drawings. (First Embodiment) First, a first embodiment of the present invention will be described. Here, MPI (message passing) which is a work parallel processing language as a computer language
An example of an application program using a three-dimensional fast Fourier transform (FFT) as a calculation algorithm will be described using an interface and a normal FORTRAN language. FIG. 1 is a schematic configuration diagram of the parallel computer system according to the first embodiment, and FIG. 2 is a flowchart for explaining the operation principle of the parallel computer system.

【0013】図1に示したように、この第1実施形態の
並列計算機システムは、複数のプロセッサエレメント
(PE)11および入出力制御部(I/O)12から構
成される並列計算機10と、複数のライブラリ21から
構成されるライブラリシステム20とを備えてなる。
As shown in FIG. 1, the parallel computer system according to the first embodiment comprises a parallel computer 10 comprising a plurality of processor elements (PE) 11 and an input / output control unit (I / O) 12; And a library system 20 including a plurality of libraries 21.

【0014】ここで、利用者は、解くべきデータ(問
題)に適した並列・分散処理プログラムをFORTRA
NおよびMPIを使用して作成し、その中でcall文
によって3次元高速フーリエ変換のルーチンを呼び出す
ものとする。利用者は、このプログラムを複数のプロセ
ッサエレメントを持つ並列・分散処理計算機で実行でき
るように、適当なコンパイラでプログラムをコンパイル
し、得られた実行形式のプログラムを使用するプロセッ
サエレメントの数を指定して実行させるものとする。こ
のとき、計算機システムでは、図2で示したフローチャ
ートにしたがって以下のような手順で動作する。
Here, the user prepares a FORTRA parallel / distributed processing program suitable for the data (problem) to be solved.
It is created using N and MPI, in which a call statement is used to call a three-dimensional fast Fourier transform routine. The user compiles the program with an appropriate compiler so that the program can be executed on a parallel / distributed processing computer having multiple processor elements, and specifies the number of processor elements that use the obtained executable program. And execute it. At this time, the computer system operates in the following procedure according to the flowchart shown in FIG.

【0015】利用者の指定にしたがい、計算機オペレー
ティングシステム(OS)は、データを各プロセッサエ
レメントに割り当て(ステップA1)、演算を実行する
(ステップA2〜ステップA4)。その中で、3次元F
FTを実行する際、ライブラリ函数を呼び出すが(ステ
ップA3)、これはすでにコンパイル時点でオブジェク
ト形式のものとリンクされている。このリンクされたF
FTルーチンは一種類ではなく、複数のFFTルーチン
がリンクされている。これは、FFTを並列・分散処理
させると以下のようなパフォーマンス(処理能力)が得
られるからである。
According to the user's designation, the computer operating system (OS) allocates data to each processor element (step A1) and executes an operation (steps A2 to A4). Among them, 3D F
When executing the FT, the library function is called (step A3), which is already linked with the object type at the time of compilation. This linked F
The FT routine is not one type, and a plurality of FFT routines are linked. This is because the following performance (processing capability) can be obtained by performing FFT in parallel and distributed processing.

【0016】図3に、3次元FFT処理にかかる計算時
間とプロセッサエレメントの関係を例示する。通常、並
列・分散処理システムでは、使用するプロセッサエレメ
ントの数を増やしていくと処理時間は短縮できるが、多
くの問題では完全な並列化はできないので、プロセッサ
エレメント間に通信が発生し、このためにあまりに多く
のプロセッサエレメントを使用すると、かえって多くの
処理時間がかかる。すなわち、並列・分散処理システム
での処理時間には、個々のプロセッサエレメントが行な
っている計算時間とプロセッサエレメント間の通信時間
との和になっている。このため、最適な(もっとも処理
時間の短い)プロセッサエレメント数が一般に存在す
る。そして、この発明の特徴は、この最適なプロセッサ
エレメント数に着目した点にある。
FIG. 3 illustrates the relationship between the calculation time required for the three-dimensional FFT processing and the processor elements. Generally, in a parallel / distributed processing system, the processing time can be shortened by increasing the number of processor elements used, but since many problems cannot be completely parallelized, communication occurs between the processor elements. However, if too many processor elements are used, it takes much processing time. That is, the processing time in the parallel / distributed processing system is the sum of the calculation time performed by each processor element and the communication time between the processor elements. For this reason, there is generally an optimum (the shortest processing time) number of processor elements. The feature of the present invention resides in that attention is paid to the optimum number of processor elements.

【0017】しかしながら、図3からわかる通り、この
値は同じ数学的なデータを同じアルゴリズムで解いた場
合に限っても、データのサイズによっても変わる。図3
の例では、変換すべきデータ数が64*64*64の場
合(すなわちx軸方向に64点サンプリング、y軸方向
に64点サンプリング、z軸方向に64点サンプリン
グ)は、16プロセッサエレメント程度(図3のa)で
最も短い計算時間で処理できるが、128*128*1
28のデータでは、32プロセッサエレメント程度(図
3のb)で、さらに256*256*256のデータで
は、64プロセッサエレメント程度(図3のc)が最適
の処理構成となる。すなわち、128*128*128
のデータサイズのFFT演算をさらに多数の128プロ
セッサエレメントで実行すると、最適な32プロセッサ
エレメントの場合に比べて、短縮されるどころか逆に6
倍程度余計に時間がかかってしまう。したがって、計算
機システム側では、いま利用者が行なおうとしているF
FT演算でのデータ数が実引数として与えられた段階で
(確定した段階で)、リンクされている複数のFFTル
ーチンのなかから最適のFFTルーチンを選択し、これ
でFFT演算を実行する(ステップB1〜ステップB
7)。
However, as can be seen from FIG. 3, this value varies depending on the size of the data, even when the same mathematical data is solved by the same algorithm. FIG.
In the example of (1), when the number of data to be converted is 64 * 64 * 64 (that is, sampling of 64 points in the x-axis direction, sampling of 64 points in the y-axis direction, sampling of 64 points in the z-axis direction), about 16 processor elements ( Although processing can be performed in the shortest calculation time in FIG. 3A, 128 * 128 * 1
For data of 28, about 32 processor elements (b in FIG. 3), and for data of 256 * 256 * 256, about 64 processor elements (c in FIG. 3) are the optimum processing configuration. That is, 128 * 128 * 128
When the FFT operation with a data size of is performed by a larger number of 128 processor elements, the FFT operation can be reduced by 6 instead of the optimal case of 32 processor elements.
It takes about twice as much time. Therefore, on the computer system side, F
At the stage where the number of data in the FT operation is given as an actual argument (at the stage where it is determined), the optimum FFT routine is selected from among a plurality of linked FFT routines, and the FFT operation is executed with this (step B1 to Step B
7).

【0018】利用者が指定した使用するプロセッサエレ
メントの数と、その時のデータ数での最適のFFT演算
で使用するプロセッサエレメントの数とが異なる場合
は、データのプロセッサエレメントへの再割り付けが必
要となる。データの再割り付けにはいくつかの方法があ
りうるが、最も簡単には、利用者が指定したすべてのプ
ロセッサエレメントに割り付けられているデータをMP
I_gather函数によって一つのプロセッサエレメ
ントに集め、次にFFTに適した形でMPI_send
函数によって割り当てていけばよい。この割り当て方
は、FFT演算に最適なものとなるべきであるから、た
とえ利用者が指定しているプロセッサエレメント数と最
適なFFT演算での使用プロセッサエレメント数とが同
じになった場合であっても、データの再割り付けは行な
っておくことが望ましい。これは、並列・分散処理系で
は、データをどう割り付けるかによってプロセッサエレ
メント間の通信の発生の仕方が大幅に変わるからであ
る。ただし、このやり方だと、一度すべてのデータを一
つのプロセッサエレメント上に載せることを意味する。
256*256*256は16メガ語であるから、これ
を一つのプロセッサエレメントに載せることは実際には
難しいし、多数個のプロセッサエレメントから一つのプ
ロセッサエレメントにデータをかき集め、これをまた再
分配することは通信量の観点から考えても望ましくな
い。これを回避するには、データを間接アドレッシング
によって参照しつつ適切なプロセッサエレメントに割り
当てることが可能である。すなわち、データそのものは
それぞれにプロセッサエレメントに分散させて保持され
ているが、それがどこにあるかという情報と、それをど
う割り振るかということを、ある特定のプロセッサエレ
メントで行なわせ、そこからの指示でデータを割り付け
ることである。ところが、これはMPI言語では実現す
ることが非常に困難である。それは、MPI言語には、
自分のプロセッサエレメントと他のプロセッサエレメン
トとの間の通信を制御する機能は言語仕様に含まれてい
ても、自分が関係しないプロセッサエレメント間のデー
タ通信を直接制御する手続きは規定されていないからで
ある。これは、特別なプロセッサエレメントを作らない
という視点で作られているMPI言語の長所でもあり短
所でもある。そこで、MPI言語で行なうときには、た
とえば以下のような手続きをとる。
If the number of processor elements to be used specified by the user is different from the number of processor elements to be used in the optimal FFT operation based on the number of data at that time, it is necessary to reassign data to the processor elements. Become. There are several methods for reallocation of data, but the simplest is to assign data allocated to all processor elements specified by the user to MP
Gathered into one processor element by I_gather function, then MPI_send in a form suitable for FFT
Allocate by function. This allocation method should be optimal for the FFT operation, so even if the number of processor elements specified by the user and the number of processor elements used in the optimal FFT operation are the same. However, it is desirable to reallocate data. This is because, in a parallel / distributed processing system, the way of communication between processor elements greatly changes depending on how data is allocated. However, this means that all data is loaded on one processor element once.
Since 256 * 256 * 256 is 16 megawords, it is actually difficult to put it in one processor element, and it collects data from many processor elements to one processor element and redistributes it. This is not desirable from the viewpoint of traffic. To avoid this, it is possible to assign data to the appropriate processor element while referring to it by indirect addressing. That is, the data itself is distributed and stored in each processor element, but information on where it is located and how to allocate it are performed by a specific processor element, and instructions from there are given Is to allocate the data. However, this is very difficult to achieve in the MPI language. It is in the MPI language
Although the function to control communication between one processor element and another processor element is included in the language specification, the procedure to directly control data communication between processor elements not related to the user is not specified. is there. This is both an advantage and a disadvantage of the MPI language, which is made with the view that no special processor element is made. Therefore, when performing in the MPI language, for example, the following procedure is taken.

【0019】3次元FFTでは、データはc(i1,i2,i3)
というような構造をとっているとする。これを1次元的
なデータc (j) に一意的に対応させることが中国式剰余
定理(Chinese remainder theorem )を使って証明する
ことができる。すなわち、cとc′とは1対1対応が取
れており、この対応の仕方は一意的である。この結果、
どのプロセッサエレメントで実行してもこの対応関係は
同じである。この対応関係は、データのサイズさえ決ま
れば一意的に決まるので、これによって事前に対応関係
表を作っておくことができる。したがって、この表をも
とに自分のプロセッサエレメントに格納されているデー
タを適切なプロセッサエレメントに送ることができる。
In the three-dimensional FFT, the data is c (i1, i2, i3)
Suppose you have such a structure. It is possible to prove that this uniquely corresponds to the one-dimensional data c (j) using the Chinese remainder theorem. That is, c and c 'have a one-to-one correspondence, and this correspondence is unique. As a result,
This correspondence is the same no matter which processor element is executed. Since this correspondence is uniquely determined as long as the data size is determined, a correspondence table can be created in advance. Therefore, data stored in the own processor element can be sent to an appropriate processor element based on this table.

【0020】複数のFFTルーチンをリンク時に割り当
てることは容易に可能である。たとえばドライバールー
チンを一つ作り、その中で(FORTRANで書け
ば)、 if(n.le.n1) call fft1(...) if(n.ge.n1.and.n.le.n2) call fft2(...) if(n.ge.n2.and.n.le.n3) c
all fft3(...) … としておけば簡単に実現できる。
It is easy to assign a plurality of FFT routines at link time. For example, create a driver routine and write it in FORTRAN (if (n.le.n1) call fft1 (...) if (n.ge.n1.and.n.le.n2) call fft2 (...) if (n.ge.n2.and.n.le.n3) c
all fft3 (...) can be easily realized.

【0021】(第2実施形態)次に、この発明の第2実
施形態を説明する。アルゴリズムを固定した場合でも、
最適のプロセッサエレメントの数は第1実施形態で述べ
た通り問題のサイズに依存する。これは、個々のプロセ
ッサエレメントの演算速度とプロセッサエレメント間の
通信速度との比率に依存する。この比率は、ハードウェ
アごとに異なるので、この発明のライブラリシステムを
インストールする段階でこの値を決める必要がある。こ
れは、以下のような手順によって容易に実現できる。
(Second Embodiment) Next, a second embodiment of the present invention will be described. Even if the algorithm is fixed,
The optimal number of processor elements depends on the size of the problem as described in the first embodiment. This depends on the ratio between the operation speed of each processor element and the communication speed between the processor elements. Since this ratio differs for each hardware, it is necessary to determine this value at the stage of installing the library system of the present invention. This can be easily realized by the following procedure.

【0022】最適プロセッサエレメントの数は、個々の
プロセッサエレメントの演算能力とプロセッサエレメン
ト間の通信速度の兼ね合いで決まる。これはデータ依存
性はほとんどないので、一連のテストデータを少なくと
も一つ以上準備し、これをインストールするハードウェ
アでプロセッサエレメント数を変化させつつ一通り実行
させることにより、そのハードウェア構成での最適プロ
セッサエレメント数を決定することができる。決定され
た値は、そのままライブラリの実行形式に取り込まれ
て、インストールが完了する。以上の結果、この発明の
ライブラリシステムをインストールする手順は図4に示
したようになる。
The optimal number of processor elements is determined by a balance between the computing power of each processor element and the communication speed between the processor elements. Since there is almost no data dependency, at least one set of test data is prepared and executed by changing the number of processor elements on the hardware on which the test data is installed. The number of processor elements can be determined. The determined values are taken into the executable form of the library as it is, and the installation is completed. As a result, the procedure for installing the library system of the present invention is as shown in FIG.

【0023】また、当然のことであるが、ライブラリ用
のプロセッサエレメントの最適数が装備されているプロ
セッサエレメント総数を超えた場合には、使える限りの
プロセッサエレメントを使うことが処理時間の観点から
は有利となる。したがって、この場合は無条件に利用可
能な最大個数のプロセッサエレメントを使用することに
する。これによって、実行形式のファイルサイズを無駄
に大きくすることがなくなる。
If the optimal number of processor elements for the library exceeds the total number of equipped processor elements, it is natural to use as many processor elements as possible from the viewpoint of processing time. This is advantageous. Therefore, in this case, the maximum number of processor elements that can be used unconditionally is used. As a result, the file size of the executable format is not increased unnecessarily.

【0024】なお、前述したライブラリシステムでは、
同一のアルゴリズムであっても、データのサイズによっ
て最適なプロセッサエレメント数が存在するので、これ
を利用者の指定とは無関係にリンクするといったことを
行なっていたが、複数のアルゴリズムを使用していてる
場合であっても、データのサイズによって最適のプロセ
ッサエレメント数のものをライブラリ側で用意するとい
ったことも当然に有効である。
In the above-described library system,
Even if the same algorithm is used, there is an optimal number of processor elements depending on the data size, so linking was performed independently of the user's specification, but multiple algorithms were used. Even in this case, it is naturally effective to prepare a library having an optimum number of processor elements according to the data size.

【0025】また、前述したライブラリの割り当て手法
は、計算機に実行させることのできるプログラムとし
て、フロッピィディスクやハードディスクなどの磁気デ
ィスク、CD−ROMやDVDなどの光ディスクおよび
半導体メモリなどの記録媒体に格納して頒布することが
可能である。
The above-described library allocating method stores a program, which can be executed by a computer, in a magnetic disk such as a floppy disk or a hard disk, an optical disk such as a CD-ROM or a DVD, or a recording medium such as a semiconductor memory. It is possible to distribute.

【0026】[0026]

【発明の効果】以上詳述したように、この発明によれ
ば、受け渡されたデータのサイズに応じてライブラリに
格納された複数のサブルーチンの中から最適なサブルー
チンが選択されて割り当てられるため、ユーザに負担を
かけることなく、並列計算機システムの資源を最大限に
活用することが可能となる。
As described above in detail, according to the present invention, an optimal subroutine is selected from a plurality of subroutines stored in a library according to the size of transferred data, and is allocated. It is possible to make maximum use of the resources of the parallel computer system without burdening the user.

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

【図1】この発明の第1実施形態に係る並列計算機シス
テムの概略構成図。
FIG. 1 is a schematic configuration diagram of a parallel computer system according to a first embodiment of the present invention.

【図2】同第1実施形態の並列計算機システムの動作原
理を説明するためのフローチャート。
FIG. 2 is a flowchart for explaining the operation principle of the parallel computer system according to the first embodiment;

【図3】同第1実施形態の3次元FFTにおける処理時
間とデータサイズとの関係を示す図。
FIG. 3 is a diagram showing a relationship between processing time and data size in a three-dimensional FFT according to the first embodiment.

【図4】この発明の第2実施形態の並列計算機システム
のインストール時の動作を説明するためのフローチャー
ト。
FIG. 4 is a flowchart for explaining an operation at the time of installation of the parallel computer system according to the second embodiment of this invention;

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

10…並列計算機 11…プロセッサエレメント 12…入出力制御部 20…ライブラリシステム 21…ライブラリ。 DESCRIPTION OF SYMBOLS 10 ... Parallel computer 11 ... Processor element 12 ... Input / output control part 20 ... Library system 21 ... Library.

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 複数個のプロセッサエレメントから構成
される並列計算機に適用されるライブラリシステムにお
いて、 使用するプロセッサエレメントの数がデータサイズに応
じて最適化された複数のサブルーチンを格納するライブ
ラリと、 受け渡されたデータのサイズに応じて前記ライブラリに
格納された複数のサブルーチンの中から最適なサブルー
チンを選択して割り当てる割り当て手段とを具備し、 ユーザが指定する使用プロセッサエレメント数とは無関
係に、ユーザが解こうとするデータに対して最適な数の
プロセッサエレメントを使用するサブルーチンを選択し
て割り当てることを特徴とするライブラリシステム。
A library storing a plurality of subroutines in which the number of processor elements to be used is optimized according to a data size; Allocating means for selecting and allocating an optimal subroutine from a plurality of subroutines stored in the library according to the size of the passed data, and irrespective of the number of used processor elements specified by the user. A library system for selecting and assigning a subroutine that uses an optimal number of processor elements for data to be solved.
【請求項2】 互いに異なるサイズをもつ複数のデータ
を組とした少なくとも一組以上の性能評価用データと、 使用するプロセッサエレメントの数を変えながら前記性
能評価用データを一通り処理していき、前記使用するプ
ロセッサエレメントの数それぞれでの処理時間を計測す
る計測手段と、 前記計測手段の計測結果からデータサイズと最適な使用
プロセッサエレメント数との関係を算出する関係算出手
段と、 前記関係算出手段の算出結果からデータサイズそれぞれ
に応じた最適なプロセッサエレメント数を決定する決定
手段とをさらに具備し、 複数のプロセッサエレメントから構成される並列計算機
に当該ライブラリシステムを導入するときに、その並列
計算機に適合させることを特徴とする請求項1記載のラ
イブラリシステム。
2. At least one set of performance evaluation data, which is a set of a plurality of data having mutually different sizes, and the performance evaluation data are processed in a general manner while changing the number of processor elements used. Measuring means for measuring the processing time for each of the number of used processor elements; relation calculating means for calculating the relation between the data size and the optimum number of used processor elements from the measurement result of the measuring means; and the relation calculating means Deciding means for deciding the optimum number of processor elements according to each data size from the calculation result of the above, when introducing the library system into a parallel computer composed of a plurality of processor elements, The library system according to claim 1, wherein the library system is adapted.
【請求項3】 請求項1または2記載のライブラリシス
テムを備えた複数個のプロセッサエレメントから構成さ
れる並列計算機システム。
3. A parallel computer system comprising a plurality of processor elements provided with the library system according to claim 1.
【請求項4】 複数個のプロセッサエレメントから構成
される並列計算機システムにおいて、 使用するプロセッサエレメントの数がデータサイズに応
じて最適化された複数のサブルーチンを格納するライブ
ラリと、 受け渡されたデータのサイズに応じて前記ライブラリに
格納された複数のサブルーチンの中から最適なサブルー
チンを選択して割り当てる割り当て手段とを具備し、 ユーザが指定する使用プロセッサエレメント数とは無関
係に、ユーザが解こうとするデータに対して最適な数の
プロセッサエレメントを使用するサブルーチンを選択し
て割り当てることを特徴とする並列計算機システム。
4. In a parallel computer system comprising a plurality of processor elements, a library for storing a plurality of subroutines in which the number of used processor elements is optimized according to a data size; Allocating means for selecting and allocating an optimal subroutine from a plurality of subroutines stored in the library according to the size, wherein the user attempts to solve the subroutine regardless of the number of used processor elements specified by the user. A parallel computer system wherein a subroutine using an optimal number of processor elements is selected and assigned to data.
【請求項5】 互いに異なるサイズをもつ複数のデータ
を組とした少なくとも一組以上の性能評価用データと、 使用するプロセッサエレメントの数を変えながら前記性
能評価用データを一通り処理していき、前記使用するプ
ロセッサエレメントの数それぞれでの処理時間を計測す
る計測手段と、 前記計測手段の計測結果からデータサイズと最適な使用
プロセッサエレメント数との関係を算出する関係算出手
段と、 前記関係算出手段の算出結果からデータサイズそれぞれ
に応じた最適なプロセッサエレメント数を決定する決定
手段とをさらに具備したことを特徴とする請求項4記載
の並列計算機システム。
5. At least one or more sets of performance evaluation data, each of which is a set of a plurality of data having different sizes, and processing the performance evaluation data while changing the number of processor elements to be used. Measuring means for measuring the processing time for each of the number of used processor elements; relation calculating means for calculating the relation between the data size and the optimum number of used processor elements from the measurement result of the measuring means; and the relation calculating means 5. The parallel computer system according to claim 4, further comprising: a determination unit configured to determine an optimum number of processor elements according to each data size from the calculation result.
【請求項6】 複数のサブルーチンを格納するライブラ
リを備え、複数個のプロセッサエレメントから構成され
る並列計算機に適用されるライブラリの割当て方法にお
いて、 使用するプロセッサエレメントの数を変えながら、互い
に異なるサイズをもつ複数のデータを組とした少なくと
も一組以上の性能評価用データを一通り処理していき、
前記使用するプロセッサエレメントの数それぞれでの処
理時間を計測するステップと、 前記計測結果からデータサイズと最適な使用プロセッサ
エレメント数との関係を算出するステップと、 前記算出結果から前記ライブラリに格納されるサブルー
チンが使用するプロセッサエレメントの数をデータサイ
ズに応じて最適化するステップと、 受け渡されたデータのサイズに応じて前記ライブラリに
格納された複数のサブルーチンの中から最適なサブルー
チンを選択して割り当てるステップとからなることを特
徴とするライブラリの割当て方法。
6. A method for allocating a library which includes a library for storing a plurality of subroutines and is applied to a parallel computer comprising a plurality of processor elements, wherein different sizes are used while changing the number of processor elements to be used. Process at least one set of performance evaluation data, which is a set of multiple data sets,
Measuring the processing time for each of the number of used processor elements; calculating the relationship between the data size and the optimal number of used processor elements from the measurement result; storing in the library from the calculation result Optimizing the number of processor elements used by the subroutine according to the data size; and selecting and allocating an optimal subroutine from a plurality of subroutines stored in the library according to the size of the transferred data. And a library allocating method.
【請求項7】 使用するプロセッサエレメントの数がデ
ータサイズに応じて最適化された複数のサブルーチンを
格納するライブラリを備え、複数個のプロセッサエレメ
ントから構成される並列計算機に適用されるライブラリ
の割当て方法において、 受け渡されたデータのサイズに応じて前記ライブラリに
格納された複数のサブルーチンの中から最適なサブルー
チンを選択して割り当てるステップからなることを特徴
とするライブラリの割当て方法。
7. A method for allocating a library, comprising: a library for storing a plurality of subroutines in which the number of processor elements to be used is optimized according to a data size, wherein the library is applied to a parallel computer composed of a plurality of processor elements. 3. The method of allocating a library according to claim 1, further comprising the step of selecting and allocating an optimal subroutine from a plurality of subroutines stored in the library according to the size of the transferred data.
【請求項8】 複数のサブルーチンを格納するライブラ
リを備え、複数個のプロセッサエレメントから構成され
る並列計算機上で前記サブルーチンを割り当て制御する
プログラムであって、 使用するプロセッサエレメントの数を変えながら、互い
に異なるサイズをもつ複数のデータを組とした少なくと
も一組以上の性能評価用データを一通り処理していき、
前記使用するプロセッサエレメントの数それぞれでの処
理時間を計測し、 前記計測結果からデータサイズと最適な使用プロセッサ
エレメント数との関係を算出し、 前記算出結果から前記ライブラリに格納されるサブルー
チンが使用するプロセッサエレメントの数をデータサイ
ズに応じて最適化し、 受け渡されたデータのサイズに応じて前記ライブラリに
格納された複数のサブルーチンの中から最適なサブルー
チンを選択して割り当てるように前記並列計算機を動作
させるプログラムを記録した計算機読み取り可能な記録
媒体。
8. A program for allocating and controlling the subroutines on a parallel computer comprising a plurality of processor elements, the library comprising a library for storing a plurality of subroutines, wherein Process at least one set of performance evaluation data, which is a set of multiple data having different sizes,
A processing time is measured for each of the used processor elements, a relationship between a data size and an optimum number of used processor elements is calculated from the measurement result, and a subroutine stored in the library is used from the calculation result. The number of processor elements is optimized according to the data size, and the parallel computer is operated so as to select and allocate an optimal subroutine from a plurality of subroutines stored in the library according to the size of the transferred data. A computer-readable recording medium on which a program to be recorded is recorded.
【請求項9】 使用するプロセッサエレメントの数がデ
ータサイズに応じて最適化された複数のサブルーチンを
格納するライブラリを備え、複数個のプロセッサエレメ
ントから構成される並列計算機上で前記サブルーチンを
割り当て制御するプログラムであって、 受け渡されたデータのサイズに応じて前記ライブラリに
格納された複数のサブルーチンの中から最適なサブルー
チンを選択して割り当てるように前記並列計算機を動作
させるプログラムを記録した計算機読み取り可能な記録
媒体。
9. A library for storing a plurality of subroutines in which the number of processor elements to be used is optimized according to the data size, and the subroutine is allocated and controlled on a parallel computer composed of a plurality of processor elements. A computer readable program recording a program for operating the parallel computer so as to select and assign an optimal subroutine from a plurality of subroutines stored in the library according to the size of the transferred data; Recording medium.
JP18972797A 1997-07-15 1997-07-15 Library system and method for assigning library Pending JPH1139271A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18972797A JPH1139271A (en) 1997-07-15 1997-07-15 Library system and method for assigning library

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18972797A JPH1139271A (en) 1997-07-15 1997-07-15 Library system and method for assigning library

Publications (1)

Publication Number Publication Date
JPH1139271A true JPH1139271A (en) 1999-02-12

Family

ID=16246188

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18972797A Pending JPH1139271A (en) 1997-07-15 1997-07-15 Library system and method for assigning library

Country Status (1)

Country Link
JP (1) JPH1139271A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009104373A (en) * 2007-10-23 2009-05-14 Nec Corp Parallel computer system, information processor, job management method, and job management program
US7730119B2 (en) 2006-07-21 2010-06-01 Sony Computer Entertainment Inc. Sub-task processor distribution scheduling
US8281325B2 (en) 2004-11-11 2012-10-02 Japan Science And Technology Agency Computing system including user program system executing user program and library program system, executing library programs to be used in user program, computing method, user program system, library program system, and storage medium containing program
WO2013024597A1 (en) * 2011-08-15 2013-02-21 日本電気株式会社 Distributed processing management device and distributed processing management method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8281325B2 (en) 2004-11-11 2012-10-02 Japan Science And Technology Agency Computing system including user program system executing user program and library program system, executing library programs to be used in user program, computing method, user program system, library program system, and storage medium containing program
US7730119B2 (en) 2006-07-21 2010-06-01 Sony Computer Entertainment Inc. Sub-task processor distribution scheduling
JP2009104373A (en) * 2007-10-23 2009-05-14 Nec Corp Parallel computer system, information processor, job management method, and job management program
WO2013024597A1 (en) * 2011-08-15 2013-02-21 日本電気株式会社 Distributed processing management device and distributed processing management method
JPWO2013024597A1 (en) * 2011-08-15 2015-03-05 日本電気株式会社 Distributed processing management apparatus and distributed processing management method

Similar Documents

Publication Publication Date Title
TWI525540B (en) Mapping processing logic having data-parallel threads across processors
US20160328266A1 (en) Process grouping for improved cache and memory affinity
Pérez et al. Simplifying programming and load balancing of data parallel applications on heterogeneous systems
US20110035737A1 (en) Saving and loading graphical processing unit (gpu) arrays
EP3126971A1 (en) Program execution on heterogeneous platform
JP2004110809A (en) Method and system for multiprocessor emulation on multiprocessor host system
JP2010170572A (en) Reconfigurable programmable logic device computer system
JP2669603B2 (en) Code generation method in compiler and compiler
JP2014524607A (en) Techniques for compiling and executing high-level programs on heterogeneous computers
US20060136878A1 (en) Method and apparatus for enabling compiler and run-time optimizations for data flow applications in multi-core architectures
US20200125411A1 (en) Detection, modeling and application of memory bandwith patterns
Hormati et al. Macross: Macro-simdization of streaming applications
Zhang et al. An adaptive breadth-first search algorithm on integrated architectures
Balis et al. Porting HPC applications to the cloud: A multi-frontal solver case study
Bastem et al. Overlapping data transfers with computation on GPU with tiles
JP6488739B2 (en) Parallelizing compilation method and parallelizing compiler
JPH1139271A (en) Library system and method for assigning library
Li et al. A compound OpenMP/MPI program development toolkit for hybrid CPU/GPU clusters
Asahi et al. Performance portable Vlasov code with C++ parallel algorithm
WO2022253451A1 (en) Task-centric job scheduling method and system for heterogeneous clusters
Wang et al. Clustered workflow execution of retargeted data analysis scripts
Tarakji et al. The development of a scheduling system GPUSched for graphics processing units
Lohrmann et al. Programmable in situ system for iterative workflows
Tithi et al. SU3_Bench on a Programmable Integrated Unified Memory Architecture (PIUMA) and How that Differs from Standard NUMA CPUs
Oden et al. Implementation and Evaluation of CUDA-Unified Memory in Numba

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Effective date: 20040622

Free format text: JAPANESE INTERMEDIATE CODE: A131

A521 Written amendment

Effective date: 20040818

Free format text: JAPANESE INTERMEDIATE CODE: A523

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040922

A131 Notification of reasons for refusal

Effective date: 20050607

Free format text: JAPANESE INTERMEDIATE CODE: A131

A521 Written amendment

Effective date: 20050808

Free format text: JAPANESE INTERMEDIATE CODE: A523

A131 Notification of reasons for refusal

Effective date: 20060322

Free format text: JAPANESE INTERMEDIATE CODE: A131

A521 Written amendment

Effective date: 20060522

Free format text: JAPANESE INTERMEDIATE CODE: A523

A02 Decision of refusal

Effective date: 20061024

Free format text: JAPANESE INTERMEDIATE CODE: A02