JP4299228B2 - Library conversion program - Google Patents

Library conversion program Download PDF

Info

Publication number
JP4299228B2
JP4299228B2 JP2004358144A JP2004358144A JP4299228B2 JP 4299228 B2 JP4299228 B2 JP 4299228B2 JP 2004358144 A JP2004358144 A JP 2004358144A JP 2004358144 A JP2004358144 A JP 2004358144A JP 4299228 B2 JP4299228 B2 JP 4299228B2
Authority
JP
Japan
Prior art keywords
library
function
parallel
sequential
link structure
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.)
Expired - Fee Related
Application number
JP2004358144A
Other languages
Japanese (ja)
Other versions
JP2006164142A (en
Inventor
由江 稲田
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 JP2004358144A priority Critical patent/JP4299228B2/en
Publication of JP2006164142A publication Critical patent/JP2006164142A/en
Application granted granted Critical
Publication of JP4299228B2 publication Critical patent/JP4299228B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Devices For Executing Special Programs (AREA)

Description

この発明は、プログラム上のライブラリに含まれる関数を異なるライブラリの関数に変換するライブラリ変換プログラムに関し、特に変換前のライブラリ中の関数にかかる関数名と変換対象のライブラリ中の関数にかかる関数名が一致しなくとも関数を容易に変換可能とするライブラリ変換プログラムに関するものである。   The present invention relates to a library conversion program for converting a function included in a library on a program into a function of a different library, and in particular, a function name related to a function in a library before conversion and a function name related to a function in a library to be converted are The present invention relates to a library conversion program that can easily convert functions even if they do not match.

従来、プログラム上で使用されるライブラリ中の関数を、異なるライブラリの関数に変換し、プログラムを効率よく実行させるライブラリ変換装置が利用されている。   2. Description of the Related Art Conventionally, a library conversion apparatus that converts a function in a library used on a program into a function of a different library and efficiently executes the program has been used.

具体的に、このライブラリ変換装置は、変換前のライブラリ中の関数に対する関数名や機能が変換対象となるライブラリ中の関数の関数名や機能と同様である場合に、変換前のライブラリに対するリンク先を変換対象となるライブラリに変更することによって、ライブラリ中の関数を異なるライブラリの関数に変換している(例えば非特許文献1参照)。   Specifically, this library conversion device links to the library before conversion when the function name and function for the function in the library before conversion are the same as the function name and function of the function in the library to be converted. Is changed to a library to be converted, so that functions in the library are converted into functions of different libraries (see, for example, Non-Patent Document 1).

富士通株式会社、“Parallelnavi 2.x”、[online]、[平成16年11月18日検索]、インターネット<URL:http://primeserver.fujitsu.com/primepower/products/soft/opt/paranavi_2x/>Fujitsu Limited, “Parallelnavi 2.x”, [online], [searched on November 18, 2004], Internet <URL: http://primeserver.fujitsu.com/primepower/products/soft/opt/paranavi_2x/ >

しかしながら、かかる従来の技術では、変換前のライブラリ中の関数に対する関数名が変換対象となるライブラリ中の関数の関数名と異なる場合には、容易に変換前のライブラリ中の関数を変換対象となるライブラリ中の関数に変換することができないという問題があった。   However, in the conventional technique, when the function name for the function in the library before conversion is different from the function name of the function in the library to be converted, the function in the library before conversion is easily converted. There was a problem that it could not be converted to a function in the library.

すなわち、変換前のライブラリ中の関数に対する関数名と変換対象となるライブラリ中の関数の関数名が異なる場合には、ユーザが変換前のライブラリ中の関数の関数名を変換対象となるライブラリの関数に対応するようにわざわざプログラムを修正する必要があった。   In other words, if the function name for the function in the library before conversion differs from the function name of the function in the library to be converted, the function name of the function in the library to be converted by the user is changed. It was necessary to modify the program to cope with this.

この発明は、上述した従来技術による問題点を解消するためになされたものであり、変換前のライブラリ中の関数にかかる関数名と変換対象のライブラリ中の関数にかかる関数名とが一致しなくとも関数を容易に変換可能とするライブラリ変換プログラムを提供することを目的とする。   The present invention has been made to solve the above-described problems caused by the prior art, and the function name applied to the function in the library before conversion does not match the function name applied to the function in the library to be converted. It is an object of the present invention to provide a library conversion program capable of easily converting functions.

上述した課題を解決し、目的を達成するため、請求項1の発明に係るライブラリ変換プログラムは、プログラム上のライブラリに含まれる関数を異なるライブラリの関数に変換するライブラリ変換プログラムであって、ライブラリに含まれる関数と該ライブラリと異なるライブラリに含まれる関数とを関連付けた情報であるライブラリリンク構造情報を生成するリンク構造情報生成手順と、前記ライブラリリンク構造情報を基にして、ライブラリに含まれる関数を異なるライブラリで同等の機能を有する関数に変換する変換処理手順と、をコンピュータに実行させることを特徴とする。   In order to solve the above-described problems and achieve the object, a library conversion program according to the invention of claim 1 is a library conversion program for converting a function included in a library on the program into a function of a different library, and A link structure information generation procedure for generating library link structure information, which is information relating a function included in the library and a function included in a library different from the library, and a function included in the library based on the library link structure information. A conversion processing procedure for converting into a function having an equivalent function in a different library is executed by a computer.

この請求項1の発明によれば、ライブラリ変換プログラムは、ライブラリに含まれる関数と該ライブラリと異なるライブラリに含まれる関数とを関連付けた情報であるライブラリリンク構造情報を生成し、生成したライブラリリンク構造情報を基にして、ライブラリに含まれる関数を異なるライブラリで同等の機能を有する関数に変換する。   According to the first aspect of the present invention, the library conversion program generates library link structure information, which is information associating a function included in a library with a function included in a library different from the library, and generates the generated library link structure Based on the information, a function included in the library is converted into a function having an equivalent function in a different library.

また、請求項2の発明に係るライブラリ変換プログラムは、請求項1の発明において、前記リンク構造情報生成手順は、逐次ライブラリに含まれる関数と並列ライブラリに含まれる関数とを関連付けたライブラリリンク構造情報を生成し、前記変換処理手順は、前記ライブラリリンク構造情報を基にして、逐次ライブラリに含まれる関数を並列ライブラリで同等の機能を有する関数に変換することを特徴とする。   According to a second aspect of the present invention, there is provided the library conversion program according to the first aspect, wherein the link structure information generation procedure associates a function included in the sequential library with a function included in the parallel library. And the conversion processing procedure converts a function included in the sequential library into a function having an equivalent function in a parallel library based on the library link structure information.

この請求項2の発明によれば、ライブラリ変換プログラムは、逐次ライブラリに含まれる関数と並列ライブラリに含まれる関数とを関連付けたライブラリリンク構造情報を生成し、生成したライブラリリンク構造情報を基にして、逐次ライブラリに含まれる関数を並列ライブラリで同等の機能を有する関数に変換する。   According to the invention of claim 2, the library conversion program generates the library link structure information in which the function included in the sequential library and the function included in the parallel library are associated with each other, and based on the generated library link structure information The function included in the sequential library is converted into a function having an equivalent function in the parallel library.

また、請求項3の発明に係るライブラリ変換プログラムは、請求項2の発明において、前記リンク構造情報生成手順は、前記逐次ライブラリに含まれる関数と関連付ける並列ライブラリの関数の精度および性能の情報を含んだ関連付先情報を取得する関連付先情報取得手順と、前記関連付先情報を基にして、前記逐次ライブラリの関数と並列ライブラリの関数とが1対1または多対1に関連付けられた情報であるライブラリリンク構造情報を生成するリンク生成手順とをさらにコンピュータに実行させることを特徴とする。   According to a third aspect of the present invention, in the library conversion program according to the second aspect of the invention, the link structure information generation procedure includes information on accuracy and performance of the functions of the parallel library associated with the functions included in the sequential library. Information on the association destination information acquisition procedure for acquiring association destination information, and information in which the functions of the sequential library and the functions of the parallel library are associated one-to-one or many-to-one based on the association destination information. And a link generation procedure for generating the library link structure information as described above.

この請求項3の発明によれば、ライブラリ変換プログラムは、逐次ライブラリに含まれる関数と関連付ける並列ライブラリの関数の精度および性能の情報を含んだ関連付先情報を取得し、該関連付先情報を基にして、逐次ライブラリの関数と並列ライブラリの関数とが1対1または多対1に関連付けられた情報であるライブラリリンク構造情報を生成し、生成したライブラリリンク構造情報を基にして、逐次ライブラリに含まれる関数を並列ライブラリで同等の機能を有する関数に変換する。   According to the invention of claim 3, the library conversion program obtains related destination information including accuracy and performance information of the functions of the parallel library associated with the functions included in the sequential library, and the related destination information is obtained. Based on the generated library link structure information, the library link structure information that is a one-to-one or many-to-one association between the function of the sequential library and the function of the parallel library is generated. Are converted into functions having equivalent functions in the parallel library.

また、請求項4の発明に係るライブラリ変換プログラムは、請求項2または3に記載の発明において、前記逐次ライブラリの関数に関連付けられる並列ライブラリの関数に対する入力データのデータ分割形式を解読し、前記並列ライブラリの関数の並列プロセスに利用されるデータを分割分配する分割関数を生成すると共に、該分割関数を前記プログラムに追加する分割関数生成手順をさらにコンピュータに実行させることを特徴とする。   According to a fourth aspect of the present invention, there is provided a library conversion program according to the second or third aspect of the present invention, wherein the data partition format of input data for a function of a parallel library associated with a function of the sequential library is decoded. A split function for splitting and distributing data used for a parallel process of library functions is generated, and a split function generating procedure for adding the split function to the program is further executed by the computer.

この請求項4の発明によれば、ライブラリ変換プログラムは、逐次ライブラリ関数に関連付けられる並列ライブラリの関数に対する入力データのデータ分割形式を解読し、並列ライブラリの関数の並列プロセスに利用されるデータを分割分配する分割関数を生成すると共に、分割関数をプログラムに追加する。   According to the invention of claim 4, the library conversion program decodes the data division format of the input data for the function of the parallel library associated with the sequential library function, and divides the data used for the parallel process of the function of the parallel library. A split function to be distributed is generated and the split function is added to the program.

また、請求項5の発明に係るライブラリ変換プログラムは、請求項2、3または4に記載の発明において、前記逐次ライブラリの関数に関連付けられる並列ライブラリの関数に対する出力データのデータ分割形式を解読し、前記並列ライブラリの関数の並列プロセスから分割されたデータを収集し結合する収集関数を生成すると共に、該収集関数を前記プログラムに追加する収集関数生成手順をさらにコンピュータに実行させることを特徴とする。   Further, the library conversion program according to the invention of claim 5 decodes the data division format of the output data for the function of the parallel library associated with the function of the sequential library in the invention of claim 2, 3 or 4. A collection function for collecting and combining data divided from parallel processes of functions of the parallel library is generated, and a collection function generation procedure for adding the collection function to the program is further executed by the computer.

この請求項5の発明によれば、ライブラリ変換プログラムは、逐次ライブラリの関数に関連付けられる並列ライブラリの関数に対する出力データのデータ分割形式を解読し、並列ライブラリの関数の並列プロセスから分割されたデータを収集し結合する収集関数を生成すると共に、収集関数をプログラムに追加する。   According to the invention of claim 5, the library conversion program decodes the data division format of the output data for the function of the parallel library associated with the function of the sequential library, and converts the data divided from the parallel process of the function of the parallel library. Generate collection functions to collect and combine and add collection functions to the program.

請求項1の発明によれば、ライブラリ変換プログラムは、ライブラリに含まれる関数と該ライブラリと異なるライブラリに含まれる関数とを関連付けた情報であるライブラリリンク構造情報を生成し、生成したライブラリリンク構造情報を基にして、ライブラリに含まれる関数を異なるライブラリで同等の機能を有する関数に変換するので、変換前のライブラリの関数と、変換後のライブラリの関数との関数名が異なっていても効率よく関数を変換することができる。   According to the first aspect of the present invention, the library conversion program generates library link structure information which is information associating a function included in a library with a function included in a library different from the library, and generates the generated library link structure information. Since the functions included in the library are converted into functions having equivalent functions in different libraries, it is efficient even if the function names of the library functions before conversion and the functions of the library after conversion are different. Function can be converted.

また、請求項2の発明によれば、ライブラリ変換プログラムは、逐次ライブラリに含まれる関数と並列ライブラリに含まれる関数とを関連付けたライブラリリンク構造情報を生成し、生成したライブラリリンク構造情報を基にして、逐次ライブラリに含まれる関数を並列ライブラリで同等の機能を有する関数に変換するので、変換前の逐次ライブラリの関数と、変換後の並列ライブラリの関数との関数名が異なっていても効率よく関数を変換することができる。   According to the invention of claim 2, the library conversion program generates library link structure information in which functions included in the sequential library and functions included in the parallel library are associated with each other, and based on the generated library link structure information. Since the functions included in the sequential library are converted to functions having the same functions in the parallel library, even if the function names of the functions of the sequential library before conversion and the functions of the parallel library after conversion are different, it is efficient. Function can be converted.

また、請求項3の発明によれば、ライブラリ変換プログラムは、逐次ライブラリに含まれる関数と関連付ける並列ライブラリの関数の精度および性能の情報を含んだ関連付先情報を取得し、該関連付先情報を基にして、逐次ライブラリの関数と並列ライブラリの関数とが1対1または多対1に関連付けられた情報であるライブラリリンク構造情報を生成し、生成したライブラリリンク構造情報を基にして、逐次ライブラリに含まれる関数を並列ライブラリで同等の機能を有する関数に変換するので、変換前の逐次ライブラリの関数と、変換後の並列ライブラリの関数との機能が異なっていても効率よく関数を変換することができる。   According to the invention of claim 3, the library conversion program obtains related destination information including accuracy and performance information of the functions of the parallel library to be associated with the functions included in the sequential library, and the related destination information Based on the above, library link structure information that is a one-to-one or many-to-one association between the functions of the sequential library and the parallel library is generated, and the library link structure information is sequentially generated based on the generated library link structure information. Since the functions included in the library are converted into functions having equivalent functions in the parallel library, even if the functions of the sequential library function before conversion and the functions of the parallel library after conversion are different, the function is efficiently converted. be able to.

また、請求項4の発明によれば、ライブラリ変換プログラムは、逐次ライブラリ関数に関連付けられる並列ライブラリの関数に対する入力データのデータ分割形式を解読し、並列ライブラリの関数の並列プロセスに利用されるデータを分割分配する分割関数を生成すると共に、分割関数をプログラムに追加するので、ユーザは、並列プログラムのノウハウを知らなくとも容易に並列プログラムを作成することができる。   According to the invention of claim 4, the library conversion program decodes the data division format of the input data for the function of the parallel library associated with the sequential library function, and converts the data used for the parallel process of the function of the parallel library. Since the dividing function to be divided and generated is generated and the dividing function is added to the program, the user can easily create the parallel program without knowing the know-how of the parallel program.

また、請求項5の発明によれば、ライブラリ変換プログラムは、逐次ライブラリの関数に関連付けられる並列ライブラリの関数に対する出力データのデータ分割形式を解読し、並列ライブラリの関数の並列プロセスから分割されたデータを収集し結合する収集関数を生成すると共に、収集関数をプログラムに追加するので、ユーザは、並列プログラムのノウハウを知らなくとも容易に並列プログラムを作成することができる。   According to the invention of claim 5, the library conversion program decodes the data division format of the output data for the function of the parallel library associated with the function of the sequential library, and the data divided from the parallel process of the function of the parallel library Since the collection function that collects and combines these is generated and the collection function is added to the program, the user can easily create a parallel program without knowing the know-how of the parallel program.

以下に添付図面を参照して、この発明に係るライブラリ変換プログラムの好適な実施の形態を詳細に説明する。   Exemplary embodiments of a library conversion program according to the present invention will be described below in detail with reference to the accompanying drawings.

まず、本実施例にかかるライブラリ変換の概念について説明する。本実施例に示すライブラリ変換装置は、プログラム上に存在する逐次ライブラリの関数(以下、逐次ライブラリ関数)の変換対象となる並列ライブラリの関数(以下、並列ライブラリ関数)を選択/変換すると共に、変換後の並列ライブラリ関数の前後に分割データを分割/収集する関数を追加する。   First, the concept of library conversion according to this embodiment will be described. The library conversion apparatus shown in the present embodiment selects / converts and converts a parallel library function (hereinafter referred to as a parallel library function) to be converted into a sequential library function (hereinafter referred to as a sequential library function) existing in the program. A function for dividing / collecting the divided data is added before and after the later parallel library function.

なお、本実施例では一例として、逐次ライブラリ関数を並列ライブラリ関数に変換する場合を示すが、これに限定されるものではなく、例えば、逐次ライブラリ関数を異なる逐次ライブラリ関数に変換することができる。   In this embodiment, as an example, a case where a sequential library function is converted into a parallel library function is shown. However, the present invention is not limited to this. For example, a sequential library function can be converted into a different sequential library function.

次に、本実施例に示すライブラリ変換装置の構成について説明する。図1は、本実施例に示すライブラリ変換装置の構成を示す機能ブロック図である。同図に示すように、このライブラリ変換装置100は、キーボードやマウスなどの入力装置40およびディスプレイなどの表示装置50に接続されている。   Next, the configuration of the library conversion apparatus shown in the present embodiment will be described. FIG. 1 is a functional block diagram showing the configuration of the library conversion apparatus shown in this embodiment. As shown in the figure, the library conversion device 100 is connected to an input device 40 such as a keyboard and a mouse and a display device 50 such as a display.

また、ライブラリ変換装置100は、前処理部200と、記憶部300と、後処理部400とを有する。前処理部200は、逐次ライブラリ関数の関数名や引数などの関係を示す逐次ライブラリテーブルと、並列ライブラリ関数の関数名、引数、精度、特性などの関係を示す並列ライブラリテーブルとを生成する処理部である(並列ライブラリテーブルは、入力装置40から入力される並列ライブラリ関数の精度や特性などの情報を基にして生成される)。   The library conversion apparatus 100 includes a preprocessing unit 200, a storage unit 300, and a postprocessing unit 400. The pre-processing unit 200 generates a sequential library table that indicates the relationship between the function name and argument of the sequential library function and a parallel library table that indicates the relationship between the function name, argument, precision, and characteristics of the parallel library function. (The parallel library table is generated based on information such as accuracy and characteristics of the parallel library function input from the input device 40).

さらに、前処理部200は、生成した逐次ライブラリテーブルと並列ライブラリテーブルとを表示装置50に表示し、各ライブラリ間で機能の等しい関数の情報を入力装置40から取得する(ユーザが表示装置50に表示された情報を基にして、各ライブラリ間で機能の等しい関数の情報を入力装置40から入力する)。   Further, the preprocessing unit 200 displays the generated sequential library table and parallel library table on the display device 50, and acquires information on functions having the same function between the libraries from the input device 40 (the user enters the display device 50). Based on the displayed information, function information having the same function between the libraries is input from the input device 40).

そして、前処理部200は、取得した情報を基に逐次ライブラリテーブルの逐次ライブラリ関数と並列ライブラリテーブルの並列ライブラリ関数とを関連付け、関連付けた情報を逐次/並列ライブラリリンク構造情報300aとして記憶部300に記憶させる。   The preprocessing unit 200 associates the sequential library function of the sequential library table with the parallel library function of the parallel library table based on the acquired information, and stores the associated information in the storage unit 300 as the sequential / parallel library link structure information 300a. Remember.

記憶部300は、逐次/並列ライブラリリンク構造情報300aおよびライブラリ関数の変換対象となるプログラム300bとを記憶する記憶部である。   The storage unit 300 is a storage unit that stores sequential / parallel library link structure information 300a and a program 300b to be converted into a library function.

後処理部400は、プログラム300bに含まれる逐次ライブラリ関数を並列ライブラリ関数に変換する処理部である。具体的に、この後処理部400は、プログラム300bの逐次ライブラリ関数に関連付けられた並列ライブラリ関数を逐次/並列ライブラリリンク構造情報300aから検索し、検索した並列ライブラリ関数と、対応する逐次ライブラリ関数とを置換する。なお、後処理部400は、並列ライブラリ関数に対応する分割データが存在する場合には、分割データを分散/収集する関数を並列ライブラリ関数の前後に追加する。   The post-processing unit 400 is a processing unit that converts a sequential library function included in the program 300b into a parallel library function. Specifically, the post-processing unit 400 retrieves the parallel library function associated with the sequential library function of the program 300b from the sequential / parallel library link structure information 300a, and searches the retrieved parallel library function and the corresponding sequential library function. Is replaced. Note that when there is divided data corresponding to the parallel library function, the post-processing unit 400 adds a function for distributing / collecting the divided data before and after the parallel library function.

次に、図1に示した前処理部200の構成について説明する。図2は、図1に示した前処理部200の構成を示す機能ブロック図である。同図に示すように、前処理部200は、逐次ライブラリ情報記憶部210と、逐次ライブラリテーブル生成部220と、逐次ライブラリテーブル記憶部230と、並列ライブラリ情報記憶部240と、並列ライブラリテーブル生成部250と、並列ライブラリテーブル記憶部260と、逐次/並列ライブラリ初期リンク生成部270とを有する。   Next, the configuration of the preprocessing unit 200 illustrated in FIG. 1 will be described. FIG. 2 is a functional block diagram showing the configuration of the preprocessing unit 200 shown in FIG. As shown in the figure, the preprocessing unit 200 includes a sequential library information storage unit 210, a sequential library table generation unit 220, a sequential library table storage unit 230, a parallel library information storage unit 240, and a parallel library table generation unit. 250, a parallel library table storage unit 260, and a sequential / parallel library initial link generation unit 270.

逐次ライブラリ情報記憶部210は、逐次ライブラリ関数の関数名や引数の情報を記憶する記憶部であり、逐次ライブラリテーブル生成部220は、逐次ライブラリ情報記憶部210に記憶された逐次ライブラリ関数の関数名や引数の情報を基にして、逐次ライブラリテーブルを作成する処理部である。   The sequential library information storage unit 210 is a storage unit that stores function name and argument information of the sequential library function. The sequential library table generation unit 220 is a function name of the sequential library function stored in the sequential library information storage unit 210. And a processing unit that sequentially creates a library table based on the argument information.

図3は、逐次ライブラリテーブルの一例を示す図である。同図に示すように、この逐次ライブラリテーブルは、「関数名」、「引数の数」および「引数1〜6」から構成される。ここで、「関数名」には逐次ライブラリ関数の名前が登録され、「引数の数」には逐次ライブラリ関数で利用される引数の数が登録され、「引数1〜6」には各引数の型、サイズ、入力データまたは出力データかを識別するための情報(inの場合は入力データであることを示し、outの場合は出力データであることを示す)が登録される。   FIG. 3 is a diagram illustrating an example of a sequential library table. As shown in the figure, this sequential library table is composed of “function name”, “number of arguments”, and “arguments 1 to 6”. Here, the name of the sequential library function is registered in “Function Name”, the number of arguments used in the sequential library function is registered in “Number of Arguments”, and each argument is registered in “Arguments 1 to 6”. Information for identifying the type, size, input data or output data (in the case of in indicates input data and in the case of out indicates output data) is registered.

なお、逐次ライブラリテーブル生成部220は、生成した逐次ライブラリテーブルを表示装置50に表示させると共に、逐次ライブラリテーブルを逐次ライブラリテーブル記憶部230に記憶させる。逐次ライブラリテーブル記憶部230は、逐次ライブラリテーブルを記憶する記憶部である。   The sequential library table generation unit 220 displays the generated sequential library table on the display device 50 and stores the sequential library table in the sequential library table storage unit 230. The sequential library table storage unit 230 is a storage unit that stores a sequential library table.

並列ライブラリ情報記憶部240は、並列ライブラリ関数の関数名や引数の情報を記憶する記憶部であり、並列ライブラリテーブル生成部250は、並列ライブラリ情報記憶部240に記憶された並列ライブラリ関数の関数名や引数の情報と、入力装置60から入力される情報とを基にして並列ライブラリテーブルを生成する処理部である。   The parallel library information storage unit 240 is a storage unit that stores function name and argument information of parallel library functions. The parallel library table generation unit 250 is a function name of parallel library functions stored in the parallel library information storage unit 240. And a processing unit that generates a parallel library table based on information on arguments and information input from the input device 60.

入力装置60から並列ライブラリ生成部250に入力される情報は、並列ライブラリ関数の精度、性能および使用するメモリ量の情報を有する。また、並列ライブラリ関数が、プロセス並列用の関数であり、かつ使用されるデータを各プロセスに分割する必要のある関数である場合には、ユーザは、各プロセスに対応するように分割したデータ(以下、分割データ)と分割データの分割形式とを入力装置60から並列ライブラリ生成部250に入力する。   The information input from the input device 60 to the parallel library generation unit 250 includes information on the accuracy and performance of the parallel library function and the amount of memory used. In addition, when the parallel library function is a function for process parallelism and is a function that needs to divide the data to be used into each process, the user can divide the data (corresponding to each process ( Hereinafter, the division data) and the division format of the division data are input from the input device 60 to the parallel library generation unit 250.

図4は、並列ライブラリテーブルの一例を示す図である。同図に示すように、この並列ライブラリテーブルは、「関数名」、「引数の数」、「引数1〜6」、「精度」、「性能」、「メモリ量」および「分割データ」から構成される。   FIG. 4 is a diagram illustrating an example of a parallel library table. As shown in the figure, this parallel library table is composed of “function name”, “number of arguments”, “arguments 1 to 6”, “accuracy”, “performance”, “memory amount”, and “divided data”. Is done.

ここで、「関数名」には並列ライブラリ関数の名前が登録され、「引数の数」には並列ライブラリ関数で利用される引数の数が登録され、「引数1〜6」には各引数の型、サイズ、入力データまたは出力データかを識別するための情報(inの場合は入力データであることを示し、outの場合は出力データであることを示す)が登録される。   Here, the name of the parallel library function is registered in “Function Name”, the number of arguments used in the parallel library function is registered in “Number of Arguments”, and each argument is registered in “Arguments 1 to 6”. Information for identifying the type, size, input data or output data (in the case of in indicates input data and in the case of out indicates output data) is registered.

また、「精度」には並列ライブラリ関数の精度が登録され(*の数が少ないほど精度が高い)、「性能」には並列ライブラリ関数の性能が登録され(*の数が少ないほど性能が高い)、「メモリ量」には並列ライブラリ関数で使用されるメモリの量が登録され(*の数が少ないほどメモリ使用量が少ない)、「分割データ」には分割変数と分割形式とが登録される。なお、“*”は、入力装置のユーザインターフェースとして使用される表示形態である。   In addition, the accuracy of the parallel library function is registered in “Accuracy” (the smaller the number of *, the higher the accuracy), and the performance of the parallel library function is registered in “Performance” (the smaller the number of *, the higher the performance) ), The amount of memory used by the parallel library function is registered in the “memory amount” (the smaller the number of *, the smaller the memory usage), and the partition variable and partition format are registered in the “partition data” The Note that “*” is a display form used as a user interface of the input device.

なお、並列ライブラリテーブル生成部250は、生成した並列ライブラリテーブルを表示装置50に表示させると共に、並列ライブラリテーブルを並列ライブラリテーブル記憶部260に記憶させる。並列ライブラリテーブル記憶部260は、並列ライブラリテーブルを記憶する記憶部である。   The parallel library table generation unit 250 displays the generated parallel library table on the display device 50 and stores the parallel library table in the parallel library table storage unit 260. The parallel library table storage unit 260 is a storage unit that stores a parallel library table.

逐次/並列ライブラリ初期リンク生成部270は、逐次ライブラリテーブル記憶部210に記憶された逐次ライブラリテーブルと、並列ライブラリテーブル記憶部240に記憶された並列ライブラリテーブルと、入力装置40から入力される逐次ライブラリ関数および並列ライブラリ関数の結合情報とを基にして、逐次ライブラリ関数と並列ライブラリ関数とをリンク付け(関連付け)した逐次/並列ライブラリリンク構造情報300aを生成し、生成した逐次/並列ライブラリリンク構造情報300aを記憶部300に記憶させる処理部である。   The sequential / parallel library initial link generation unit 270 includes a sequential library table stored in the sequential library table storage unit 210, a parallel library table stored in the parallel library table storage unit 240, and a sequential library input from the input device 40. Based on the combined information of the function and the parallel library function, the sequential / parallel library link structure information 300a in which the sequential library function and the parallel library function are linked (associated) is generated, and the generated sequential / parallel library link structure information is generated. It is a processing unit that stores 300a in the storage unit 300.

なお、逐次/並列ライブラリ初期リンク生成部270は、逐次ライブラリテーブルおよび並列ライブラリテーブルを表示装置50に出力させ、ユーザが入力装置50を介して機能の等しい逐次ライブラリ関数と並列ライブラリ関数とを関連付けることによって結合情報をえることになる。   The serial / parallel library initial link generation unit 270 causes the display device 50 to output the sequential library table and the parallel library table, and the user associates the serial library function having the same function with the parallel library function via the input device 50. Will give you the combined information.

図5は、逐次/並列ライブラリ初期リンク生成部270によって生成される逐次/並列ライブラリリンク構造情報300aの一例を示す図である。(なお、この図5に示される表示内容は、表示装置50に表示されるものとする。)同図に示すように、この逐次/並列ライブラリリンク構造情報300aは、機能の等しい逐次ライブラリ関数と並列ライブラリ関数とが関連付けられている。   FIG. 5 is a diagram illustrating an example of the sequential / parallel library link structure information 300 a generated by the sequential / parallel library initial link generation unit 270. (It is assumed that the display contents shown in FIG. 5 are displayed on the display device 50.) As shown in the figure, the sequential / parallel library link structure information 300a includes sequential library functions having the same function. Associated with parallel library functions.

具体的には、逐次ライブラリテーブルの「dsyevx」が並列ライブラリテーブルの「dsyevx」「dsyevd」および「dsyevr」に関連付けられ、逐次ライブラリテーブルの「dsyevd」が並列ライブラリテーブルの「dsyevx」、「dsyevd」および「dsyevr」に関連付けられ、逐次ライブラリテーブルの「dsyevr」が、並列ライブラリテーブルの「dsyevx」、「dsyevd」および「dsyevr」に関連付けられ、逐次ライブラリテーブルの「dgemm」が並列ライブラリテーブルの「dgemm」に関連付けられている。   Specifically, "dsyevx" in the sequential library table is associated with "dsyevx", "dsyevd", and "dsyevr" in the parallel library table, and "dsyevd" in the sequential library table is "dsyevx", "dsyevd" in the parallel library table And "dsyevr" in the sequential library table is associated with "dsyevx", "dsyevd", and "dsyevr" in the parallel library table, and "dgemm" in the sequential library table is "dgemm" in the parallel library table. ".

次に、図1に示した後処理部400の構成について説明する。図6は、図1に示した後処理部400の構成を示す機能ブロック図である。同図に示すように、この後処理部4000は、コマンド受付部410と、リンク再構成処理部420と、ライブラリ置換処理部430と、ライブラリ関数検索部440とオブジェクトコード変換部450とを有する。   Next, the configuration of the post-processing unit 400 shown in FIG. 1 will be described. FIG. 6 is a functional block diagram showing the configuration of the post-processing unit 400 shown in FIG. As shown in the figure, the post-processing unit 4000 includes a command reception unit 410, a link reconfiguration processing unit 420, a library replacement processing unit 430, a library function search unit 440, and an object code conversion unit 450.

コマンド受付部410は、プログラム300bのコンパイルを行うコマンド(以下、コンパイルコマンドと表記する)を入力装置40から取得し、取得したコンパイルコマンドの指示内容を解析すると共に、解析した指示内容をリンク再構成処理部420に渡す処理部である。   The command reception unit 410 acquires a command for compiling the program 300b (hereinafter referred to as a compile command) from the input device 40, analyzes the instruction content of the acquired compile command, and reconfigures the analyzed instruction content as a link. This is a processing unit that is passed to the processing unit 420.

例えば、コマンド受付部410がコンパイルコマンド「ffc-mxxx.c-laaa-lbbb-lccc-linktable link.lf」を取得した場合には、このコンパイルコマンドの指示内容は「ffc」○○社製Cコンパリラを使用し、「-m」ライブラリ関数の優先要素はメモリ量を優先し、「laaa-lbbb-lccc」リンクするライブラリをlaaaとlbbbとlcccとに指定し、「linktablle link.lf」利用するリンクテーブルを逐次/並列ライブラリリンク構造情報330aに指定する旨を示している。   For example, when the command reception unit 410 obtains the compile command “ffc-mxxx.c-laaa-lbbb-lccc-linktable link.lf”, the content of the instruction of this compile command is “ffc”, which is a C compiler manufactured by XX Corporation. , The priority element of the "-m" library function gives priority to the amount of memory, the library to be linked to "laaa-lbbb-lccc" is specified as laaa, lbbb, and lccc, and the link that uses "linktablle link.lf" This indicates that the table is designated in the sequential / parallel library link structure information 330a.

なお、コンパイルコマンドにかかる優先要素が「p」の場合には精度を優先する旨を示し、優先要素が「m」の場合には使用メモリを優先する(使用メモリ量の最も少ないライブラリ関数を優先する)旨を示し、優先要素が「s」の場合には処理速度を優先する旨を示す。   If the priority element for the compile command is “p”, it indicates that priority is given to accuracy. If the priority element is “m”, priority is given to the memory used (priority is given to the library function with the smallest memory usage). If the priority element is “s”, the processing speed is prioritized.

また、優先要素が「ms」の場合には、使用メモリ量を第一優先とし、メモリ使用量が最小の関数を検索する。メモリ使用量が最小の関数が複数存在する場合には、第二優先として、メモリ使用量が最小の関数の内、最も処理速度が速い関数を選択する旨を示す。その他、優先要素は「pm」、「pms」および「mp」などのように「p」、「m」、「s」を組み合わせて、ユーザが所望する関数を選択することができる。   When the priority element is “ms”, the used memory amount is given the first priority, and a function having the smallest memory use amount is searched. When there are a plurality of functions having the smallest memory usage, the function having the fastest processing speed among the functions having the smallest memory usage is selected as the second priority. In addition, as the priority element, a function desired by the user can be selected by combining “p”, “m”, and “s” such as “pm”, “pms”, and “mp”.

さらに、優先要素は「m0.4s0.5p0.1」と指定することもできる(本実施例では一例を示す)。この場合、使用メモリ量を40%の割合、処理速度を50%の割合、精度を10%の割合で優先することを示す。   Furthermore, the priority element can be specified as “m0.4s0.5p0.1” (an example is shown in this embodiment). In this case, priority is given to the used memory amount at a rate of 40%, the processing speed at a rate of 50%, and the accuracy at a rate of 10%.

リンク再構成処理部420は、逐次/並列ライブラリリンク構造情報300aをコマンド受付部410から渡される指示内容を基にして再構成する処理部であり、リンク構造排除処理部420aと、N(多)対1リンク構造生成部420bとを有する。   The link reconfiguration processing unit 420 is a processing unit that reconfigures the sequential / parallel library link structure information 300a based on the instruction content passed from the command receiving unit 410. The link reconfiguration processing unit 420 includes N (multiple) link structure exclusion processing units 420a. And a one-to-one link structure generation unit 420b.

リンク構造排除処理部420aは、コマンド受付部410からリンクするライブラリにかかる情報(以下、リンクライブラリ情報)を取得し、取得したリンクライブラリ情報を基にして逐次/並列ライブラリリンク構造情報300aの初期リンク構造にある不要なライブラリテーブルやリンク構造を削除する。   The link structure exclusion processing unit 420a obtains information related to the library to be linked (hereinafter referred to as link library information) from the command receiving unit 410, and the initial link of the sequential / parallel library link structure information 300a based on the obtained link library information. Delete unnecessary library tables and link structures in the structure.

図7は、初期リンク構造にある不要なライブラリテーブルやリンク構造の削除を説明するための説明図である。同図に示すように、初期リンク構造では、逐次ライブラリテーブル1が並列ライブラリ4にリンクされ、逐次ライブラリテーブル2が並列ライブラリテーブル5、6にリンクされ、逐次ライブラリテーブル3が並列ライブラリテーブル4〜8にリンクされている。   FIG. 7 is an explanatory diagram for explaining deletion of unnecessary library tables and link structures in the initial link structure. As shown in the figure, in the initial link structure, the sequential library table 1 is linked to the parallel library 4, the sequential library table 2 is linked to the parallel library tables 5 and 6, and the sequential library table 3 is parallel library tables 4-8. Linked to

そして、リンク構造排除処理部420aが、逐次ライブラリテーブル3と並列ライブラリテーブル4〜7をリンクする旨のリンクライブラリ情報を取得した場合には、逐次ライブラリテーブル1,2を削除すると共に、逐次ライブラリテーブル1と並列ライブラリテーブル4とのリンク、逐次ライブラリテーブル2と並列ライブラリテーブル5,6とのリンク、逐次ライブラリテーブル3と並列ライブラリテーブル8とのリンクを削除する。   When the link structure exclusion processing unit 420a acquires link library information for linking the sequential library table 3 and the parallel library tables 4 to 7, the sequential library tables 1 and 2 are deleted and the sequential library table is deleted. 1 and the parallel library table 4, the link between the sequential library table 2 and the parallel library tables 5 and 6, and the link between the sequential library table 3 and the parallel library table 8 are deleted.

N対1リンク構造生成部420bは、コマンド受付部410からコンパイルコマンドの優先要素にかかる情報(以下、優先要素情報)を取得し、取得した優先要素情報を基にして、逐次/並列ライブラリリンク構造情報300aでリンクされている複数の並列ライブラリ関数の内、最適な並列ライブラリ関数を選択し、「1対1またはN(多)対1」のリンク構造に再構成する処理部である。   The N-to-1 link structure generation unit 420b acquires information (hereinafter referred to as priority element information) related to the priority element of the compile command from the command reception unit 410, and based on the acquired priority element information, the sequential / parallel library link structure This is a processing unit that selects an optimal parallel library function from among a plurality of parallel library functions linked by the information 300a and reconfigures the link structure to a “one-to-one or N (multiple) to one” link structure.

図8は、メモリ量を優先した場合に、再構成される逐次/並列ライブラリリンク構造情報300aを示す図である。元々、逐次/並列ライブラリリンク構造情報300aは、図5に示したように、逐次ライブラリ関数「dsyevx」が並列ライブラリ関数「dsyevx」、「dsyevd」および「dsyevr」に関連付けれ、逐次ライブラリ関数「dsyevd」が並列ライブラリ関数「dsyevx」、「dsyevd」および「dsyevr」に関連付けれ、逐次ライブラリ関数「dsyevr」が並列ライブラリ関数「dsyevx」、「dsyevd」および「dsyevr」に関連付けれ、逐次ライブラリ関数「dgemm」が並列ライブラリ関数「dgemm」に関連付けられていた。   FIG. 8 is a diagram showing the sequential / parallel library link structure information 300a to be reconfigured when the memory amount is prioritized. Originally, as shown in FIG. 5, the sequential / parallel library link structure information 300a is obtained by associating the sequential library function “dsyevx” with the parallel library functions “dsyevx”, “dsyevd”, and “dsyevr”, and the sequential library function “dsyevd”. Is associated with the parallel library functions "dsyevx", "dsyevd", and "dsyevr", the sequential library function "dsyevr" is associated with the parallel library functions "dsyevx", "dsyevd", and "dsyevr", and the sequential library function "dgemm" Was associated with the parallel library function "dgemm".

しかし、メモリ量を優先する場合には、図8に示すように、関連付けられた並列ライブラリ関数の内、使用されるメモリ量が最も少ない並列ライブラリ関数以外の関連付けを解除する。具体的には、逐次ライブラリ関数「dsyevx」を並列ライブラリ関数「dsyevr」のみに関連付け、逐次ライブラリ関数「dsyevd」を並列ライブラリ関数「dsyevr」のみに関連付け、逐次ライブラリ関数「dsyevr」を並列ライブラリ関数「dsyevr」のみに関連付ける。なお、逐次ライブラリ関数「dgemm」に関しては、一つの並列ライブラリ関数「dgemm」のみに関連付けられているため、関連付けに変更はない。   However, when priority is given to the amount of memory, as shown in FIG. 8, associations other than the parallel library function that uses the least amount of memory among the associated parallel library functions are canceled. Specifically, the sequential library function “dsyevx” is associated only with the parallel library function “dsyevr”, the sequential library function “dsyevd” is associated only with the parallel library function “dsyevr”, and the sequential library function “dsyevr” is associated with the parallel library function “ dsyevr "only. Since the sequential library function “dgemm” is associated with only one parallel library function “dgemm”, the association is not changed.

なお、図8に示した各関数の関連付けは、実際には関連付け先となる並列ライブラリ関数のポインタを利用することになる。図9は、ポインタによって関連付けられた逐次/並列ライブラリリンク構造情報300aの一例を示す図である。   The association of each function shown in FIG. 8 actually uses the pointer of the parallel library function that is the association destination. FIG. 9 is a diagram illustrating an example of the sequential / parallel library link structure information 300a associated by the pointer.

同図に示すように、各逐次ライブラリ関数はそれぞれ関連付け先となる並列ライブラリ関数のポインタを有し、このポインタによって、関連付けられる並列ライブラリ関数が特定される。また、並列ライブラリテーブルの精度、性能およびメモリ量は、「*」ではなく、実際には数字によって登録される。また、並列ライブラリテーブルのポインタ領域は「null」に設定され使用されない。   As shown in the figure, each sequential library function has a pointer to a parallel library function to be associated with, and the associated parallel library function is specified by this pointer. In addition, the accuracy, performance, and amount of memory of the parallel library table are actually registered by numbers, not “*”. The pointer area of the parallel library table is set to “null” and is not used.

ライブラリ置換処理部430は、逐次/並列ライブラリリンク構造情報300aを基にして、プログラム上の逐次ライブラリ関数を並列ライブラリ関数に置換する処理部であり、整合性調整処理部430aと、分割データ生成部430bと、収集データ生成部430cと、並列ライブラリ結合部430dとを有する。   The library replacement processing unit 430 is a processing unit that replaces a sequential library function on a program with a parallel library function based on the sequential / parallel library link structure information 300a, and includes a consistency adjustment processing unit 430a and a divided data generation unit. 430b, a collected data generation unit 430c, and a parallel library combination unit 430d.

整合性調整処理部430aは、引数コンバータライブラリを保持し、関連付けられた逐次ライブラリ関数と並列ライブラリ関数との引数の並び順が異なる場合に、引数コンバータライブラリに含まれる引数コンバータライブラリ関数を利用して、逐次ライブラリ関数の引数の並び順と等しい並列ライブラリ関数を新たに生成し、生成した並列ライブラリ関数と逐次ライブラリ関数とを新たに関連付ける処理部である。   The consistency adjustment processing unit 430a holds the argument converter library, and uses the argument converter library function included in the argument converter library when the order of the arguments is different between the associated sequential library function and the parallel library function. A processing unit that newly generates a parallel library function equal to the order of arguments of the sequential library function and newly associates the generated parallel library function with the sequential library function.

図10は、整合性調整処理部430aの処理を説明するための説明図である。同図に示すように、整合性調整処理部430aは、逐次ライブラリ関数10の引数の並びが並列ライブラリ関数11の引数の並びと異なる場合に、並列ライブラリ関数11の前に、引数コンバータライブラリ関数「argv_converter」を設定することによって、逐次ライブラリ関数10の引数の並びと同様の引数の並びを有する並列ライブラリ関数12を生成し、逐次ライブラリ関数10と並列ライブラリ関数12とを新たにリンク付ける。なお、整合性調整処理部430aは、逐次ライブラリ関数10と並列ライブラリ関数11とのリンク付けは解除する。   FIG. 10 is an explanatory diagram for explaining the processing of the consistency adjustment processing unit 430a. As shown in the figure, the consistency adjustment processing unit 430a, before the parallel library function 11, sets the argument converter library function "" when the argument list of the sequential library function 10 is different from the argument list of the parallel library function 11. By setting “argv_converter”, a parallel library function 12 having a sequence of arguments similar to the sequence of arguments of the sequential library function 10 is generated, and the sequential library function 10 and the parallel library function 12 are newly linked. The consistency adjustment processing unit 430a releases the link between the sequential library function 10 and the parallel library function 11.

分割データ生成部430bは、データ分割/収集ライブラリを保持し、置換対象となる並列ライブラリ関数に分割データの指定があり、かつ分割データが入力データに対応する場合に、分割データを各プロセスに分配する機能を有する関数をデータ分割/収集ライブラリから検索し、検索した関数と分割データとで分割関数を生成し、生成した分割関数を並列ライブラリ結合部430dに渡す処理部である。   The divided data generation unit 430b holds the data dividing / collecting library, and when the divided data is specified in the parallel library function to be replaced and the divided data corresponds to the input data, the divided data is distributed to each process. This is a processing unit that searches the data partition / collection library for a function having the function to generate, generates a split function from the searched function and split data, and passes the generated split function to the parallel library combining unit 430d.

例えば、変換対象となる並列ライブラリ関数が、図2に示す「dsyevr」であり、dsyevrに対する分割変数が「A,B,C」であり、この分割変数の内、「A,B」が入力データである場合には、分割データ生成部430bは、分割関数「div_data(a…)」、「div_data(b…)」を生成し、生成した分割関数を、並列ライブラリ結合部430に渡す。   For example, the parallel library function to be converted is “dsyevr” shown in FIG. 2, and the partitioning variable for dsyevr is “A, B, C”, and among these partitioning variables, “A, B” is input data. In this case, the divided data generation unit 430b generates divided functions “div_data (a...)” And “div_data (b...)” And passes the generated divided functions to the parallel library combining unit 430.

収集データ生成部430cは、データ分割/収集ライブラリを保持し、置換対象となる並列ライブラリ関数に分割データの指定があり、かつ分割データが出力データに対応する場合に、各プロセスから出力されるデータを収集する機能を有する関数をデータ分割/収集ライブラリから検索し、検索した関数と分割データとで収集関数を生成し、生成した収集関数を並列ライブラリ結合部430dに渡す処理部である。   The collection data generation unit 430c holds the data division / collection library, and when the division data is specified in the parallel library function to be replaced and the division data corresponds to the output data, the data output from each process Is a processing unit that searches the data division / collection library for a function having a function of collecting data, generates a collection function from the searched function and the divided data, and passes the generated collection function to the parallel library combination unit 430d.

例えば、変換対象となる並列ライブラリ関数が、図2に示す「dsyevr」であり、dsyevrに対する分割変数が「A,B,C」であり、この分割変数の内、「C」が出力データである場合には、収集データ生成部430bは、収集関数「gather_data(c…)」を生成し、生成した収集関数を、並列ライブラリ結合部430dに渡す。   For example, the parallel library function to be converted is “dsyevr” shown in FIG. 2, and the partition variables for dsyevr are “A, B, C”, and among these partition variables, “C” is the output data. In this case, the collected data generation unit 430b generates a collection function “gather_data (c...)” And passes the generated collection function to the parallel library combination unit 430d.

並列ライブラリ結合部430dは、プログラム300bに含まれる逐次ライブラリ関数を、並列ライブラリ関数に置換する処理部である。具体的に、並列ライブラリ結合部430dは、並列ライブラリ関数に置換する場合に、並列ライブラリ関数の情報を整合性調整処理部430、分割データ生成部430bおよび収集データ生成部430cに通知する。   The parallel library coupling unit 430d is a processing unit that replaces a sequential library function included in the program 300b with a parallel library function. Specifically, the parallel library combining unit 430d notifies the consistency adjustment processing unit 430, the divided data generation unit 430b, and the collected data generation unit 430c of the parallel library function information when replacing with the parallel library function.

そして、整合性調整処理部430aによって逐次ライブラリ関数と並列ライブラリ関数との引数の順番を調整され、分割データ生成部430bが分割関数を生成し、収集データ生成部430cが収集関数を生成し、並列ライブラリ結合部430dが変換対象となる並列ライブラリ関数と分割関数と収集関数とを結合し、結合した並列ライブラリ関数とプログラム上の逐次ライブラリ関数とを置換する。   Then, the order of arguments of the sequential library function and the parallel library function is adjusted by the consistency adjustment processing unit 430a, the divided data generation unit 430b generates a division function, the collection data generation unit 430c generates a collection function, and The library combining unit 430d combines the parallel library function to be converted, the division function, and the collection function, and replaces the combined parallel library function and the sequential library function on the program.

図11は、並列ライブラリ結合部430dが行う処理を説明するための説明図である。同図に示すように、並列ライブラリ結合部430dは、並列ライブラリテーブルの並列ライブラリ関数「dsyevr」と、分割関数「div_data(a…)」、「div_data(b…)」と、収集関数「gather_data(c…)」とを結合し、各関数を結合した並列ライブラリ関数と、プログラム上の逐次ライブラリ関数とを置換する。   FIG. 11 is an explanatory diagram for explaining processing performed by the parallel library combining unit 430d. As shown in the figure, the parallel library combining unit 430d includes the parallel library function “dsyevr” of the parallel library table, the division functions “div_data (a ...)”, “div_data (b ...)”, and the collection function “gather_data ( c ...) ", and the parallel library function obtained by combining the functions is replaced with the sequential library function on the program.

なお、プログラム上にプラグマ(コンパイラへ特別な指示をするように開発プログラム中に書き込む指示文)が存在する場合は、並列ライブラリ結合部430dは、プラグマを解読し、プラグマによって指定された逐次ライブラリ関数を関連付けられた並列ライブラリ関数に変換する。   If there is a pragma (an instruction sentence written in the development program so as to give a special instruction to the compiler) on the program, the parallel library coupling unit 430d decodes the pragma and the sequential library function designated by the pragma. To the associated parallel library function.

ライブラリ関数検索部440は、プログラム300b中のライブラリ関数のコールを検索し、コールされている逐次ライブラリ関数の情報を並列ライブラリ結合部430に通知する処理部である。並列ライブラリ結合部430dは、通知を受けた逐次ライブラリ関数のポインタを検索し、逐次ライブラリ関数が関連付けられている場合に(ポインタがnull以外の場合に)、逐次ライブラリ関数を並列ライブラリ関数に置換することになる。   The library function search unit 440 is a processing unit that searches for a call to a library function in the program 300b and notifies the parallel library combination unit 430 of information on the called sequential library function. The parallel library coupling unit 430d searches for the pointer of the received sequential library function, and replaces the sequential library function with the parallel library function when the sequential library function is associated (when the pointer is not null). It will be.

また、ライブラリ関数検索部440は、プログラム中からプラグマを検出した場合には、プラグマを検出した旨と、対応する逐次ライブラリ関数の情報とを並列ライブラリ結合部430dに通知する。さらに、ライブラリ関数検索部440は、プログラム中からライブラリ関数のコールおよびプラグマを検索し終わった場合に、検索が終了した旨をオブジェクトコード変換部450に通知する。   Further, when the pragma is detected in the program, the library function search unit 440 notifies the parallel library combining unit 430d of the detection of the pragma and information on the corresponding sequential library function. Furthermore, when the library function search unit 440 has finished searching for library function calls and pragmas from the program, the library function search unit 440 notifies the object code conversion unit 450 that the search has been completed.

オブジェクトコード変換処理部450は、ライブラリ関数検索部440からプログラム300b上のライブラリ関数のコールおよびプラグマを検索し終わった旨の通知を取得した場合に、プログラム300bをオブジェクトコードに変換する処理部である。   The object code conversion processing unit 450 is a processing unit that converts the program 300b into an object code when the library function search unit 440 obtains notification that the library function call and pragma on the program 300b have been searched. .

次に、図6に示した後処理部400の処理について説明する。図12は、図6に示した後処理部400の処理手順を示すフローチャートである。同図に示すように、後処理部400は、コマンド受付部410がコンパイルコマンドを取得して、コンパイルコマンドの指示内容をリンク再編成処理部420に通知し(ステップS101)、リンク再編成処理部420が逐次/並列ライブラリリンク構造情報300aを取得する(ステップS102)。   Next, processing of the post-processing unit 400 illustrated in FIG. 6 will be described. FIG. 12 is a flowchart showing a processing procedure of the post-processing unit 400 shown in FIG. As shown in the figure, in the post-processing unit 400, the command receiving unit 410 acquires the compile command, notifies the link reorganization processing unit 420 of the instruction content of the compile command (step S101), and the link reorganization processing unit. 420 acquires the sequential / parallel library link structure information 300a (step S102).

そして、リンク構造排除処理部420aが不要なライブラリとそのリンク構造を排除し(ステップS103)、N対1リンク構造生成部420bがコンパイルコマンドの指示内容に対するリンク構造を生成し(ステップS104)、ライブラリ関数検索部440がプログラム中にライブラリ関数コールがあるか否かを判定する(ステップS105)。   Then, the link structure exclusion processing unit 420a eliminates an unnecessary library and its link structure (step S103), and the N-to-1 link structure generation unit 420b generates a link structure for the instruction content of the compile command (step S104). The function search unit 440 determines whether there is a library function call in the program (step S105).

プログラム中にライブラリ関数のコールがない場合には(ステップS105,No)、処理を終了し、プログラム中にライブラリ関数のコールがある場合には(ステップS105,Yes)、並列ライブラリ結合部430dが、リンクされている関数があるか否かを判定する(ステップS106)。   If there is no library function call in the program (step S105, No), the process is terminated. If there is a library function call in the program (step S105, Yes), the parallel library combining unit 430d It is determined whether there is a linked function (step S106).

リンクされている関数がない場合には(ステップS106,No)、処理を終了し、リンクされている関数がある場合には(ステップS106,Yes)、並列ライブラリ結合部430dがライブラリ関数の置換を行い(ステップS107)、整合性調整処理部430aがリンクされた関数どうしの引数が一致するか否かを判定する(ステップS108)。   If there is no linked function (step S106, No), the process ends. If there is a linked function (step S106, Yes), the parallel library combining unit 430d replaces the library function. In step S107, the consistency adjustment processing unit 430a determines whether the arguments of the linked functions match each other (step S108).

リンクされた関数どうしの引数が一致しない場合には(ステップS108,No)、整合性調整処理部430aが引数並びの同じ関数を生成し、新たなリンク付けを行い(ステップS109)、分割データ生成部430bおよび収集データ生成部430cが変換後の関数に分割データがあるか否かを判定する(ステップS110)。一方、リンクされた関数どうしの引数が一致する場合には(ステップS108,Yes)、そのままステップS110に移行する。   If the arguments of the linked functions do not match (No in step S108), the consistency adjustment processing unit 430a generates the same function in the argument list, performs new linking (step S109), and generates divided data. The unit 430b and the collected data generation unit 430c determine whether or not there is divided data in the converted function (step S110). On the other hand, if the arguments of the linked functions match (Yes in step S108), the process proceeds to step S110 as it is.

関数に分割データがない場合には(ステップS110,No)、処理を終了し、関数に分割データがある場合には(ステップS110,Yes)、分割データ生成部430bが分割関数を生成し、収集データ生成部430cが収集関数を生成し、並列ライブラリ結合部430dが、分割関数または収集関数をプログラムに挿入する(ステップS111)。   If there is no divided data in the function (step S110, No), the process ends. If the function has divided data (step S110, Yes), the divided data generation unit 430b generates a divided function and collects it. The data generation unit 430c generates a collection function, and the parallel library combination unit 430d inserts the division function or the collection function into the program (step S111).

このように、プログラム中のライブラリ関数にコールがあり、且つコールされた関数がリンクされている場合には、並列ライブラリ結合部430が、プログラム中の逐次ライブラリ関数を、並列ライブラリ関数に置換し、分割関数または収集関数をプログラムに挿入するので、置換対象となる逐次ライブラリ関数の機能などが、置換元の並列ライブラリ関数の機能などと異なっていてもユーザが元プログラム修正することなくライブラリ関数を置換することができる。   As described above, when there is a call in the library function in the program and the called function is linked, the parallel library combining unit 430 replaces the sequential library function in the program with the parallel library function, Since the split function or collection function is inserted into the program, even if the function of the sequential library function to be replaced is different from the function of the parallel library function of the replacement source, the user replaces the library function without modifying the original program. can do.

次に、プログラム中のプラグマを考慮した後処理部400bの処理について説明する。図13は、プログラム中のプラグマを考慮した後処理部400bの処理手順を示すフローチャートである。同図に示すように、後処理部400は、コマンド受付部410がコンパイルコマンドを取得して、コンパイルコマンドの指示内容をリンク再編成処理部420に通知し(ステップS201)、リンク再編成処理部420が逐次/並列ライブラリリンク構造情報300aを取得する(ステップS202)。   Next, processing of the post-processing unit 400b in consideration of pragmas in the program will be described. FIG. 13 is a flowchart showing the processing procedure of the post-processing unit 400b in consideration of the pragma in the program. As shown in the figure, in the post-processing unit 400, the command receiving unit 410 acquires the compile command, notifies the link reorganization processing unit 420 of the instruction content of the compile command (step S201), and the link reorganization processing unit. 420 acquires the sequential / parallel library link structure information 300a (step S202).

そして、リンク構造排除処理部420aが不要なライブラリとそのリンク構造を排除し(ステップS203)、ライブラリ関数検索部440がプログラム中にプラグマ指定があるか否かを判定し(ステップS204)、プログラム中にプラグマ指定がある場合には(ステップS204,Yes)、ライブラリ置換処理部430がプラグマ処理を行い(ステップS205)、N対1リンク構造生成部420bがコンパイルコマンドの指示内容に対するリンク構造を生成する(ステップS206)。一方、プログラム中にプラグマ指定がない場合には(ステップS204,No)、そのままステップS206に移行する。   Then, the link structure exclusion processing unit 420a eliminates the unnecessary library and its link structure (step S203), and the library function search unit 440 determines whether or not the pragma is specified in the program (step S204). If the pragma is specified (step S204, Yes), the library replacement processing unit 430 performs the pragma processing (step S205), and the N-to-1 link structure generation unit 420b generates a link structure for the contents of the compile command. (Step S206). On the other hand, if there is no pragma designation in the program (step S204, No), the process proceeds to step S206 as it is.

続いて、ライブラリ関数検索部440がプログラム中にライブラリ関数(プラグマ指定以外)コールがあるか否かを判定し(ステップS207)、プログラム中にライブラリ関数コールがない場合には(ステップS207,No)、処理を終了し、プログラム中にライブラリ関数コールがある場合には(ステップS207,Yes)、並列ライブラリ結合部430dが、リンクされている関数があるか否かを判定する(ステップS208)。   Subsequently, the library function search unit 440 determines whether or not there is a library function (other than pragma designation) call in the program (step S207). If there is no library function call in the program (No in step S207). When the processing is terminated and there is a library function call in the program (step S207, Yes), the parallel library combining unit 430d determines whether there is a linked function (step S208).

リンクされている関数がない場合には(ステップS208,No)、処理を終了し、リンクされている関数がある場合には(ステップS208,Yes)、並列ライブラリ結合部430dがライブラリ関数の置換を行い(ステップS209)、整合性調整処理部430aがリンクされた関数どうしの引数が一致するか否かを判定する(ステップS210)。   If there is no linked function (step S208, No), the process ends. If there is a linked function (step S208, Yes), the parallel library combining unit 430d replaces the library function. In step S209, the consistency adjustment processing unit 430a determines whether the arguments of the linked functions match (step S210).

リンクされた関数どうしの引数が一致しない場合には(ステップS210,No)、整合性調整処理部430aが引数並びの同じ関数を生成し、新たなリンク付けを行い(ステップS211)、分割データ生成部430bおよび収集データ生成部430cが変換後の関数に分割データがあるか否かを判定する(ステップS212)。一方、リンクされた関数どうしの引数が一致する場合には(ステップS210,Yes)、そのままステップS212に移行する。   If the arguments of the linked functions do not match (No in step S210), the consistency adjustment processing unit 430a generates the same function in the argument list, performs new linking (step S211), and generates divided data. The unit 430b and the collected data generation unit 430c determine whether or not there is divided data in the converted function (step S212). On the other hand, if the arguments of the linked functions match (Yes in step S210), the process proceeds to step S212 as it is.

変換後の関数に分割データがない場合には(ステップS212,No)、処理を終了し、変換後の関数に分割データがある場合には(ステップS212,Yes)、分割データ生成部430bが分割関数を生成し、収集データ生成部430cが収集関数を生成し、並列ライブラリ結合部430dが分割関数または収集関数をプログラムに挿入する(ステップS213)。   When there is no divided data in the function after conversion (No at Step S212), the process ends, and when there is divided data in the function after conversion (Yes at Step S212), the divided data generation unit 430b performs division. The collected data generation unit 430c generates a collection function, and the parallel library combination unit 430d inserts the division function or the collection function into the program (step S213).

次に、図13のステップS205に示したプラグマ処理について説明する。図14は、図13のステップS205に示したプラグマ処理を示すフローチャートである。同図に示すように、後処理部400は、並列ライブラリ結合部430dが使用するライブラリ関数を決定し、ライブラリ関数を置換する(ステップS301)。   Next, the pragma process shown in step S205 of FIG. 13 will be described. FIG. 14 is a flowchart showing the pragma process shown in step S205 of FIG. As shown in the figure, the post-processing unit 400 determines a library function used by the parallel library combination unit 430d and replaces the library function (step S301).

そして、整合性調整部430aがリンクされている関数どうしの引数が一致するか否かを判定し(ステップS302)、リンクされた関数どうしの引数が一致しない場合には(ステップS302,No)、整合性調整処理部430aが引数並びの同じ関数を生成し、新たなリンク付けを行い(ステップS303)、分割データ生成部430bおよび収集データ生成部430cが変換後の関数に分割データがあるか否かを判定する(ステップS304)。一方、リンクされた関数どうしの引数が一致する場合には(ステップS302,Yes)、そのままステップS304に移行する。   Then, the consistency adjustment unit 430a determines whether or not the arguments of the linked functions match (step S302). If the arguments of the linked functions do not match (step S302, No), The consistency adjustment processing unit 430a generates a function having the same argument list, performs a new link (step S303), and the divided data generation unit 430b and the collected data generation unit 430c determine whether there is divided data in the converted function. Is determined (step S304). On the other hand, if the arguments of the linked functions match (Yes in step S302), the process proceeds to step S304 as it is.

変換後の関数に分割データがない場合には(ステップS304,No)、プラグマ処理を終了し、変換後の関数に分割データがある場合には(ステップS304,Yes)、分割データ生成部430bが分割関数を生成し、収集データ生成部430cが収集関数を生成し、並列ライブラリ結合部430dが分割関数または収集関数をプログラムに挿入する(ステップS305)。   If there is no divided data in the converted function (step S304, No), the pragma process is terminated. If the converted function has divided data (step S304, Yes), the divided data generation unit 430b The division function is generated, the collection data generation unit 430c generates the collection function, and the parallel library combination unit 430d inserts the division function or the collection function into the program (step S305).

このように、プログラム中にプラグマが存在する場合であっても、並列ライブラリ結合部430dがプラグマ指定されたライブラリ関数を、置換対象となるライブラリ関数に変換し、分割関数および収集関数を、置換したライブラリ関数の前後に追加するので、効率よくライブラリ関数を置換することができる。   As described above, even if a pragma exists in the program, the parallel library coupling unit 430d converts the library function designated by the pragma into a library function to be replaced, and replaces the dividing function and the collection function. Since it is added before and after the library function, the library function can be replaced efficiently.

上述してきたように、本実施例にかかるライブラリ変換装置100は、予め、前処理部200が、逐次/並列ライブラリリンク構造情報300aを生成する。そして、コンパイルコマンドをコマンド受付部410が受け取った場合に、コマンド受付部410が指示内容を解析し、リンク再構成処理部420がコンパイルコマンドの指示内容を基に、逐次/並列ライブラリリンク構造情報300aを変換し、ライブラリ置換処理部430が、変換された逐次/並列ライブラリリンク情報300aを基にして、プログラム中の逐次ライブラリ関数を、並列ライブラリ関数に置換するので、置換元の逐次ライブラリ関数関数名と置換対象となる並列ライブラリ関数関数名とが異なっていてもユーザが元プログラムを修正することなくライブラリ関数を置換することができる。   As described above, in the library conversion apparatus 100 according to the present embodiment, the preprocessing unit 200 generates the sequential / parallel library link structure information 300a in advance. When the command reception unit 410 receives a compile command, the command reception unit 410 analyzes the instruction content, and the link reconfiguration processing unit 420 uses the sequential / parallel library link structure information 300a based on the instruction content of the compile command. Since the library replacement processing unit 430 replaces the sequential library function in the program with the parallel library function based on the converted sequential / parallel library link information 300a, the replacement source sequential library function function name Even if the name of the parallel library function to be replaced is different, the user can replace the library function without modifying the original program.

また、元プログラムを修正することなく、逐次ライブラリ関数を並列ライブラリ関数に変換することができるので、ユーザは並列プログラムのノウハウを知らなくとも容易に並列プログラムを作成することができ、並列プログラム開発を短縮化することが出来る。   In addition, since it is possible to convert a sequential library function into a parallel library function without modifying the original program, a user can easily create a parallel program without knowing the know-how of the parallel program. It can be shortened.

ところで、上記の実施例で説明した各種の処理は、予め用意されたプログラムをコンピュータで実行することによって実現することができる。そこで、以下では、図15を用いて、上記の実施例と同様の機能を有するライブラリ変換プログラムを実行するコンピュータの一例を説明する。図15は、ライブラリ変換プログラムを実行するコンピュータを示す図である。   By the way, the various processes described in the above embodiments can be realized by executing a program prepared in advance on a computer. In the following, an example of a computer that executes a library conversion program having the same function as that of the above embodiment will be described with reference to FIG. FIG. 15 is a diagram illustrating a computer that executes a library conversion program.

同図に示すように、ライブラリ変換装置としてのコンピュータ30は、入力装置31、表示装置32、RAM33、HDD34、ROM35およびCPU36をバス37で接続して構成される。ここで、入力装置31および表示装置32は、図1に示した入力装置40および表示装置50にそれぞれ対応する。   As shown in the figure, a computer 30 as a library conversion device is configured by connecting an input device 31, a display device 32, a RAM 33, an HDD 34, a ROM 35 and a CPU 36 via a bus 37. Here, the input device 31 and the display device 32 correspond to the input device 40 and the display device 50 shown in FIG. 1, respectively.

そして、ROM35には、上記の実施例と同様の機能を発揮するライブラリ変換プログラム、つまり、図15に示すように、逐次/並列ライブラリリンク生成プログラム35a、並列ライブラリ結合処理プログラム35b、が予め記憶されている。   The ROM 35 stores in advance a library conversion program that exhibits the same function as the above-described embodiment, that is, as shown in FIG. 15, a sequential / parallel library link generation program 35a and a parallel library connection processing program 35b. ing.

そして、CPU35が、これらのプログラム35a,35bをROM35から読み出して実行することで、図15に示すように、各プログラム35a,35bは、逐次/並列ライブラリリンク生成プロセス36a、並列ライブラリ結合処理プロセス36bとして機能するようになる。逐次/並列ライブラリリンク生成プロセス36aは、図1に示した前処理部200に対応し、並列ライブラリ結合処理プロセス36bは、図1に示した後処理部400に対応する。   Then, the CPU 35 reads these programs 35a and 35b from the ROM 35 and executes them, so that the respective programs 35a and 35b are sequentially / parallel library link generation process 36a and parallel library combination processing process 36b as shown in FIG. Will function as. The sequential / parallel library link generation process 36a corresponds to the pre-processing unit 200 shown in FIG. 1, and the parallel library combination processing process 36b corresponds to the post-processing unit 400 shown in FIG.

また、HDD34には、図15に示すように、変換対象プログラム34aとライブラリ情報34bが記録される。なお、変換対象プログラム34aは、図1に示したプログラム300bに対応し、ライブラリ情報34bは、図2に示した逐次ライブラリ情報記憶部210および並列ライブラリ情報記憶部240に対応する。そして、CPU36は、変換対象プログラム34aおよびライブラリ情報34bを読み出して、RAM33に格納する。また、CPU36は、逐次/並列ライブラリリンク構造情報33cを作成し、作成した逐次/並列ライブラリリンク構造情報33cを基にして、変換対象プログラム33aのライブラリ関数を置換する。ここで、逐次/並列ライブラリリンク構造情報33cは、図1に示した逐次/並列ライブラリリンク構造情報300aに対応する。   Also, as shown in FIG. 15, the conversion target program 34a and library information 34b are recorded in the HDD 34. The conversion target program 34a corresponds to the program 300b shown in FIG. 1, and the library information 34b corresponds to the sequential library information storage unit 210 and the parallel library information storage unit 240 shown in FIG. Then, the CPU 36 reads out the conversion target program 34 a and the library information 34 b and stores them in the RAM 33. Further, the CPU 36 creates the sequential / parallel library link structure information 33c, and replaces the library function of the conversion target program 33a based on the created sequential / parallel library link structure information 33c. Here, the sequential / parallel library link structure information 33c corresponds to the sequential / parallel library link structure information 300a shown in FIG.

ところで、上記したプログラム35a、35bについては、必ずしも最初からROM35に記憶させておく必要はなく、例えば、コンピュータに挿入されるフレキシブルディスク(FD)、CD−ROM、MOディスク、DVDディスク、光磁気ディスク、ICカードなどの「可搬用の物理媒体」、または、コンピュータ30の内外に備えられるハードディスクドライブ(HDD)などの「固定用の物理媒体」、さらには、公衆回線、インターネット、LAN、WANなどを介してコンピュータ30に接続される。「他のコンピュータ(またはサーバ)」などに各プログラムを記憶させておき、コンピュータ30がこれらから各プログラムを読み出して実行するようにしてもよい。   By the way, the above-described programs 35a and 35b are not necessarily stored in the ROM 35 from the beginning. For example, a flexible disk (FD), a CD-ROM, an MO disk, a DVD disk, and a magneto-optical disk inserted into a computer. , "Portable physical media" such as IC cards, or "fixed physical media" such as hard disk drives (HDDs) provided inside and outside the computer 30, as well as public lines, the Internet, LAN, WAN, etc. To the computer 30. Each program may be stored in “another computer (or server)” or the like, and the computer 30 may read and execute each program therefrom.

(付記1)プログラム上のライブラリに含まれる関数を異なるライブラリの関数に変換するライブラリ変換プログラムであって、
ライブラリに含まれる関数と該ライブラリと異なるライブラリに含まれる関数とを関連付けた情報であるライブラリリンク構造情報を生成するリンク構造情報生成手順と、
前記ライブラリリンク構造情報を基にして、ライブラリに含まれる関数を異なるライブラリで同等の機能を有する関数に変換する変換処理手順と、
をコンピュータに実行させることを特徴とするライブラリ変換プログラム。
(Appendix 1) A library conversion program for converting a function included in a library on a program into a function of a different library,
A link structure information generation procedure for generating library link structure information, which is information relating a function included in a library and a function included in a library different from the library;
A conversion processing procedure for converting a function included in the library into a function having an equivalent function in a different library based on the library link structure information;
A library conversion program characterized in that a computer is executed.

(付記2)前記リンク構造情報生成手順は、逐次ライブラリに含まれる関数と並列ライブラリに含まれる関数とを関連付けたライブラリリンク構造情報を生成し、前記変換処理手順は、前記ライブラリリンク構造情報を基にして、逐次ライブラリに含まれる関数を並列ライブラリで同等の機能を有する関数に変換することを特徴とする付記1に記載のライブラリ変換プログラム。 (Supplementary Note 2) The link structure information generation procedure generates library link structure information in which a function included in the sequential library and a function included in the parallel library are associated with each other, and the conversion processing procedure is based on the library link structure information. The library conversion program according to appendix 1, wherein a function included in the sequential library is converted into a function having an equivalent function in a parallel library.

(付記3)前記リンク構造情報生成手順は、前記逐次ライブラリに含まれる関数と関連付ける並列ライブラリの関数の精度および性能の情報を含んだ関連付先情報を取得する関連付先情報取得手順と、前記関連付先情報を基にして、前記逐次ライブラリの関数と並列ライブラリの関数とが1対1または多対1に関連付けられた情報であるライブラリリンク構造情報を生成するリンク生成手順とをさらにコンピュータに実行させることを特徴とする付記2に記載のライブラリ変換プログラム。 (Supplementary Note 3) The link structure information generation procedure includes a related destination information acquisition procedure for acquiring related destination information including accuracy and performance information of a function of a parallel library to be associated with a function included in the sequential library, A link generation procedure for generating library link structure information, which is information in which the function of the sequential library and the function of the parallel library are associated one-to-one or many-to-one based on the association destination information, is further stored in the computer. The library conversion program according to attachment 2, wherein the library conversion program is executed.

(付記4)前記逐次ライブラリの関数に関連付けられる並列ライブラリの関数に対する入力データのデータ分割形式を解読し、前記並列ライブラリの関数の並列プロセスに利用されるデータを分割分配する分割関数を生成すると共に、該分割関数を前記プログラムに追加する分割関数生成手順をさらにコンピュータに実行させることを特徴とする付記2または3に記載のライブラリ変換プログラム。 (Supplementary Note 4) Deciphering the data division format of the input data for the function of the parallel library associated with the function of the sequential library, and generating a division function for dividing and distributing the data used for the parallel process of the function of the parallel library The library conversion program according to appendix 2 or 3, further causing a computer to execute a division function generation procedure for adding the division function to the program.

(付記5)前記逐次ライブラリの関数に関連付けられる並列ライブラリの関数に対する出力データのデータ分割形式を解読し、前記並列ライブラリの関数の並列プロセスから分割されたデータを収集し結合する収集関数を生成すると共に、該収集関数を前記プログラムに追加する収集関数生成手順をさらにコンピュータに実行させることを特徴とする付記2、3または4に記載のライブラリ変換プログラム。 (Additional remark 5) The data division | segmentation format of the output data with respect to the function of the parallel library linked | related with the function of the said sequential library is decoded, The collection function which collects the data divided | segmented from the parallel process of the function of the said parallel library, and produces | generates it is produced | generated. The library conversion program according to appendix 2, 3 or 4, further comprising causing the computer to further execute a collection function generation procedure for adding the collection function to the program.

(付記6)プログラムに含まれるプラグマを検索し、プラグマに対応する逐次ライブラリの関数を同等の機能を有する並列ライブラリの関数に変換するプラグマ処理手順をさらにコンピュータに実行させることを特徴とする付記1〜5のいずれか一つに記載のライブラリ変換プログラム。 (Additional remark 6) The pragma contained in a program is searched, The pragma processing procedure which converts the function of the sequential library corresponding to a pragma into the function of the parallel library which has an equivalent function is further made to perform by a computer The library conversion program as described in any one of -5.

(付記7)プログラム上のライブラリに含まれる関数を異なるライブラリの関数に変換するライブラリ変換方法であって、
ライブラリに含まれる関数と該ライブラリと異なるライブラリに含まれる関数とを関連付けた情報であるライブラリリンク構造情報を生成するリンク構造情報生成工程と、
前記ライブラリリンク構造情報を基にして、ライブラリに含まれる関数を異なるライブラリで同等の機能を有する関数に変換する変換処理工程と、
を含んだことを特徴とするライブラリ変換方法。
(Appendix 7) A library conversion method for converting a function included in a library on a program into a function of a different library,
A link structure information generating step for generating library link structure information, which is information relating a function included in a library and a function included in a library different from the library;
Based on the library link structure information, a conversion process step of converting a function included in the library into a function having an equivalent function in a different library;
A library conversion method characterized by including:

(付記8)前記リンク構造情報生成工程は、逐次ライブラリに含まれる関数と並列ライブラリに含まれる関数とを関連付けたライブラリリンク構造情報を生成し、前記変換処理工程は、前記ライブラリリンク構造情報を基にして、逐次ライブラリに含まれる関数を並列ライブラリで同等の機能を有する関数に変換することを特徴とする付記7に記載のライブラリ変換方法。 (Supplementary Note 8) The link structure information generation step generates library link structure information in which a function included in the sequential library and a function included in the parallel library are associated with each other, and the conversion processing step is based on the library link structure information. The library conversion method according to appendix 7, wherein a function included in the sequential library is converted into a function having an equivalent function in a parallel library.

(付記9)前記リンク構造情報生成工程は、前記逐次ライブラリに含まれる関数と関連付ける並列ライブラリの関数の精度および性能の情報を含んだ関連付先情報を取得する関連付先情報取得工程と、前記関連付先情報を基にして、前記逐次ライブラリの関数と並列ライブラリの関数とが1対1または多対1に関連付けられた情報であるライブラリリンク構造情報を生成するリンク生成工程とをさらに含んだことを特徴とする付記8に記載のライブラリ変換方法。 (Supplementary note 9) The link structure information generation step includes a related destination information acquisition step of acquiring related destination information including information on accuracy and performance of a function of a parallel library associated with a function included in the sequential library, And a link generation step of generating library link structure information that is a one-to-one or many-to-one association between the function of the sequential library and the function of the parallel library based on the association destination information. The library conversion method according to appendix 8, characterized by:

(付記10)前記逐次ライブラリの関数に関連付けられる並列ライブラリの関数に対する入力データのデータ分割形式を解読し、前記並列ライブラリの関数の並列プロセスに利用されるデータを分割分配する分割関数を生成すると共に、該分割関数を前記プログラムに追加する分割関数生成工程をさらに含んだことを特徴とする付記8または9に記載のライブラリ変換方法。 (Supplementary Note 10) Decipher the data division format of the input data for the function of the parallel library associated with the function of the sequential library, and generate a division function for dividing and distributing the data used for the parallel process of the function of the parallel library The library conversion method according to appendix 8 or 9, further comprising a dividing function generation step of adding the dividing function to the program.

(付記11)前記逐次ライブラリの関数に関連付けられる並列ライブラリの関数に対する出力データのデータ分割形式を解読し、前記並列ライブラリの関数の並列プロセスから分割されたデータを収集し結合する収集関数を生成すると共に、該収集関数を前記プログラムに追加する収集関数生成工程をさらに含んだことを特徴とする付記8、9または10に記載のライブラリ変換方法。 (Supplementary Note 11) Decodes the data division format of the output data for the function of the parallel library associated with the function of the sequential library, and generates a collection function that collects and combines the divided data from the parallel process of the function of the parallel library The library conversion method according to appendix 8, 9 or 10, further comprising a collection function generation step of adding the collection function to the program.

(付記12)プログラムに含まれるプラグマを検索し、プラグマに対応する逐次ライブラリの関数を同等の機能を有する並列ライブラリの関数に変換するプラグマ処理工程をさらに含んだことを特徴とする付記7〜11のいずれか一つに記載のライブラリ変換方法。 (Additional remark 12) The pragma processing step which searches for the pragma included in the program and converts the function of the sequential library corresponding to the pragma into the function of the parallel library having an equivalent function is further included. The library conversion method according to any one of the above.

以上のように、本発明にかかるライブラリ変換プログラムは、置換前のライブラリ関数と、置換後のライブラリ関数との関数名が異なる場合であっても、ライブラリ関数を容易に置換する必要のあるライブラリ変換装置などに対して有用である。   As described above, the library conversion program according to the present invention is a library conversion that needs to be easily replaced even if the function names of the library function before replacement and the library function after replacement are different. Useful for devices and the like.

本実施例に示すライブラリ変換装置の構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the library converter shown in a present Example. 図1に示した前処理部の構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the pre-processing part shown in FIG. 逐次ライブラリテーブルの一例を示す図である。It is a figure which shows an example of a sequential library table. 並列ライブラリテーブルの一例を示す図である。It is a figure which shows an example of a parallel library table. 逐次/並列ライブラリ初期リンク生成部によって生成される逐次/並列ライブラリリンク構造情報の一例を示す図である。It is a figure which shows an example of the serial / parallel library link structure information produced | generated by the serial / parallel library initial link production | generation part. 図1に示した後処理部の構成を示す機能ブロック図である。It is a functional block diagram which shows the structure of the post-processing part shown in FIG. 初期リンク構造にある不要なライブラリテーブルやリンク構造の削除を説明するための説明図である。It is explanatory drawing for demonstrating deletion of the unnecessary library table and link structure in an initial link structure. メモリ量を優先した場合に、再構成される逐次/並列ライブラリリンク構造情報を示す図である。It is a figure which shows the serial / parallel library link structure information reconfigure | reconstructed when giving priority to a memory amount. ポインタによって関連付けられた逐次/並列ライブラリリンク構造情報の一例を示す図である。It is a figure which shows an example of the serial / parallel library link structure information linked | related by the pointer. 整合性調整処理部の処理を説明するための説明図である。It is explanatory drawing for demonstrating the process of a consistency adjustment process part. 並列ライブラリ結合部が行う処理を説明するための説明図である。It is explanatory drawing for demonstrating the process which a parallel library coupling | bond part performs. 図6に示した後処理部の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the post-processing part shown in FIG. プログラム中のプラグマを考慮した後処理部の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the post-processing part which considered the pragma in a program. 図13のステップS205に示したプラグマ処理を示すフローチャートである。It is a flowchart which shows the pragma process shown to step S205 of FIG. ライブラリ変換プログラムを実行するコンピュータを示す図である。It is a figure which shows the computer which performs a library conversion program.

符号の説明Explanation of symbols

40 入力装置
50 表示装置
100 ライブラリ変換装置
200 前処理部
210 逐次ライブラリ情報記憶部
220 逐次ライブラリテーブル生成部
230 逐次ライブラリテーブル記憶部
240 並列ライブラリ情報記憶部
250 並列ライブラリテーブル生成部
260 並列ライブラリテーブル記憶部
270 逐次/並列ライブラリ初期リンク生成部
300 記憶部
300a 逐次/並列ライブラリリンク構造情報
300b プログラム
400 後処理部
410 コマンド受付部
420 リンク再構成処理部
420a リンク構造排除処理部
420b N対1リンク構造生成部
430 ライブラリ置換処理部
430a 整合性調整処理部
430b 分割データ生成部
430c 収集データ生成部
430d 並列ライブラリ結合部
440 ライブラリ関数検索処理部
450 オブジェクトコード変換部
40 input device 50 display device 100 library conversion device 200 pre-processing unit 210 sequential library information storage unit 220 sequential library table generation unit 230 sequential library table storage unit 240 parallel library information storage unit 250 parallel library table generation unit 260 parallel library table storage unit 270 Sequential / Parallel Library Initial Link Generation Unit 300 Storage Unit 300a Sequential / Parallel Library Link Structure Information 300b Program 400 Post-Processing Unit 410 Command Accepting Unit 420 Link Reconfiguration Processing Unit 420a Link Structure Exclusion Processing Unit 420b N-to-1 Link Structure Generation Unit 430 Library replacement processing unit 430a Consistency adjustment processing unit 430b Division data generation unit 430c Collection data generation unit 430d Parallel library combination unit 440 Library function search processing unit 45 Object code conversion unit

Claims (5)

プログラム上のライブラリに含まれる関数を異なるライブラリの関数に変換するライブラリ変換プログラムであって、
ライブラリに含まれる関数と該ライブラリと異なるライブラリに含まれる関数とを関連付けた情報であるライブラリリンク構造情報を生成するリンク構造情報生成手順と、
前記ライブラリリンク構造情報を基にして、ライブラリに含まれる関数を異なるライブラリで同等の機能を有する関数に変換する変換処理手順と、
をコンピュータに実行させることを特徴とするライブラリ変換プログラム。
A library conversion program for converting a function included in a library on a program into a function of a different library,
A link structure information generation procedure for generating library link structure information, which is information relating a function included in a library and a function included in a library different from the library;
A conversion processing procedure for converting a function included in the library into a function having an equivalent function in a different library based on the library link structure information;
A library conversion program characterized in that a computer is executed.
前記リンク構造情報生成手順は、逐次ライブラリに含まれる関数と並列ライブラリに含まれる関数とを関連付けたライブラリリンク構造情報を生成し、前記変換処理手順は、前記ライブラリリンク構造情報を基にして、逐次ライブラリに含まれる関数を並列ライブラリで同等の機能を有する関数に変換することを特徴とする請求項1に記載のライブラリ変換プログラム。   The link structure information generation procedure generates library link structure information associating a function included in the sequential library with a function included in the parallel library, and the conversion processing procedure is performed sequentially based on the library link structure information. The library conversion program according to claim 1, wherein a function included in the library is converted into a function having an equivalent function in a parallel library. 前記リンク構造情報生成手順は、前記逐次ライブラリに含まれる関数と関連付ける並列ライブラリの関数の精度および性能の情報を含んだ関連付先情報を取得する関連付先情報取得手順と、前記関連付先情報を基にして、前記逐次ライブラリの関数と並列ライブラリの関数とが1対1または多対1に関連付けられた情報であるライブラリリンク構造情報を生成するリンク生成手順とをさらにコンピュータに実行させることを特徴とする請求項2に記載のライブラリ変換プログラム。   The link structure information generation procedure includes a related destination information acquisition procedure for acquiring related destination information including information on accuracy and performance of a function of a parallel library to be associated with a function included in the sequential library, and the related destination information A link generation procedure for generating library link structure information, which is information associated with the sequential library function and the parallel library function in a one-to-one or many-to-one relationship, based on The library conversion program according to claim 2, wherein: 前記逐次ライブラリの関数に関連付けられる並列ライブラリの関数に対する入力データのデータ分割形式を解読し、前記並列ライブラリの関数の並列プロセスに利用されるデータを分割分配する分割関数を生成すると共に、該分割関数を前記プログラムに追加する分割関数生成手順をさらにコンピュータに実行させることを特徴とする請求項2または3に記載のライブラリ変換プログラム。   Decoding a data partitioning format of input data for a function of a parallel library associated with a function of the sequential library, generating a partitioning function for partitioning and distributing data used for a parallel process of the function of the parallel library, and the partitioning function 4. The library conversion program according to claim 2, further causing a computer to execute a dividing function generation procedure for adding a function to the program. 5. 前記逐次ライブラリの関数に関連付けられる並列ライブラリの関数に対する出力データのデータ分割形式を解読し、前記並列ライブラリの関数の並列プロセスから分割されたデータを収集し結合する収集関数を生成すると共に、該収集関数を前記プログラムに追加する収集関数生成手順をさらにコンピュータに実行させることを特徴とする請求項2、3または4に記載のライブラリ変換プログラム。   Deciphering the data partitioning format of the output data for the function of the parallel library associated with the function of the sequential library, generating a collection function for collecting and combining the split data from the parallel process of the function of the parallel library; 5. The library conversion program according to claim 2, further comprising causing a computer to execute a collection function generation procedure for adding a function to the program.
JP2004358144A 2004-12-10 2004-12-10 Library conversion program Expired - Fee Related JP4299228B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004358144A JP4299228B2 (en) 2004-12-10 2004-12-10 Library conversion program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004358144A JP4299228B2 (en) 2004-12-10 2004-12-10 Library conversion program

Publications (2)

Publication Number Publication Date
JP2006164142A JP2006164142A (en) 2006-06-22
JP4299228B2 true JP4299228B2 (en) 2009-07-22

Family

ID=36666064

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004358144A Expired - Fee Related JP4299228B2 (en) 2004-12-10 2004-12-10 Library conversion program

Country Status (1)

Country Link
JP (1) JP4299228B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5167897B2 (en) * 2007-04-27 2013-03-21 株式会社リコー Electronic device, information processing method, and information processing program
US8448193B2 (en) 2007-04-27 2013-05-21 Ricoh Company, Ltd. Image forming device, information processing method, and information processing program

Also Published As

Publication number Publication date
JP2006164142A (en) 2006-06-22

Similar Documents

Publication Publication Date Title
JP5950285B2 (en) A method for searching a tree using an instruction that operates on data having a plurality of predetermined bit widths, a computer for searching a tree using the instruction, and a computer thereof program
JP2003067185A (en) Application editing device and data processing method and program
US10191832B2 (en) Multi-language playback framework
JP4919825B2 (en) Program development apparatus, program development method and program
KR101535813B1 (en) System and method for dynamic updating of event composition rule for complex event processing
JP6222225B2 (en) Virtual machine placement determination apparatus, virtual machine placement determination method, and virtual machine placement determination program
CN110580189A (en) method and device for generating front-end page, computer equipment and storage medium
JP6996629B2 (en) Verification automation equipment, verification automation methods, and programs
JP4001286B2 (en) Program maintenance support apparatus, program maintenance support method, and program
JP2004341671A (en) Information processing system, control method, control program and recording medium
JP2015230582A (en) Program visualization device, program visualization method, and program visualization program
JP5398213B2 (en) Generating device, program, and generating method
JP6206865B2 (en) A method for converting a set of input character strings into at least one pattern expression that represents the set of input character strings as a character string, a method for extracting the conversion pattern as an approximate pattern expression, and a computer and a computer program thereof
CN103984554B (en) The generation method and device of Software for Design document
JP4299228B2 (en) Library conversion program
JP2006301989A (en) Method, apparatus and program for automatically generating program in computer language from block diagram
JP5354981B2 (en) Document management apparatus, document management method, and program
JP4686117B2 (en) Source code conversion apparatus, source code conversion method, and program
JP7260150B2 (en) WEBSITE DESIGN SUPPORT DEVICE, WEBSITE DESIGN SUPPORT METHOD, AND PROGRAM
JP2017010123A (en) Computer performing compilation, compiler method, and compiler program
JPH11143753A (en) Data converting device and method therefor and recording medium
JP6649584B2 (en) Parameterization method, information processing apparatus, and parameterization program
JP5596517B2 (en) Internationalized screen generation system and program
KR101894752B1 (en) Virtual Architecture Producing Apparatus, Runtime System, Multi Core System and Method thereof
JP2005202507A (en) Data compression device, data restoration device, template generation device, and data compression system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080801

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090414

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090416

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120424

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120424

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130424

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140424

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees