[go: up one dir, main page]

JPH11328134A - Data transmission / reception method between computers - Google Patents

Data transmission / reception method between computers

Info

Publication number
JPH11328134A
JPH11328134A JP10132364A JP13236498A JPH11328134A JP H11328134 A JPH11328134 A JP H11328134A JP 10132364 A JP10132364 A JP 10132364A JP 13236498 A JP13236498 A JP 13236498A JP H11328134 A JPH11328134 A JP H11328134A
Authority
JP
Japan
Prior art keywords
data
transmission
communication
computer
reception
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.)
Granted
Application number
JP10132364A
Other languages
Japanese (ja)
Other versions
JP3628514B2 (en
Inventor
Tsuneyuki Imaki
常之 今木
Nobutoshi Sagawa
暢俊 佐川
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP13236498A priority Critical patent/JP3628514B2/en
Publication of JPH11328134A publication Critical patent/JPH11328134A/en
Application granted granted Critical
Publication of JP3628514B2 publication Critical patent/JP3628514B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)
  • Computer And Data Communications (AREA)

Abstract

(57)【要約】 【課題】TCP/IPアプリケーションプログラムから
メッセージパッシング型のストリーム通信を利用可能に
する。 【解決手段】各計算機に設けられたエミュレーションラ
イブラリ112が、アプリケーションプログラム107
からの通信要求が指定する通信相手プロセスが並列計算
機101の内部であるか外部であるかを判別し、内部で
あれは高速通信ライブラリ135を起動して、高速内部
通信網105を介してメッセージパッシング型通信方式
でもってデータを送受信する。このデータの送受信は、
ストリーム通信を実現するように実行される。相手先が
並列計算機101の外部計算機104であるときには、
ライブラリ112は、TCP/IP処理ルーティン11
4にTCP/IPに従い通信を要求する。
(57) [Summary] A message passing type stream communication can be used from a TCP / IP application program. An emulation library provided in each computer is provided with an application program.
It determines whether the communication partner process specified by the communication request from is inside or outside the parallel computer 101, and if it is inside, starts the high-speed communication library 135 and passes the message through the high-speed internal communication network 105. Data is transmitted and received by the mobile communication system. This data transmission and reception
It is executed to realize stream communication. When the destination is the external computer 104 of the parallel computer 101,
The library 112 is a TCP / IP processing routine 11
4 requests communication according to TCP / IP.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、複数の種類の通信
網により接続された複数の計算機を有する計算機システ
ムにおける、計算機間のデータ送受信方法に係り、特に
メッセージパッシング型の通信を実行するのに好適な、
計算機間のデータ送受信方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for transmitting and receiving data between computers in a computer system having a plurality of computers connected by a plurality of types of communication networks, and more particularly to a method for executing message passing communication. Suitable,
The present invention relates to a method for transmitting and receiving data between computers.

【0002】[0002]

【従来の技術】計算機間の通信規約としてTCP/IP
が極めて一般的に使用されている。TCP/IPを使用
して他のプログラムと通信するように構成されたプログ
ラムを以下ではTCP/IPアプリケーションプログラ
ムと呼ぶ。このTCP/IPアプリケーションプログラ
ムからTCP/IP以外の通信規約を使用できるように
した計算機システムも存在する。すなわち、計算機シス
テムを構成する計算機が性能の異なる複数のネットワー
クにより構成され、そのシステムの内の計算機が他の計
算機と通信するときに、それらの計算機がその通信にこ
れらのネットワークのいずれを使用するかに依存して、
TCP/IPまたは他の通信規約を使用するシステムも
提案されている。例えば、バークレー大のSteven H.Rod
riguesらが開発したシステムは、TCP/IPプロトコ
ルで使用可能な広域のネットワークと、それより狭い領
域でより簡潔でオーバヘッドが低い通信規約を使用する
局所的なネットワークからなり、局所的なネットワーク
に接続された計算機同士は、この通信規約を使用して通
信し、広域のネットワークに接続された計算機同士は、
TCP/IP規約に従って通信する。たとえば、"High-
Performance Local-Area Communication With Fast Soc
ket", USENIX '97 Annual Technical Conference pp.25
7-274)参照。
2. Description of the Related Art TCP / IP is a protocol for communication between computers.
Are very commonly used. A program configured to communicate with another program using TCP / IP is hereinafter referred to as a TCP / IP application program. There is also a computer system in which a communication protocol other than TCP / IP can be used from the TCP / IP application program. That is, the computers constituting the computer system are configured by a plurality of networks having different performances, and when a computer in the system communicates with another computer, the computer uses any of these networks for the communication. Depending on
Systems using TCP / IP or other communication protocols have also been proposed. For example, Steven H. Rod at Berkeley
The system developed by rigues et al. consists of a wide area network that can be used with the TCP / IP protocol, and a local network that uses a simpler, lower-overhead protocol in a smaller area and connects to the local network. Computers communicated using this protocol, and computers connected to the wide area network
Communication is performed according to the TCP / IP protocol. For example, "High-
Performance Local-Area Communication With Fast Soc
ket ", USENIX '97 Annual Technical Conference pp.25
7-274).

【0003】この計算機システムには、TCP/IPア
プリケーションプログラムからもこの通信規約を利用で
きるようにするために、TCP/IPエミュレーション
ライブラリが用意されている。上記システムではこのT
CP/IPエミュレーションライブラリは、高速ソケッ
ト(Fast Socket)と呼ばれている。
The computer system is provided with a TCP / IP emulation library so that the TCP / IP application program can use the communication protocol. In the above system, this T
The CP / IP emulation library is called a fast socket (Fast Socket).

【0004】高速ソケットは、簡潔な通信規約としてワ
ークステーションクラスタ向けに開発されたアクティブ
メッセージ(Active Message)を用い
る。例えば 文献 T. von Eicken, D. E. Culler, S. C.
Goldstein, K. E. Schauser "Active Messages: a Mec
hanism for Integrated Communication and Computatio
n", in Proceedings of the 19th International Sympo
sium on Computer Architecture, May 1992 pp.256-266
参照。アクティブメッセージでは、データを送る側のア
プリケーションプログラムが受け手側のアプリケーショ
ンプログラムに割り込み、受け手側がその割り込みを契
機にデータ受信処理を行うという方法でデータをやり取
りする。
The high-speed socket uses an active message developed for a workstation cluster as a simple communication protocol. For example, references T. von Eicken, DE Culler, SC
Goldstein, KE Schauser "Active Messages: a Mec
hanism for Integrated Communication and Computatio
n ", in Proceedings of the 19th International Sympo
sium on Computer Architecture, May 1992 pp.256-266
reference. In the active message, the application program on the data transmitting side interrupts the application program on the receiving side, and the receiving side exchanges data in such a manner that the receiving side performs data reception processing triggered by the interruption.

【0005】並列計算機は、複数の計算機が互いに通信
しながら協調して1つの問題を解決することを目的とし
た計算機である。この目的を満たすため、一般に並列計
算機の内部の各計算機は高速の内部高速通信網により相
互に接続され、並列計算機内の少なくとも一部の計算機
は、さらに、LAN等のより広域のネットワークにより
外部の計算機に接続されている。
[0005] A parallel computer is a computer that aims to solve one problem in cooperation with a plurality of computers while communicating with each other. In order to satisfy this purpose, generally, the computers inside the parallel computers are interconnected by a high-speed internal high-speed communication network, and at least some of the computers in the parallel computers are further connected to an external network by a broader network such as a LAN. Connected to a calculator.

【0006】広域のネットワークに使用される通信規約
は主としてTCP/IPである。並列計算機は、内部高
速通信網を使用するために、各計算機に他の内部計算機
と内部高速通信網を介して通信するための高速な通信ハ
ードウェアとそのハードウエアを使用するための高速通
信ライブラリを設けている。現在、多くの並列計算機に
採用されている通信規約は、メッセージパッシング型の
通信である。メッセージパッシング型の通信は、送信ア
プリケーションプログラムが発行する送信命令と受信ア
プリケーションプログラムが発行する受信命令が一対一
に対応付けられた時に通信が行われるという通信であ
る。多くの場合、この通信方式は並列計算機内部におけ
る高速通信ハードウェアに適している。このメッセージ
パッシング型通信を実現するために使用される高速通信
ライブラリには、リモートメモリ書き込みライブラリあ
るいはPUTライブラリと呼ばれているものが主に使用
されている。
The communication protocol used for a wide area network is mainly TCP / IP. In order to use the internal high-speed communication network, the parallel computers use high-speed communication hardware for communicating with other internal computers via the internal high-speed communication network, and a high-speed communication library for using the hardware. Is provided. At present, the communication protocol adopted by many parallel computers is message-passing type communication. The message passing type communication is communication in which communication is performed when a transmission command issued by a transmission application program and a reception command issued by a reception application program are associated one-to-one. In many cases, this communication scheme is suitable for high-speed communication hardware inside a parallel computer. As a high-speed communication library used to realize the message passing type communication, a library called a remote memory writing library or a PUT library is mainly used.

【0007】並列計算機内部の通信のオーバヘッドは、
高速通信ハードウェアを使用することによりかなり減じ
ることができる。アクティブメッセージで用いる割り込
み型の通信方式では、割り込みのオーバヘッドが目立っ
てしまう。しかるに、メッセージパッシング型通信方式
は、割り込みを前提としないので、並列計算機の内部で
の通信にはアクティブメッセージ型通信よりも適してい
る。
[0007] The communication overhead inside the parallel computer is:
Significant reduction can be achieved by using high speed communication hardware. In the interrupt-type communication system used for the active message, the overhead of the interrupt becomes conspicuous. However, the message passing communication method does not require an interrupt, and is therefore more suitable for communication inside a parallel computer than active message communication.

【0008】[0008]

【発明が解決しようとする課題】前述のように、並列計
算機の内部高速通信網を使用するための通信規約は一般
にはメッセージパッシング型である。しかし、並列計算
機をビジネスの分野で利用する場合に使用するビジネス
用のアプリケーションプログラムは多くはTCP/IP
規約を使用するように構成されている。したがって、そ
のようなアプリケーションプログラムは、そのままでは
メッセージパッシング型通信方式をそのまま利用するこ
とはできない。しかも、メッセージパッシング型通信方
式を利用した状態で、ストリーム通信を実現する方法が
知られていない。また、割込を使用するアクティブメッ
セージ型通信で使用されるストリーム通信の実現方法を
そのままメッセージパッシング型通信でのストリーム通
信に利用するわけには行かない。
As described above, the communication protocol for using the internal high-speed communication network of the parallel computer is generally of a message passing type. However, many business application programs used when a parallel computer is used in the business field are mostly TCP / IP.
It is configured to use conventions. Therefore, such an application program cannot directly use the message passing communication system as it is. In addition, there is no known method for realizing stream communication using a message passing communication system. Further, the method of realizing the stream communication used in the active message type communication using the interrupt cannot be directly used for the stream communication in the message passing type communication.

【0009】従って本発明の目的は、メッセージパッシ
ング型通信を実行するように構成されている計算機上で
動作する複数のアプリケーションプログラム間でストリ
ーム通信を実行可能にする計算機間データ送受信方法を
提供することである。
Accordingly, an object of the present invention is to provide an inter-computer data transmission / reception method which enables stream communication between a plurality of application programs operating on a computer configured to execute message passing communication. It is.

【0010】本発明のより具体的な目的は、第1の計算
機ネットワークを介して、TCP/IPのごとき、メッ
セージパッシング型通信と異なる通信規約を用いて通信
を実行するように構成されている複数のアプリケーショ
ンプログラム間で、その計算機ネットワークよりも高速
な通信網を使用して、かつ、メッセージパッシング型通
信を実行可能にする計算機間データ送受信方法を提供す
ることである。
A more specific object of the present invention is to provide a plurality of communication apparatuses configured to execute communication via a first computer network using a communication protocol different from that of message passing communication such as TCP / IP. The present invention provides an inter-computer data transmission / reception method that enables a message-passing communication to be executed between application programs using a communication network faster than the computer network.

【0011】さらに、本発明の他の目的は、第1の通信
網とそれより高速の第2の通信網に接続された計算機上
で動作し、他のアプリケーションプログラムとの間で、
たとえばTCP/IP通信規約のような第1の通信規約
に基づいて通信するように構成されたアプリケーション
プログラムが、第1の通信網に接続された他の計算機上
で動作する他のアプリケーションプログラムとの間で、
その通信規約に基づいた通信を実行することを可能にす
るとともに、第2の通信網に接続された他の計算機上で
動作する他のアプリケーションプログラムとの間でその
第2の通信網を使用した高速の通信を実行する行うこと
を可能にする計算機間データ送受信方法を提供すること
である。
Still another object of the present invention is to operate on a computer connected to a first communication network and a second communication network which is faster than the first communication network.
For example, an application program configured to communicate on the basis of a first communication protocol such as a TCP / IP communication protocol is connected to another application program operating on another computer connected to the first communication network. Between,
It is possible to execute communication based on the communication protocol, and to use the second communication network with another application program running on another computer connected to the second communication network. An object of the present invention is to provide an inter-computer data transmission / reception method capable of performing high-speed communication.

【0012】さらに、本発明の他の具体的な目的は、上
記第2の通信網を使用した通信を、メッセージパッシン
グ型の通信とすることができる計算機間データ送受信方
法を提供することである。
Still another object of the present invention is to provide an inter-computer data transmission / reception method in which communication using the second communication network can be message-passing type communication.

【0013】[0013]

【課題を解決するための手段】上記目的を達成するため
に、本発明による計算機間データ送受信方法では、第1
の計算機上で実行されている第1のアプリケーションプ
ログラムが発行した複数の送信命令により指定される複
数の送信データのそれぞれを、第2の計算機上で実行さ
れている第2のアプリケーションプログラムが発行した
複数の受信命令に応答して、メッセージパッシング型の
通信で受信する。この受信を第2の計算機上に設けられ
たエミュレーションライブラリにより制御する。
In order to achieve the above object, a method for transmitting and receiving data between computers according to the present invention comprises the following steps.
Each of the plurality of transmission data specified by the plurality of transmission instructions issued by the first application program executed on the second computer is issued by the second application program executed on the second computer. In response to a plurality of reception commands, the reception is performed by message passing type communication. This reception is controlled by an emulation library provided on the second computer.

【0014】さらに、上記複数の送信データの連なりか
らなるひと繋がりのデータの内、上記複数の受信命令に
より指定されるサイズ部分に区分して得られる部分をそ
れぞれの受信命令が指定する複数のバッファに格納する
というストリーム通信を実現するように、受信されたそ
れぞれの送信データを処理する。この処理を、上記エミ
ュレーションライブラリにより制御する。
[0014] Further, a plurality of buffers, each of which is obtained by dividing a portion obtained by dividing into a size portion specified by the plurality of reception commands, out of the concatenated data formed by the concatenation of the plurality of transmission data, with each reception command. Each of the received transmission data is processed so as to realize the stream communication of storing the transmission data. This processing is controlled by the emulation library.

【0015】より具体的には、本発明による計算機間デ
ータ送受信方法は、以下の処理を実行する。
More specifically, the inter-computer data transmission / reception method according to the present invention executes the following processing.

【0016】(a)送信側アプリケーションが一回の送
信命令によって送信しようとするデータの長さを、受信
側エミュレーションライブラリにより検知し、(b)上
記の送信データ長を、アプリケーションが一回の受信命
令によって指定しているデータ受け取り長と受信側エミ
ュレーションライブラリにより比較し、(c)上記の比
較で、送信データ長がデータ受け取り長より長ければ、
受信側エミュレーションライブラリが、一旦メモリ上に
確保したバッファ領域にデータの全てを受信して、そこ
からアプリケーションが指定したデータ受け取り長分だ
けのデータをアプリケーション領域にコピーし、送信デ
ータ長がデータ受け取り長以下であれば、受信側エミュ
レーションライブラリが、アプリケーション領域にデー
タを直接受信する。
(A) The length of data to be transmitted by the transmission application in one transmission command is detected by the reception emulation library, and (b) the transmission data length is detected by the application once. The data reception length specified by the instruction is compared with the reception side emulation library. (C) In the above comparison, if the transmission data length is longer than the data reception length,
The receiving-side emulation library receives all of the data in the buffer area once secured in memory, copies the data for the data reception length specified by the application from there to the application area, and sets the transmission data length to the data reception length. In the following cases, the receiving emulation library directly receives the data in the application area.

【0017】(d)アプリケーションが受信命令を発行
した時に、バッファ領域にデータが残っている場合に
は、そこからアプリケーション領域にデータをコピーす
る。
(D) When data is left in the buffer area when the application issues the reception command, the data is copied from there to the application area.

【0018】さらにより具体的には、本発明によるデー
タ送受信方法を実現するために、TCP/IPエミュレ
ーションライブラリを用意する。このライブラリは、T
CP/IPのソケットアプリケーションプログラムイン
タフェースと同一のインタフェースを持ち、通信相手が
並列計算機の外部であったら従来のシステムコールを、
内部であったらMPI等の並列計算機用メッセージパッ
シング型通信方式による高速通信網を用いる、という切
り分けを行う。すなわち、このTCP/IPエミュレー
ションライブラリには以下のような特徴を持たせる。
More specifically, a TCP / IP emulation library is prepared to realize the data transmission / reception method according to the present invention. This library is
It has the same interface as the CP / IP socket application program interface. If the communication partner is outside the parallel computer, the conventional system call is executed.
If it is inside, it is decided to use a high-speed communication network based on a message passing communication system for parallel computers such as MPI. That is, the TCP / IP emulation library has the following features.

【0019】(1)並列計算機内部で通信する場合は、
メッセージパッシング型通信方式に適した通信手順を用
いて、TCP/IPと同等のストリーム通信サービスを
提供する。
(1) When communicating within a parallel computer,
A stream communication service equivalent to TCP / IP is provided using a communication procedure suitable for a message passing communication system.

【0020】(2)TCP/IPエミュレーションライ
ブラリとして適当な手段を用いて通信方法を切り分け
る。
(2) The communication method is separated using an appropriate means as a TCP / IP emulation library.

【0021】(3)外部通信のデータと内部通信のデー
タをスピンループによって検出する。もしくは外部通信
のデータと内部通信のデータを別々のスレッドで検出す
る。
(3) Data of external communication and data of internal communication are detected by a spin loop. Alternatively, data of external communication and data of internal communication are detected by separate threads.

【0022】[0022]

【発明の実施の形態】<従来の技術とその問題点>本発
明の実施の形態を説明する前に、従来の技術とその問題
点を説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS <Prior Art and Problems> Prior to describing an embodiment of the present invention, a conventional technique and its problems will be described.

【0023】(1)TCP/IP 図13にTCP/IPの階層を示す。TCP/IPで
は、下からリンク層301,IP層302,TCP層3
03,アプリケーション層306の4階層を定めてい
る。実際にはリンク層301の下に物理層が存在するが
簡単化のためにこの層には言及しない。以下では、簡単
化のためにアプリケーション層より下の層303,30
2,301からなる層群304をまとめてTCP/IP
層と呼ぶ。一般にTCP/IPが定める手順で通信を行
なうために必要なプログラム(以下、TCP/IP処理
ルーチンと呼ぶ)はOSに含まれる。TCP/IPが定
める手順で通信を実行するには、TCP/IP層304
を構成する複数の層の各々によりそれぞれ特定の処理が
実行される。本明細書では、これらの層がそれぞれ実行
する複数の処理あるいはそれらの処理を実行する複数の
プログラムルーチンを総称してTCP/IP処理ルーチ
ンと呼ぶ。
(1) TCP / IP FIG. 13 shows the hierarchy of TCP / IP. In TCP / IP, a link layer 301, an IP layer 302, a TCP layer 3
03, four layers of the application layer 306 are defined. Actually, a physical layer exists below the link layer 301, but this layer is not described for simplicity. In the following, for simplicity, layers 303 and 30 below the application layer will be described.
TCP / IP combining layer group 304 consisting of 2,301
Called layer. Generally, a program (hereinafter, referred to as a TCP / IP processing routine) necessary for performing communication according to a procedure determined by TCP / IP is included in the OS. To execute communication according to the procedure defined by TCP / IP, the TCP / IP layer 304
The specific processing is respectively performed by each of the plurality of layers constituting. In this specification, a plurality of processes respectively executed by these layers or a plurality of program routines for executing the processes are collectively referred to as a TCP / IP processing routine.

【0024】アプリケーションプログラムがTCP/I
P処理ルーチンを利用するためのインタフェースとして
は、一般にソケットアプリケーションプログラミングイ
ンタフェース(ソケットAPI)111が用いられる。
アプリケーションプログラムがTCP/IP処理ルーチ
ンを利用するために、ソケットライブラリと呼ばれるシ
ステムコール群がOSの一部として設けられている。
The application program is TCP / I
As an interface for utilizing the P processing routine, a socket application programming interface (socket API) 111 is generally used.
In order for the application program to use the TCP / IP processing routine, a system call group called a socket library is provided as a part of the OS.

【0025】なお、本明細書では、データ受信のための
システムコールおよび関数あるいはデータ送信のための
システムコールおよび関数を呼び出すことを、それぞれ
の機能と組み合わせて受信命令あるいは送信命令を発行
すると記載することがある。ソケットアプリケーション
プログラムインタフェースは、ソケットライブラリのア
プリケーションプログラムインタフェースとして定めら
れている。ソケットアプリケーションプログラムインタ
フェースに従って記述された、TCP/IPで通信を行
なうアプリケーションプログラム(以下、TCP/IP
アプリケーションプログラムと呼ぶ)の例を以下に示
す。
In this specification, calling a system call and a function for data reception or calling a system call and a function for data transmission is to issue a reception command or a transmission command in combination with each function. Sometimes. The socket application program interface is defined as an application program interface of a socket library. An application program (hereinafter, referred to as TCP / IP) that performs communication using TCP / IP described according to a socket application program interface.
An example of the application program will be described below.

【0026】 (サーバ側) (クライアント側) sa=socket(AF_INET,SOCK_STREAM,0); sb0=socket(AF_INET,SOCK_STREAM,0); bind(sa, server, slen); listen(sa, 5); sa1=accept(sa, &client, &clen); connect(sb0, server, slen); read(sa1, buffer1, length1); write(sb0, buffer0, length0); read(sa1, buffer2, length2); write(sb0, buffer3, length3); ・ ・ ・ ・ ・ ・ close(sa1); close(sa); close(sb0); まず、他と通信を行おうとするサーバ側のTCP/IP
アプリケーションプログラムおよびクライアント側のT
CP/IPアプリケーションプログラムは、それが実行
中の計算機に設けられたTCP/IP処理ルーチンに含
まれたシステムコールソケット(socket)を呼び
出す。呼び出されたシステムコールソケットは、通信端
の役目を果たす、ソケットと呼ばれるオブジェクトを生
成し、ソケット記述子を返す。上の例ではサーバ側、ク
ライアント側のTCP/IPアプリケーションプログラ
ムは、それぞれに返されるソケット記述子をsaまたは
sb0として受け取る。
(Server side) (client side) sa = socket (AF_INET, SOCK_STREAM, 0); sb0 = socket (AF_INET, SOCK_STREAM, 0); bind (sa, server, slen); listen (sa, 5); sa1 = accept (sa, & client, &clen); connect (sb0, server, slen); read (sa1, buffer1, length1); write (sb0, buffer0, length0); read (sa1, buffer2, length2); write (sb0, buffer3, length3); ・ ・ ・ ・ ・ ・ close (sa1); close (sa); close (sb0);
Application program and client-side T
The CP / IP application program calls a system call socket (socket) included in a TCP / IP processing routine provided in the computer on which the CP / IP application program is running. The called system call socket creates an object called a socket, which acts as a communication end, and returns a socket descriptor. In the above example, the server-side and client-side TCP / IP application programs receive the returned socket descriptors as sa or sb0, respectively.

【0027】ソケット記述子は、アプリケーションプロ
グラム内でソケット毎に一意に決定されるソケットの識
別子(ID)であり、整数値からなる。生成されたソケ
ットに対する操作は、全てこのソケット記述子を指定し
て行う。以下、特に断らない限り、ソケットとソケット
記述子は同義であるとして説明する。上のシステムコー
ルの引数AF_INETは、アドレスファミリインタネ
ットを表し、インタネットを介した通信にソケットを使
用することを示す。さらに、引数SOCK_STREA
Mは、ストリーム通信を要求する。最後の引数はプロト
コルを指定する引数である。この値が0のときには、プ
ロトコルはその引数より前の二つの引数により決まる。
今の場合には、TCP/IPプロトコルを使用すること
になる。ソケットが生成された後、サーバ側とクライア
ント側のTCP/IPアプリケーションプログラムは異
なる手順でソケットの接続処理を行う。
The socket descriptor is a socket identifier (ID) uniquely determined for each socket in the application program, and is composed of an integer value. All operations on the created socket are performed by specifying this socket descriptor. In the following description, unless otherwise specified, the socket and the socket descriptor are synonymous. The argument AF_INET of the above system call represents the address family Internet, and indicates that the socket is used for communication via the Internet. In addition, the argument SOCK_STREA
M requests stream communication. The last argument is the one that specifies the protocol. When this value is zero, the protocol is determined by the two arguments preceding that argument.
In this case, the TCP / IP protocol will be used. After the socket is created, the TCP / IP application programs on the server side and the client side perform socket connection processing in different procedures.

【0028】サーバ側は、TCP/IP処理ルーチンに
含まれたシステムコールバインド(bind)を呼び出
す。呼び出されたシステムコールバインドは、引数で指
定されたソケットsaに引数で指定された名前を対応付
ける。名前は、IPアドレスとポート番号の組合わせか
らなる。上の例では、slenで指定される大きさを持
つ構造体serverに格納されたIPアドレスとポー
ト番号の組からなる名前にソケット識別子saが対応付
けられる。サーバ側は、さらにTCP/IP処理ルーチ
ンに含まれたシステムコールリスン(listen)を
呼び出す。
The server calls a system call bind included in the TCP / IP processing routine. The called system call bind associates the socket sa specified by the argument with the name specified by the argument. The name is composed of a combination of an IP address and a port number. In the above example, the socket identifier sa is associated with the name composed of the pair of the IP address and the port number stored in the structure server having the size specified by slen. The server further calls a system call listen included in the TCP / IP processing routine.

【0029】このシステムコールリスンは、引数で指定
されたソケットsaを接続要求の受領のためのソケット
に設定する。このシステムコールの第2の引数は、その
接続要求および他の接続要求を一時的に保持するのに用
いるキューに要求するサイズを表し、今の場合には、こ
のコールは、5個の接続要求を保持可能なキューを要求
している。
This system call listen sets the socket sa specified by the argument as a socket for receiving a connection request. The second argument of this system call represents the size to request from the queue used to temporarily hold the connection request and other connection requests, in this case the call Requesting a queue that can hold.

【0030】以上の処理の結果、論理的には、サーバ側
とクライアント側の間に通信路が決定されたことにな
る。
As a result of the above processing, a communication path is logically determined between the server side and the client side.

【0031】その後、サーバ側は、TCP/IP処理ル
ーチンに含まれたシステムコールアクセプト(acce
pt)を呼び出す。このシステムコールは、引数により
指定されたソケットsaを接続要求の待ち状態にする。
このシステムコールの第2,第3の引数は、待つべき接
続要求の発行元クライアント側のIPアドレスと長さを
表す。
Then, the server side accepts a system call (accept) included in the TCP / IP processing routine.
pt). This system call puts the socket sa specified by the argument in a waiting state for a connection request.
The second and third arguments of this system call indicate the IP address and length of the client that issued the connection request to be waited for.

【0032】一方、クライアント側は、TCP/IP処
理ルーチンに含まれたシステムコールコネクト(con
nect)を呼び出す。このシステムコールは、引数で
指定された名前、今の場合にはサーバ側のソケットsa
に付けられた名前(構造体serverに格納された、
IPアドレスsin_addrとポート番号sin_p
ortの組み合わせ)に対して引数で指定されたソケッ
トsb0を接続する。
On the other hand, the client side transmits a system call connect (conn) included in the TCP / IP processing routine.
Nect). This system call returns the name specified by the argument, in this case the server side socket sa.
Name (stored in the structure server)
IP address sin_addr and port number sin_p
(or combination of ort) is connected to the socket sb0 specified by the argument.

【0033】さらに、サーバ側の計算機では、先に呼び
出されたシステムコールアクセプトが、この接続要求を
受信し、システムコールアクセプトに対する前述の引数
が指定するソケットsa1をこのクライアント側との通
信のためのソケットとして新たに生成する。こうして、
サーバ側のソケットsa1とクライアント側のソケット
sb0との間で通信路が確立されたことになる。
Further, in the server-side computer, the previously called system call accept receives the connection request, and sets the socket sa1 specified by the above-mentioned argument for the system call accept for communication with the client side. Create a new socket. Thus,
This means that a communication path has been established between the server-side socket sa1 and the client-side socket sb0.

【0034】ソケット間の接続が確立された状態でクラ
イアント側がサーバ側にデータを送信する時には、クラ
イアント側は、TCP/IP処理ルーチンに含まれたシ
ステムコールライト(write)を呼び出す。このシ
ステムコールに対する引数では、送信すべきデータを保
持するのに用いるバッファのアドレスbuffer0と
そのバッファの長さlength0を指定する。システ
ムコールライトは、このバッファ内のデータをこのシス
テムコールが指定するソケットsb0を用いて送信す
る。サーバ側はTCP/IP処理ルーチンに含まれたシ
ステムコールリード(read)を呼び出す。このシス
テムコールは、その引数で指定されたソケットsa1を
介して転送されたデータを受信し、引数で指定されたア
ドレスbuffer1のバッファに書き込む。このよう
にして、2つのアプリケーションプログラムの間でデー
タが転送される。もし必要ならば、クライアント側は複
数の後続のデータをそれぞれ送信するために複数のライ
トシステムコールを呼び出し、サーバ側はそれらの後続
のデータを受信するために一つまたは複数のリードシス
テムコールを呼び出す。
When the client sends data to the server with the connection between the sockets established, the client calls a system call write included in the TCP / IP processing routine. The arguments to this system call specify the address buffer0 of the buffer used to hold the data to be transmitted and the length length0 of the buffer. The system call write transmits the data in the buffer using the socket sb0 specified by the system call. The server calls a system call read included in the TCP / IP processing routine. This system call receives the data transferred via the socket sa1 specified by the argument and writes the data into the buffer at the address buffer1 specified by the argument. Thus, data is transferred between the two application programs. If necessary, the client calls multiple write system calls to send multiple subsequent data, respectively, and the server calls one or more read system calls to receive the subsequent data. .

【0035】ソケット記述子は、ファイルへの入出力や
標準入出力などを行う際に用いられる、ファイル記述子
の一種として定義されている。このためソケットアプリ
ケーションプログラムインタフェースでは、ファイル等
の入出力を行う場合と同様のインタフェースを通して、
データの送受信を行うことができる。
The socket descriptor is defined as a type of file descriptor used when performing input / output to a file or standard input / output. For this reason, in the socket application program interface, through the same interface as when inputting and outputting files etc.,
Data can be transmitted and received.

【0036】サーバ側とクライアント側のプログラムの
間の通信が終了したときには、サーバ側は、システムコ
ールクローズ(close)を呼び出し、引数で指定さ
れたソケットsa1を閉鎖する。サーバ側は、さらに同
じシステムコールクローズを再度呼び出し、システムコ
ールクローズは今度はソケットsaを閉鎖する。クライ
アント側も同様にシステムコールクローズを呼び出し
て、このシステムコールはソケットsb0を閉鎖する。
When the communication between the server side and the client side programs is completed, the server side calls a system call close to close the socket sa1 specified by the argument. The server side calls the same system call close again, and this closes the socket sa this time. The client side similarly calls a system call close, and this system call closes the socket sb0.

【0037】(2) 高速ソケットにおける通信方法の
切り替え 従来のTCP/IPでは、システムコールバインドによ
ってIPアドレスとポート番号からなる名前(serv
er)をソケット(sa)に対応付けていた。高速ソケ
ットでは、この時、さらに高速通信専用のソケットを以
下のように生成する。まず、アプリケーションがシステ
ムコールバインドの呼び出し時に指定する名前のポート
番号(構造体serverに格納されたポート番号si
n_port)にハッシュ関数を施して、新たにシャド
ウポート番号を導き出す。次に、システムコールソケッ
トを呼び出して、シャドウソケットを新規に生成する。
最後にバインドシステムコールを呼び出して、シャドウ
ソケットにシャドウポート番号を対応付ける。高速通信
を行なう場合は、サーバおよびクライアントがacce
ptおよびconnectを呼び出して接続するとき
に、このシャドウソケットを用いることで高速通信専用
の通信路を貼る。
(2) Switching of communication method in high-speed socket In the conventional TCP / IP, a name (serv
er) is associated with the socket (sa). At this time, in the high-speed socket, a socket dedicated to high-speed communication is generated as follows. First, the port number (the port number si stored in the structure server) of the name specified when the application calls the system call bind
n_port) is subjected to a hash function to derive a new shadow port number. Next, a shadow socket is newly generated by calling a system call socket.
Finally, call the bind system call to associate the shadow port number with the shadow socket. When performing high-speed communication, the server and client
When calling and connecting pt and connect, a communication path dedicated to high-speed communication is attached by using the shadow socket.

【0038】この方法では、システムコールバインドや
システムコールリスンが呼び出される時に、特別な処理
が必要となる。
In this method, special processing is required when a system call bind or a system call listen is called.

【0039】(3)TCP/IP処理ルーチンによるス
トリーム通信 TCP/IPのソケットライブラリは、ストリーム通信
をサービスする。ストリーム通信とは、送信側のアプリ
ケーションプログラムが一連のライトシステムコールに
より送る複数のデータをひと繋がりのデータストリーム
として処理し、そのデータストリームを受信側のアプリ
ケーションプログラムが発行する一つあるいは複数のリ
ードシステムコールが指定する任意の長さを有する一つ
あるいは複数のデータに切り分けて受け取るという通信
方法である。
(3) Stream Communication by TCP / IP Processing Routine The TCP / IP socket library services stream communication. Stream communication refers to one or a plurality of read systems in which a plurality of data sent by a transmitting application program by a series of write system calls are processed as a continuous data stream, and the data stream is issued by a receiving application program. This is a communication method in which one or more pieces of data having an arbitrary length designated by a call are divided and received.

【0040】図14を用いて従来のストリーム通信の動
作を説明する。ここでは、送信アプリケーションプログ
ラム801が受信アプリケーションプログラム802に
データを送る例を示している。送信アプリケーションプ
ログラム801は、まず第1のライトシステムコールを
呼び出してそのプログラムのバッファ803内の50キ
ロバイト(KB)のデータを送信する(805)。な
お、図14では単位KBは簡単化のために省略してい
る。送信側のTCP/IP処理ルーチンは、バッファ8
03内のこの送信データを一旦OS内に確保したバッフ
ァ(図示せず)にコピーし、複数のパケットに分割し
て、受信側OSに送信する。 通常パケットのサイズは
40〜1500バイトである。受信側OSは、それらの
パケットをOS内に確保した複数のバッファ(図示せ
ず)に受け取り、これらのパケットをリスト状に繋い
で、データストリームを再構成する。送信アプリケーシ
ョンプログラム801は、さらに第2のライトシステム
コールを発行してそのプログラムの他のバッファ804
内の80KBのデータを送信する(806)。このとき
も送信側のTCP/IP処理ルーチンと受信側のTCP
/IP処理ルーチンは同様に動作して、このデータを先
に送信されたデータと組み合わせて一つのデータストリ
ームとしてOS内の前述のバッファに保持する。
The operation of the conventional stream communication will be described with reference to FIG. Here, an example is shown in which the transmission application program 801 sends data to the reception application program 802. The transmission application program 801 first calls the first write system call and transmits 50 kilobytes (KB) of data in the buffer 803 of the program (805). In FIG. 14, the unit KB is omitted for simplification. The TCP / IP processing routine on the transmission side
The transmission data in 03 is temporarily copied to a buffer (not shown) secured in the OS, divided into a plurality of packets, and transmitted to the receiving OS. The size of a normal packet is 40 to 1500 bytes. The receiving OS receives the packets in a plurality of buffers (not shown) secured in the OS, connects the packets in a list, and reconfigures the data stream. The transmission application program 801 further issues a second write system call to send another buffer 804 of the program.
The data of 80 KB is transmitted (806). At this time, the TCP / IP processing routine on the transmission side and the TCP
The / IP processing routine operates in the same manner, and combines this data with the previously transmitted data and stores it as one data stream in the aforementioned buffer in the OS.

【0041】図において、809はOS900内に保持
されたこのデータストリームを模式的に表す。先頭のデ
ータ807、後続のデータ808はそれぞれ上記第1、
第2のライトシステムコールにより送信されたそれぞれ
50KB、80KBのデータを表す。ストリーム通信で
は、受信アプリケーションプログラムは、これらのデー
タを一本の連続した130KBのデータストリーム80
9として捉える。送信アプリケーションプログラム80
1内のバッファ803、804内のデータは、OS90
0内のデータストリーム809内のデータ部分807,
809をそれぞれ保持する。このための、受信アプリケ
ーションプログラム802は、第1のリードシステムコ
ールを発行して、ストリームデータ809内の50KB
の先頭データ807の内の30KBを受信アプリケーシ
ョンプログラム802の30KBのバッファ812に受
け取ることを要求する(814)。受信側のTCP/I
P処理ルーチンは、このリードシステムコールに応答し
て、このデータストリーム809から先頭の30KBの
データ810をバッファ812にコピーする。受信アプ
リケーションプログラム802がさらに第2のリードシ
ステムコールを発行すると、このシステムコールが指定
する長さに従って、ストリームデータ809内にある残
りの100KBのデータ811をこのシステムコールが
指定するバッファ813にコピーする(815)。
In the figure, reference numeral 809 schematically shows this data stream held in the OS 900. The first data 807 and the subsequent data 808 are the first data and the second data 808, respectively.
The data represents 50 KB and 80 KB, respectively, transmitted by the second write system call. In stream communication, the receiving application program converts these data into one continuous 130 KB data stream 80.
Catch as 9. Transmission application program 80
The data in the buffers 803 and 804 in the
0, a data portion 807 in a data stream 809,
809 respectively. For this purpose, the reception application program 802 issues a first read system call and sets the 50 KB in the stream data 809.
Of the leading data 807 of the receiving application program 802 in the 30 KB buffer 812 of the receiving application program 802 (814). TCP / I on the receiving side
The P processing routine copies the leading 30 KB data 810 from the data stream 809 to the buffer 812 in response to the read system call. When the receiving application program 802 further issues the second read system call, the remaining 100 KB data 811 in the stream data 809 is copied to the buffer 813 specified by the system call according to the length specified by the system call. (815).

【0042】(4)アクティブメッセージ型通信でのス
トリーム通信 上記高速ソケットを使用したシステムでは、アクティブ
メッセージ型の通信を採用しながらストリーム通信を実
現している。すなわち、このシステムでは、送信側のア
プリケーションプログラムから送信要求が発行される
と、この送信要求は、受信側のアプリケーションプログ
ラムから受信要求が発行されるのを待たないで実行され
る。送信要求は、受信側の計算機に割り込みを発生し、
この割り込みにより割り込みハンドラーが起動され、送
信データは、この割り込みハンドラー内のバッファに一
旦受信される。受信側のアプリケーションプログラムが
受信要求を発行すると、割り込みハンドラーは、既に受
信されたデータの内、この受信要求が要求する大きさの
データを、受信側のアプリケーションプログラムのバッ
ファに転送する。もし、受信側のアプリケーションプロ
グラムが要求するサイズが、受信済みのデータのサイズ
より小さければ、受信要求の処理が終了する。割り込み
ハンドラーに保持された残りのデータは、受信側のアプ
リケーションプログラムから新たな受信要求が発行され
たときに、そのアプリケーションプログラムのバッファ
に転送される。
(4) Stream communication in active message type communication In the system using the high-speed socket, stream communication is realized while employing active message type communication. That is, in this system, when a transmission request is issued from a transmission-side application program, the transmission request is executed without waiting for a reception request to be issued from a reception-side application program. The transmission request generates an interrupt on the receiving computer,
This interrupt activates the interrupt handler, and the transmission data is temporarily received in a buffer in the interrupt handler. When the receiving-side application program issues a receiving request, the interrupt handler transfers, to the buffer of the receiving-side application program, data of a size required by the receiving request among the data already received. If the size requested by the application program on the receiving side is smaller than the size of the received data, the processing of the receiving request ends. The remaining data held in the interrupt handler is transferred to the buffer of the receiving application program when a new receiving request is issued from the receiving application program.

【0043】逆に、受信側のアプリケーションプログラ
ムが要求するサイズが、受信済みのデータのサイズより
大きければ、割り込みハンドラーは、送信側のアプリケ
ーションプログラムがその後データを送信してきたとき
に、そのデータを、受信側のアプリケーションプログラ
ムに供給する。受信側の割り込みハンドラーは、送信側
のアプリケーションプログラムが送信要求を発行する前
に、受信側のアプリケーションプログラムから後続の受
信要求が発行されたときにも、同様にその後送信側のア
プリケーションプログラムが後続のデータをその後送信
してきたときに、その後続のデータを受信側のアプリケ
ーションプログラムに供給する。もし、この後続のデー
タが、上記最初の受信要求が要求する不足のデータのサ
イズあるいは上記後続の受信要求が要求するデータのサ
イズより大きければ、割り込みハンドラーは、あまりの
データをさらに後続の受信要求のために保持する。
Conversely, if the size requested by the receiving-side application program is larger than the size of the received data, the interrupt handler replaces the data when the transmitting-side application program subsequently transmits the data. Supply to the receiving application program. Similarly, when a receiving request is issued from a receiving application program before the transmitting application program issues a sending request, the receiving interrupt handler also executes a subsequent sending application program. When the data is subsequently transmitted, the subsequent data is supplied to the application program on the receiving side. If this subsequent data is larger than the size of the missing data required by the first receive request or the size of the data required by the subsequent receive request, the interrupt handler will reduce the amount of data to the subsequent receive request. Hold for.

【0044】こうして、送信側のアプリケーションプロ
グラムが発行する複数の送信要求により送信される複数
のデータを、受信側のアプリケーションプログラムが発
行する一連の受信要求に応答して受信側のアプリケーシ
ョンプログラムに供給する。こうして、この方法では、
割り込みハンドラー内のバッファに送信データを一旦保
持することにより、ストリーム通信を実現している。
Thus, a plurality of data transmitted by a plurality of transmission requests issued by the transmitting application program are supplied to the receiving application program in response to a series of receiving requests issued by the receiving application program. . Thus, in this method,
Stream communication is realized by temporarily storing transmission data in a buffer in the interrupt handler.

【0045】しかし、割込を使用しないメッセージパッ
シング型の通信では、このような方法を使用してストリ
ーム通信を実現できない。
However, in a message passing type communication that does not use an interrupt, stream communication cannot be realized using such a method.

【0046】以下、本発明に係る計算機間データ送受信
方法を図面に示したいくつかの実施の形態を参照してさ
らに詳細に説明する。なお、以下においては、同じ参照
番号は同じものもしくは類似のものを表わすものとす
る。また、発明の第2の実施の形態以降においては、発
明の第1の実施の形態との相違点を主に説明するに止め
る。
Hereinafter, a method for transmitting and receiving data between computers according to the present invention will be described in more detail with reference to some embodiments shown in the drawings. In the following, the same reference numerals represent the same or similar ones. Further, in the second and subsequent embodiments of the invention, only the differences from the first embodiment of the invention will be mainly described.

【0047】<発明の実施の形態1> (1)装置の概要 図1は、本発明に係る計算機間送受信方法を実行するた
めの計算機システムの一例を示す。図において、並列計
算機101の内部の2台の計算機102,103と、1
台の外部計算機104とがお互いに通信網で繋がってい
ると仮定する。実際には、並列計算機101の内部およ
び外部の計算機の台数はそれぞれ任意である。内部の計
算機102と103は内部高速通信網105で繋がって
おり、内部の計算機102,103にはそれぞれ内部高
速通信網105専用のネットワークインタフェースハー
ドウェア119,120が存在する。内部高速通信網1
05は、複数のパケットを互いに並列にかつ高速に転送
可能なネットワーク、たとえばハイパクロスバスイッチ
などにより構成される。また、内部の計算機102,1
03の全てと外部の計算機104はグローバルな通信網
106に繋がっており、各計算機にはそれぞれ通信網1
06専用のネットワークインタフェースハードウェア1
21,122,123が存在する。
<First Embodiment of the Invention> (1) Outline of Apparatus FIG. 1 shows an example of a computer system for executing an inter-computer transmission / reception method according to the present invention. In the figure, two computers 102 and 103 inside a parallel computer 101 and 1
It is assumed that two external computers 104 are connected to each other via a communication network. Actually, the number of computers inside and outside the parallel computer 101 is arbitrary. The internal computers 102 and 103 are connected by an internal high-speed communication network 105, and the internal computers 102 and 103 have network interface hardware 119 and 120 dedicated to the internal high-speed communication network 105, respectively. Internal high-speed communication network 1
Reference numeral 05 denotes a network capable of transferring a plurality of packets in parallel with each other at high speed, such as a hyper crossbar switch. Also, the internal computers 102, 1
03 and the external computer 104 are connected to a global communication network 106, and each computer has a communication network 1
06 network interface hardware 1
21, 122, and 123 exist.

【0048】データの送受信は、各計算機のメモリ12
4,125,126にロードされているアプリケーショ
ンプログラム107,108,109の間で行われる。
また、各メモリにはアプリケーションプログラムの他に
OS127,128,129がロードされており、それ
ぞれのOSの中にはTCP/IP処理ルーチン114,
115,110が存在する。TCP/IPが定める手順
で通信を実行するには、TCP/IP層304を構成す
る各層によりそれぞれ処理が実行される。TCP/IP
処理ルーチンは、TCP/IPが定める手順で通信を実
行するためにこれらの層がそれぞれ実行する複数の処理
の総称で、これらのTCP/IP処理ルーチン114,
115,110自体は公知のものと同じであり、既に述
べたような、システムコールで呼び出し可能な複数の関
数を含んでいる。TCP/IP処理ルーチン114,1
15,110は、広域通信を目的として、グローバルな
通信網106専用のネットワークインタフェースハード
ウェア121,122,123によって通信を行う。
Data transmission and reception are performed by the memory 12 of each computer.
The processing is performed between the application programs 107, 108, and 109 that are loaded in the application programs 4, 125, and 126.
In addition, OSs 127, 128, and 129 are loaded in each memory in addition to the application programs, and each OS has a TCP / IP processing routine 114,
There are 115 and 110. In order to execute communication according to the procedure defined by TCP / IP, each layer constituting the TCP / IP layer 304 executes a process. TCP / IP
The processing routine is a collective term of a plurality of processes executed by these layers in order to execute communication according to a procedure defined by TCP / IP.
115 and 110 themselves are the same as those known in the art, and include a plurality of functions that can be called by system calls as described above. TCP / IP processing routine 114, 1
15 and 110 perform communication by network interface hardware 121, 122 and 123 dedicated to the global communication network 106 for the purpose of wide area communication.

【0049】計算機102のメモリ124には、さらに
TCP/IPエミュレーションライブラリ112とメッ
セージパッシング型ライブラリ140と高速通信ライブ
ラリ135とがロードされている。同様に、計算機10
3のメモリ125には、TCP/IPエミュレーション
ライブラリ113とメッセージパッシング型ライブラリ
141と高速通信ライブラリ136とがロードされてい
る。
Further, the TCP / IP emulation library 112, the message passing type library 140, and the high-speed communication library 135 are loaded in the memory 124 of the computer 102. Similarly, the calculator 10
In the third memory 125, a TCP / IP emulation library 113, a message passing type library 141, and a high-speed communication library 136 are loaded.

【0050】計算機102,103上の高速通信ライブ
ラリ135,136は並列計算機101の内部での高速
通信を目的として、内部高速通信網105専用のネット
ワークインタフェースハードウェア119,120によ
って通信を行うためのライブラリであり、リモートメモ
リ書き込みライブラリあるいはPUTライブラリと呼ば
れているものが多く使用される。本実施の形態でも高速
通信ライブラリ135、136にはこのPUTライブラ
リを使用する。しかし、本発明はこのライブラリに限定
されるのではなく、他のライブラリたとえばPUT/G
ETライブラリと呼ばれるライブラリも使用可能であ
る。
The high-speed communication libraries 135 and 136 on the computers 102 and 103 are used for communication by the network interface hardware 119 and 120 dedicated to the internal high-speed communication network 105 for the purpose of high-speed communication inside the parallel computer 101. A library called a remote memory writing library or a PUT library is often used. In this embodiment, the PUT library is used for the high-speed communication libraries 135 and 136. However, the invention is not limited to this library;
A library called an ET library can also be used.

【0051】一般に、高速内部通信網105を通した通
信はグローバルな通信網106を通して通信する場合に
比べて格段に速い。そこでTCP/IPエミュレーショ
ンライブラリ112,113は、内部計算機上のアプリ
ケーションプログラム同士がTCP/IP通信を行おう
とする際には、TCP/IP処理ルーチン114,11
5ではなくメッセージパッシング型ライブラリ140,
141と高速通信ライブラリ135,136と内部高速
通信網105を使用してメッセージパッシング型の通信
を実現するように構成され、それでもって通信の高速化
を図る。
Generally, communication through the high-speed internal communication network 105 is much faster than communication through the global communication network 106. Therefore, the TCP / IP emulation libraries 112 and 113 transmit TCP / IP processing routines 114 and 11 when application programs on the internal computer attempt to perform TCP / IP communication.
5, message passing type library 140,
141, the high-speed communication libraries 135 and 136, and the internal high-speed communication network 105 are used to realize message-passing-type communication, thereby speeding up communication.

【0052】メッセージパッシング型ライブラリ14
0、141は、TCP/IPエミュレーションライブラ
リ112または113からの要求にしたがって、高速通
信ライブラリ135または136を起動するためのライ
ブラリである。メッセージパッシング型ライブラリ14
0、141は、一般的にはアプリケーションプログラム
(本実施の形態においてはTCP/IPエミュレーショ
ンライブラリ112、113)に対してメッセージパッ
シング型のインタフェースを有するライブラリである。
Message passing type library 14
Reference numerals 0 and 141 are libraries for activating the high-speed communication library 135 or 136 in response to a request from the TCP / IP emulation library 112 or 113. Message passing type library 14
Reference numerals 0 and 141 are libraries having a message passing type interface to an application program (in this embodiment, TCP / IP emulation libraries 112 and 113).

【0053】TCP/IPエミュレーションライブラリ
112,113は、さらに、このメッセージパッシング
型の通信においても従来のTCP/IP処理ルーチンが
提供していたのと同じくストリーム通信を実現し、それ
でもって通信の高速化を図る。TCP/IP処理ルーチ
ン114,115は、OS127,128の機能である
ため、従来技術ではアプリケーションプログラムがこれ
らを利用する際には必ずコンテクストスイッチのオーバ
ーヘッドが発生するが、本実施の形態では、高速通信ラ
イブラリ135,136を使うので、OSを介さないた
めオーバーヘッドを回避でき、それにより、より一層の
通信の高速化も期待できる。
The TCP / IP emulation libraries 112 and 113 further realize stream communication in this message-passing type communication as provided by the conventional TCP / IP processing routine, thereby increasing the speed of communication. Plan. Since the TCP / IP processing routines 114 and 115 are the functions of the OS 127 and 128, a context switch overhead is always generated when the application program uses them in the related art. However, in the present embodiment, the high-speed communication is performed in the present embodiment. Since the libraries 135 and 136 are used, the overhead can be avoided because the OS does not go through the OS, so that further higher communication speed can be expected.

【0054】 (2)論理構成と構成要素間のインタフェース図1
(B)は、上記ハードウェア構成を論理構成として表現
した図である。この図では、以降の説明に関係の無い部
分は全て省略してある。また、高速通信ライブラリ13
5,136と内部高速通信専用ハードウェア119,1
20をひとまとめにして高速通信機構116,117と
表現している。さらに、各構成要素間のインタフェース
111および118を新たに示している。計算機10
2,103,104や並列計算機101を表す四角はそ
れぞれ、その中の論理構成要素が一台の計算機または並
列計算機101上で実行されることを示している。
(2) Logical Configuration and Interface Between Components 1
FIG. 2B is a diagram expressing the above hardware configuration as a logical configuration. In this figure, all parts that are not relevant to the following description are omitted. In addition, the high-speed communication library 13
5,136 and hardware 119,1 dedicated to internal high-speed communication
20 are collectively expressed as high-speed communication mechanisms 116 and 117. Furthermore, the interfaces 111 and 118 between the components are newly shown. Computer 10
The squares representing 2, 103, 104 and the parallel computer 101 respectively indicate that the logical components therein are executed on one computer or the parallel computer 101.

【0055】計算機104上では従来通り、アプリケー
ションプログラム109がTCP/IP110と、ソケ
ットアプリケーションプログラムインタフェース111
でリンクされている。並列計算機101の内部の計算機
102,103上で動くアプリケーションプログラム1
07,108は、TCP/IPエミュレーションライブ
ラリ112,113にソケットアプリケーションプログ
ラムインタフェース111でもってリンクされている。
また、TCP/IPエミュレーションライブラリ11
2,113は、OSの機能である従来のTCP/IP処
理ルーチン114,115にソケットアプリケーション
プログラムインタフェース111でもってリンクされ、
同時に、高速通信機構116,117にMPI仕様のイ
ンタフェース118でもってリンクされている。
On the computer 104, as in the conventional case, the application program 109 is composed of the TCP / IP 110 and the socket application program interface 111.
It is linked by. Application program 1 running on computers 102 and 103 inside parallel computer 101
07 and 108 are linked to the TCP / IP emulation libraries 112 and 113 by the socket application program interface 111.
Also, TCP / IP emulation library 11
2 and 113 are linked to conventional TCP / IP processing routines 114 and 115, which are functions of the OS, by a socket application program interface 111,
At the same time, it is linked to the high-speed communication mechanisms 116 and 117 by the interface 118 of the MPI specification.

【0056】(3)アプリケーションプログラム10
7,108 本実施の形態では、並列計算機101内のいずれかの計
算機102上で動作しているアプリケーションプログラ
ム例えば107が、いずれかの他の計算機上で動作して
いる他のアプリケーションプログラムと通信する場合、
当該他のアプリケーションプログラムが、並列計算機1
01内の計算機103上で動作しているアプリケーショ
ンプログラム例えば108か並列計算機101外の計算
機104上で動作しているアプリケーションプログラム
例えば109かによって、高速通信機構116とTCP
/IP処理ルーチン114を使い分ける。並列計算機1
01内の異なる計算機102、103上で動作する二つ
のアプリケーションプログラム107、108が高速通
信機構116、117を使用して相互に通信するために
は、それらのアプリケーションプログラム間でデータを
実際に送受信するときだけでなく、それぞれのアプリケ
ーションプログラムのためのソケットを相互に接続する
ときにも高速通信機構116、117を利用するように
特別の処理を行う必要がある。TCP/IPエミュレー
ションライブラリ112または113がこの特別の処理
を実行するための複数の関数を含む。本実施の形態で
は、TCP/IPエミュレーションライブラリ112、
113内に設けられた関数の名前にEMU_という接頭
辞をつけ、TCP/IP処理ルーチン114、115ま
たは110内に設けられた前述の関数の名前と区別す
る。
(3) Application program 10
7, 108 In the present embodiment, an application program running on one of the computers 102 in the parallel computer 101, for example, 107 communicates with another application program running on any of the other computers. If
The other application program is a parallel computer 1
01 and the application program running on the computer 104 outside the parallel computer 101, such as 109, the high-speed communication mechanism 116 and the TCP.
/ IP processing routine 114 is properly used. Parallel computer 1
01, two application programs 107, 108 operating on different computers 102, 103 communicate with each other using the high-speed communication mechanisms 116, 117 in order to actually transmit and receive data between the application programs. Not only when, but also when connecting the sockets for the respective application programs to each other, it is necessary to perform special processing so as to use the high-speed communication mechanisms 116 and 117. The TCP / IP emulation library 112 or 113 contains a number of functions for performing this special processing. In the present embodiment, the TCP / IP emulation library 112,
The name of the function provided in 113 is prefixed with EMU_ to distinguish it from the name of the function provided in TCP / IP processing routine 114, 115 or 110.

【0057】具体的には、並列計算機101内の計算機
102、103上で動作しているアプリケーションプロ
グラム107または108の内、サーバ側およびクライ
アント側として動作するアプリケーションプログラムは
それぞれ以下のプログラムを実行するように生成され
る。
More specifically, of the application programs 107 or 108 operating on the computers 102 and 103 in the parallel computer 101, the application programs operating on the server side and the client side execute the following programs, respectively. Is generated.

【0058】 (サーバ側) (クライアント側) sa=socket(AF_INET,SOCK_STREAM,0); sb0=socket(AF_INET,SOCK_STREAM,0); bind(sa, server, slen); listen(sa, 5); sa1=EMU_accept(sa, &client, &clen); EMU_connect(sb0, server, slen); EMU_read(sa1, buffer1, length1); EMU_write(sb0, buffer0, length0); EMU_read(sa1, buffer1, length1); EMU_write(sb0, buffer0, length0); ・ ・ ・ ・ ・ ・ close(sa1); close(sa); close(sb0); サーバ側アプリケーションプログラムは従来と同様にs
ocket、bind、listenに対するシステム
コールを呼び出す。これらのシステムコールは対応する
TCP/IP処理ルーチンにより従来と同様に処理され
る。クライアント側のアプリケーションプログラムも従
来と同様にsocketシステムコールを発行する。こ
のシステムコールも対応するTCP/IP処理ルーチン
により従来と同様に処理される。こうしてサーバ側とク
ライアント側に対して従来と同様にソケットsa、sb
0が生成される。
(Server side) (client side) sa = socket (AF_INET, SOCK_STREAM, 0); sb0 = socket (AF_INET, SOCK_STREAM, 0); bind (sa, server, slen); listen (sa, 5); sa1 = EMU_accept (sa, & client, &clen); EMU_connect (sb0, server, slen); EMU_read (sa1, buffer1, length1); EMU_write (sb0, buffer0, length0); EMU_read (sa1, buffer1, length1); EMU_write (sb0, buffer0, length0); ・ ・ ・ ・ ・ ・ close (sa1); close (sa); close (sb0);
Call system calls for pocket, bind, and listen. These system calls are processed by the corresponding TCP / IP processing routine in a conventional manner. The client-side application program also issues a socket system call in the same manner as in the related art. This system call is also processed by the corresponding TCP / IP processing routine in the same manner as in the related art. Thus, the sockets sa and sb for the server side and the client side in the same manner as before.
0 is generated.

【0059】その後サーバ側アプリケーションプログラ
ムは、従来のシステムコールアクセプトに代えて、その
アプリケーションプログラムが動作している計算機内に
設けられたTCP/IPエミュレーションライブラリ内
に設けられた関数エミュレーションアクセプト(EMU
_accept)を呼び出す。クライアント側のアプリ
ケーションプログラムは、従来の関数コネクトに代え
て、そのアプリケーションプログラムが動作している計
算機内に設けられたTCP/IPエミュレーションライ
ブラリ内に設けられた関数エミュレーションコネクト
(EMU_connect)を呼び出す。さらに、サー
バ側アプリケーションプログラムは、従来のシステムコ
ールリードに代えて、TCP/IPエミュレーションラ
イブラリ内に設けられた関数エミュレーションリード
(EMU_read)を呼び出し、クライアント側アプ
リケーションプログラムは、従来のシステムコールライ
トに代えて、対応するTCP/IPエミュレーションラ
イブラリ内に設けられた関数エミュレーションライト
(EMU_write)を呼び出す。以下、これらの新
たな関数が行う処理を説明する。
Thereafter, the server-side application program replaces the conventional system call accept with a function emulation accept (EMU) provided in a TCP / IP emulation library provided in a computer on which the application program is running.
_Accept). The client-side application program calls a function emulation connect (EMU_connect) provided in a TCP / IP emulation library provided in a computer on which the application program is running, instead of the conventional function connect. Further, the server-side application program calls a function emulation read (EMU_read) provided in the TCP / IP emulation library instead of the conventional system call read, and the client-side application program replaces the conventional system call write. Call the function emulation light (EMU_write) provided in the corresponding TCP / IP emulation library. Hereinafter, processing performed by these new functions will be described.

【0060】(4)TCP/IPエミュレーションライ
ブラリによるソケットの接続 図2において、サーバ側アプリケーションプログラム,
クライアント側アプリケーションプログラムが、それぞ
れ上述のEMU_accept,EMU_connec
t関数を呼び出すと(処理501,502)、これらの
システムコールによってサーバ側のTCP/IPエミュ
レーションライブラリ内に設けられた関数EMU_ac
ceptとクライアント側のTCP/IPエミュレーシ
ョンライブラリ内に設けられたEMU_connect
呼び出される。これらのシステムコールの引数は、サー
バ側アプリケーションプログラム,クライアント側アプ
リケーションプログラムが、それぞれシステムコールa
cept、connectを呼び出し、ソケットsa、
sb0の接続をTCP/IP処理ルーチン114,11
5に要求するときと同じである。
(4) Socket Connection by TCP / IP Emulation Library In FIG.
The client-side application program executes the above-described EMU_accept and EMU_connect, respectively.
When the t function is called (processes 501 and 502), the function EMU_ac provided in the TCP / IP emulation library on the server side by these system calls
CMU and EMU_connect provided in TCP / IP emulation library on the client side
Be called. The arguments of these system calls are as follows: the server-side application program and the client-side application program execute the system call a
call cept, connect, socket sa,
The connection of sb0 is changed to the TCP / IP processing routines 114 and 11
5 is the same as when requesting.

【0061】呼び出された関数EMU_acceptと
EMU_connectは、まずacceptシステム
コール,connectシステムコールをそれぞれ発行
する(処理503,504)。これらのシステムコール
の引数は、関数EMU_accept,EMU_con
nectのそれぞれに対する引数がそのまま使用され
る。これによりサーバ側のTCP/IP処理ルーチン内
に設けられたシステムコールacceptとクライアン
ト側のTCP/IP処理ルーチン内に設けられたシステ
ムコールconnectが呼び出され、従来と同様にコ
ールされたシステムコールacceptはコールされた
システムコールconnectによって発行された接続
要求を受領し、ソケットsa1が生成され、ソケットs
a1とソケットsb0が通信路106を介して接続され
た状態になる。
The called functions EMU_accept and EMU_connect first issue an accept system call and a connect system call, respectively (processes 503 and 504). The arguments of these system calls are the functions EMU_accept, EMU_con
The argument for each nect is used as is. As a result, the system call "accept" provided in the TCP / IP processing routine on the server side and the system call "connect" provided in the TCP / IP processing routine on the client side are called. Upon receiving the connection request issued by the called system call connect, a socket sa1 is generated and the socket s
a1 and the socket sb0 are connected via the communication path 106.

【0062】その後、関数EMU_accept,EM
U_connectは、それぞれ相手のIPアドレスが
並列計算機101の内部の計算機のアドレスであるか否
かを確認する(処理506,507)。相手が並列計算
機101の内部である場合は、ソケット記述子を内部テ
ーブル410または411に登録する(処理510,5
11)。今の場合には、サーバ側のアプリケーションプ
ログラム107用のソケットsa1、クライアント側の
アプリケーションプログラム用のソケットsb0がそれ
ぞれ内部テーブル410、411にそれぞれ登録され
る。さらに、TCP/IPエミュレーションライブラリ
112、113は、並列計算機101内における各計算
機の識別子などの高速通信機構116,117を用いる
ために必要なデータを交換する。このデータ交換のため
に、アプリケーションプログラム107、108はそれ
ぞれ関数read,writeシステムコールを発行す
る(処理512、513、515、516)。ここでの
データ交換は、既に接続されているソケットsa1とs
b0を利用し、従来と同様にTCP/IP処理ルーチン
114,115と通信路106を介して行われる。その
後それぞれサーバ側、クライアント側のアプリケーショ
ンプログラム107,108にリターンする(処理51
8,519)。このとき、サーバ側のTCP/IPエミ
ュレーションライブラリ112はアプリケーションプロ
グラム107に生成されたソケットsa1の識別子を戻
す。
Then, the function EMU_accept, EM
U_connect confirms whether the IP address of the other party is an address of a computer inside the parallel computer 101 (steps 506 and 507). If the partner is inside the parallel computer 101, the socket descriptor is registered in the internal table 410 or 411 (steps 510 and 5).
11). In this case, the socket sa1 for the application program 107 on the server side and the socket sb0 for the application program on the client side are registered in the internal tables 410 and 411, respectively. Further, the TCP / IP emulation libraries 112 and 113 exchange data necessary for using the high-speed communication mechanisms 116 and 117 such as the identifier of each computer in the parallel computer 101. For this data exchange, the application programs 107 and 108 issue function read and write system calls, respectively (processing 512, 513, 515 and 516). The data exchange here is performed by the already connected sockets sa1 and s
Using b0, TCP / IP processing routines 114 and 115 and a communication path 106 are performed in the same manner as in the related art. Thereafter, the process returns to the server-side and client-side application programs 107 and 108, respectively (process 51).
8, 519). At this time, the server side TCP / IP emulation library 112 returns the generated identifier of the socket sa1 to the application program 107.

【0063】処理506,507において、相手が並列
計算機101の内部の計算機でないことが判明したとき
は、関数EMU_connectはクライアント側のア
プリケーションプログラム108に返り、関数EMU_
acceptはソケットsa1をサーバ側のアプリケー
ションプログラム107に返し、そのプログラムに戻る
(処理508,509)。こうして、サーバ側のアプリ
ケーションプログラムに対するソケットsa1とクライ
アント側のアプリケーションプログラムに対するソケッ
トsb0は、それぞれに対応するTCP/IP処理ルー
チンと通信路106を介して接続される。
When it is determined in the processes 506 and 507 that the other party is not a computer inside the parallel computer 101, the function EMU_connect returns to the client-side application program 108, and the function EMU_connect is returned.
The accept returns the socket sa1 to the application program 107 on the server side, and returns to the program (processing 508, 509). Thus, the socket sa1 for the application program on the server side and the socket sb0 for the application program on the client side are connected to the corresponding TCP / IP processing routine via the communication path 106.

【0064】なお、図3は、本実施の形態によりアプリ
ケーションプログラム107,108,109が生成し
たソケットがお互いに接続されている一つの状態を示し
ている。ここでは、アプリケーションプログラム107
のソケットSA1(402)とアプリケーションプログ
ラム108のソケットSB0(403)とが接続され
(407)、アプリケーションプログラム108のソケ
ットSB1(404)とアプリケーションプログラム1
09のソケットSC0(405)が接続され(40
8)、アプリケーションプログラム109のソケットS
C1(406)とアプリケーションプログラム107の
ソケットSA0(401)が接続されている(40
9)。ここで、TCP/IPエミュレーションライブラ
リ112,113は、内部ソケットテーブル410,4
11を保持している。内部ソケットテーブ410、41
1には、ソケットの接続先が内部計算機である場合に、
そのソケット記述子を登録する。例えば、アプリケーシ
ョンプログラム107のソケットSA1(402)の接
続先であるソケットSB0(403)は、内部計算機1
03の上で動くアプリケーションプログラム108のソ
ケットなので、SA1を内部ソケットテーブル410に
登録する。同様に、ソケットSB0の接続先であるソケ
ットSA1は、内部計算機102の上で動くアプリケー
ションプログラム107のソケットなので、SB0を内
部ソケットテーブル411に登録する。一方、ソケット
SA0(401)の接続先であるソケットSC1(40
6)は、外部計算機上アプリケーションプログラム10
9のソケットなので、SA0は内部ソケットテーブル4
10には登録しない。同様に、SC0に接続されている
SB1も内部ソケットテーブル411には登録しない。
FIG. 3 shows one state in which the sockets generated by the application programs 107, 108, and 109 according to the present embodiment are connected to each other. Here, the application program 107
The socket SA1 (402) of the application program 108 and the socket SB0 (403) of the application program 108 are connected (407), and the socket SB1 (404) of the application program 108 and the application program 1 are connected.
09 socket SC0 (405) is connected (40
8), socket S of application program 109
C1 (406) and the socket SA0 (401) of the application program 107 are connected (40).
9). Here, the TCP / IP emulation libraries 112 and 113 store the internal socket tables 410 and 4 respectively.
11 is held. Internal socket tape 410, 41
1, when the connection destination of the socket is an internal computer,
Register that socket descriptor. For example, the socket SB0 (403) to which the socket SA1 (402) of the application program 107 is connected is the internal computer 1
Since SA is the socket of the application program 108 that operates on SA 03, SA1 is registered in the internal socket table 410. Similarly, since the socket SA1 to which the socket SB0 is connected is the socket of the application program 107 running on the internal computer 102, SB0 is registered in the internal socket table 411. On the other hand, the socket SC1 (40) to which the socket SA0 (401) is connected is connected.
6) The application program 10 on the external computer
9 socket, SA0 is the internal socket table 4
No registration for 10. Similarly, SB1 connected to SC0 is not registered in internal socket table 411.

【0065】(5)内部通信と外部通信の切り分け方法 その後、サーバ側のアプリケーションプログラムとクラ
イアント側のアプリケーションプログラムはデータ通信
を開始する。これらの二つのプログラムの内の一方およ
び他方は、データ送信および受信のために関数EMU_
write,EMU_readをそれぞれ呼び出す。先
に示したクライアント側とサーバ側のプログラムの例で
は、サーバ側のアプリケーションプログラムが、関数E
MU_readを呼び出し、クライアント側のアプリケ
ーションプログラムが関数EMU_writeを呼び出
している。これらで指定する引数は、TCP/IP処理
ルーチン114,115に含まれたシステムコールwr
ite、readに対する引数と同じである。
(5) Method of separating internal communication from external communication After that, the application program on the server side and the application program on the client side start data communication. One and the other of these two programs use the function EMU_ for data transmission and reception.
Write and EMU_read are called respectively. In the example of the client-side and server-side programs described above, the server-side application program executes the function E
MU_read is called, and the client-side application program calls the function EMU_write. The arguments specified by these are the system call wr included in the TCP / IP processing routines 114 and 115.
Same as arguments for item and read.

【0066】図4を参照するに、EMU_read,E
MU_writeが呼び出されると(処理701、70
2)、それぞれの関数は、それぞれの引数で指定された
ソケットsa1、sb0のソケット記述子が対応する内
部ソケットテーブル410、411にそれぞれ登録され
ているか否かを判定する(処理703,704)。それ
ぞれのソケット識別子が内部ソケットテーブル410,
411にそれぞれ登録されているときには、後に詳細に
説明する手順で高速通信機構116,117、高速内部
通信網105を用いてメッセージパッシング方式の通信
を行う(処理707,708)。それぞれのソケット識
別子が内部ソケットテーブル410、411に登録され
ていなかったら、そのまま従来のread,write
システムコールをそれぞれ指定されたソケットに対して
発行する(処理705,706)。これらのシステムコ
ールは対応するTCP/IP処理ルーチン114,11
5により処理され、グローバル通信路106を用いた通
信がそれらのTCP/IP処理ルーチン114,115
により実行される。
Referring to FIG. 4, EMU_read, E
When MU_write is called (processing 701, 70
2) The respective functions determine whether or not the socket descriptors of the sockets sa1 and sb0 specified by the respective arguments are registered in the corresponding internal socket tables 410 and 411 (steps 703 and 704). Each socket identifier is an internal socket table 410,
If they are registered in 411, respectively, message-passing communication is performed using the high-speed communication mechanisms 116 and 117 and the high-speed internal communication network 105 in a procedure described in detail later (processing 707 and 708). If the respective socket identifiers are not registered in the internal socket tables 410 and 411, the conventional read, write
A system call is issued to each specified socket (processes 705 and 706). These system calls correspond to the corresponding TCP / IP processing routines 114 and 11.
5 and the TCP / IP processing routines 114 and 115
Is executed by

【0067】なお、図5は、図3で示したソケットの接
続状態において、各アプリケーションプログラム10
7,108,109同士が通信を行う場合のデータの流
れを示して、上記切り分け方法を説明するための全体構
成図である。アプリケーションプログラム107とアプ
リケーションプログラム108が通信する場合は、ソケ
ットsa1(402)とソケットsb0(403)を通
信端として用いる。これらのソケットは、TCP/IP
エミュレーションライブラリ112,113が保持する
内部ソケットテーブル410,411に登録されてい
る。そこでTCP/IPエミュレーションライブラリ1
12,113は、データ通信処理にTCP/IP処理ル
ーチン114,115ではなく高速通信機構116,1
17を利用する(601)。一方、アプリケーションプ
ログラム108とアプリケーションプログラム109が
通信する場合は、ソケットSB1(404)とソケット
SC0(405)を通信端として用いる。アプリケーシ
ョンプログラム108とリンクされているTCP/IP
エミュレーションライブラリ113が保持する内部ソケ
ットテーブル411には、SB1は登録されていない。
そこでTCP/IPエミュレーションライブラリ113
は、データ通信処理に、TCP/IP処理ルーチン11
5をそのまま利用する(602)。これによって、外部
のTCP/IP処理ルーチン110とのデータ交換が可
能となる。
FIG. 5 shows each application program 10 in the connection state of the socket shown in FIG.
FIG. 7 is an overall configuration diagram illustrating a data flow in a case where 7, 108, and 109 communicate with each other, and illustrating the above-described separation method. When the application program 107 and the application program 108 communicate, the socket sa1 (402) and the socket sb0 (403) are used as communication ends. These sockets are TCP / IP
It is registered in the internal socket tables 410 and 411 held by the emulation libraries 112 and 113. So TCP / IP emulation library 1
12 and 113 are not TCP / IP processing routines 114 and 115 but high-speed communication mechanisms 116 and 1 for data communication processing.
17 is used (601). On the other hand, when the application program 108 and the application program 109 communicate, the socket SB1 (404) and the socket SC0 (405) are used as communication ends. TCP / IP linked to application program 108
SB1 is not registered in the internal socket table 411 held by the emulation library 113.
Therefore, the TCP / IP emulation library 113
Is a TCP / IP processing routine 11 for data communication processing.
5 is used as it is (602). As a result, data exchange with the external TCP / IP processing routine 110 becomes possible.

【0068】本方式により、バインドシステムコール、
リスンシステムコールは従来のTCP/IP処理ルーチ
ンから変更せずにそのまま用いて、内部通信と外部通信
の切り分けを実現できる。
According to this method, a bind system call,
The listen system call can be used without any change from the conventional TCP / IP processing routine to realize the separation between internal communication and external communication.

【0069】(6)メッセージパッシング型ライブラリ
140,141 並列計算機の各計算機に使用される内部高速通信網10
5を使用するための通信ハードウェア119、120お
よび高速通信ライブラリ135,136はベンダ特有で
ある場合が多いので、その利用方法もマシンによって様
々である。よって、各マシンの高速通信ハードウェアと
高速通信ライブラリを利用したアプリケーションプログ
ラムを作ろうとする場合、マシンに特化した汎用性の低
いプログラムにならざるを得なかった。これに対して、
並列計算機内部の通信ハードウェアを利用して通信する
ためのライブラリを用意し、このライブラリのアプリケ
ーションプログラムインタフェースを標準として規定す
ることで、アプリケーションプログラムの汎用性を高め
ようという活動が世界中で活発である。
(6) Message passing type libraries 140 and 141 Internal high-speed communication network 10 used for each computer of the parallel computer
Since the communication hardware 119 and 120 and the high-speed communication libraries 135 and 136 for using the H.5 are often vendor-specific, their usages also vary depending on the machine. Therefore, when trying to create an application program using the high-speed communication hardware and the high-speed communication library of each machine, the program must be a low-versatility program specialized for the machine. On the contrary,
A library for communication using the communication hardware inside the parallel computer is prepared, and activities to increase the versatility of application programs by defining the application program interface of this library as a standard are active worldwide. is there.

【0070】このメッセージ型の通信を使用するための
汎用のインタフェースとして現在広く使用されているイ
ンタフェースは、MPIと呼ばれるメッセージパッシン
グインタフェース(MPI−Message Pass
ing Interface)である。例えば、文
献:"MPI: Message Passing Interface Standard versi
on1.1", MPI Forum, University of Tennessee, 1995
参照。このインタフェースは、メッセージパッシング型
の通信を実現するための上に述べた高速通信ライブラリ
が存在することを前提としているものであり、このイン
タフェースを使用しても、メッセージパッシング型の通
信は、基本的には上記高速通信ライブラリにより実現さ
れることには変わらない。
An interface widely used at present as a general-purpose interface for using this message type communication is a message passing interface (MPI-Message Pass) called MPI.
ing Interface). For example, reference: "MPI: Message Passing Interface Standard versi
on1.1 ", MPI Forum, University of Tennessee, 1995
reference. This interface is based on the premise that the above-mentioned high-speed communication library for implementing message-passing type communication exists. Even if this interface is used, message-passing type communication can Is still realized by the high-speed communication library.

【0071】多くの並列計算機ベンダが、MPIに準拠
したアプリケーションプログラムが並列計算機内部の高
速通信ハードウェアを使用できるようにするための高速
通信ライブラリを提供している。
Many parallel computer vendors provide high-speed communication libraries that enable application programs compliant with MPI to use high-speed communication hardware inside the parallel computer.

【0072】本明細書では、メッセージ型の通信を使用
するためのインタフェースをメッセージパッシング型イ
ンタフェースと呼び、そのインタフェースを有するライ
ブラリをメッセージパッシング型ライブラリと呼ぶ。特
に、MPI仕様のインタフェースをMPIあるいはMP
Iインタフェースあるいはメッセージパッシングインタ
フェースと呼び、そのインタフェースを有するライブラ
リをMPIライブラリあるいはメッセージパッシングイ
ンタフェースライブラリと呼ぶことがある。
In this specification, an interface for using message type communication is called a message passing type interface, and a library having the interface is called a message passing type library. In particular, MPI or MPI interface
It is called an I interface or a message passing interface, and a library having the interface may be called an MPI library or a message passing interface library.

【0073】本実施の形態では、メッセージパッシング
型ライブラリ140、141として多くの並列計算機で
利用可能である標準のMPI仕様により定められたイン
タフェースでもってコマンドあるいはデータを交換する
ライブラリを使用する。それでもって、TCP/IPエ
ミュレーションライブラリ112,113の汎用性を高
める。しかし、他の仕様のインタフェースを使用しても
よい。
In the present embodiment, a library for exchanging commands or data with an interface defined by a standard MPI specification that can be used in many parallel computers is used as the message passing type libraries 140 and 141. Therefore, the versatility of the TCP / IP emulation libraries 112 and 113 is improved. However, other specification interfaces may be used.

【0074】MPIに準拠した従来のアプリケーション
プログラムの記述例を以下に示す。本実施の形態では、
TCP/IPエミュレーションライブラリ112、11
3は、メッセージパッシング型ライブラリ140、14
1を起動する部分に関しては、以下に示すプログラム部
分を有する。このプログラム部分のより詳細は、後にふ
れる。
A description example of a conventional application program conforming to MPI is shown below. In the present embodiment,
TCP / IP emulation libraries 112 and 11
3 is a message passing type library 140, 14
1 has the following program part. More details on this part of the program will be mentioned later.

【0075】 MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); if ( rank == 0 ) /* receiver */ MPI_Recv(buffer, length, type, 1, tag, comm, status); else if ( rank == 1) /* sender */ MPI_Send(buffer, length, type, 0, tag, comm); MPI_Finalize(); MPIでは、通信しようとする全プロセスを一斉に立ち
上げる。この時、各プロセスにはランクと呼ばれるプロ
セス識別子が決定される。上の例では、2つのプロセ
ス、すなわち送信側プロセスsenderと受信側プロ
セスreceiverとを立ち上げる場合を示してい
る。この時、それぞれのプロセスにはランク0と1が付
けられる。各プロセスは、まずMPI初期化関数MPI
_InitによってMPIの初期化を行い、MPI通信
ランク関数MPI_Comm_rankによって自分の
ランクを取得する。その後、各ランクごとの処理を行
う。上の例では、ランク1のプロセスがMPI送信関数
MPI_Sendによって送るデータを、ランク0のプ
ロセスがMPI受信関数MPI_Recvで受け取る場
合を示している。
MPI_Init (& argc, &argv); MPI_Comm_rank (MPI_COMM_WORLD, &rank); if (rank == 0) / * receiver * / MPI_Recv (buffer, length, type, 1, tag, comm, status); else if (rank == 1) / * sender * / MPI_Send (buffer, length, type, 0, tag, comm); MPI_Finalize (); In MPI, all processes that want to communicate are started at once. At this time, a process identifier called a rank is determined for each process. The above example shows a case where two processes are started, that is, a sender process sender and a receiver process receiver. At this time, ranks 0 and 1 are assigned to the respective processes. Each process starts with an MPI initialization function MPI
MPI is initialized by _Init, and its own rank is acquired by MPI communication rank function MPI_Comm_rank. After that, processing for each rank is performed. The above example shows a case where the process of rank 0 receives data transmitted by the process of rank 1 by the MPI transmission function MPI_Send by the MPI reception function MPI_Recv.

【0076】(7)高速通信機構を用いたメッセージパ
ッシング型の通信 高速通信機構116,117を用いるデータ受信処理7
07,データ送信処理708の詳細を説明する前に、こ
れらの処理の実行に必要な、高速通信機構116,11
7を用いたメッセージパッシング型の通信の概要を説明
する。
(7) Message-passing type communication using high-speed communication mechanism Data reception processing 7 using high-speed communication mechanisms 116 and 117
07, before describing the details of the data transmission processing 708, the high-speed communication mechanisms 116 and 11 required to execute these processing are described.
The outline of the message-passing type communication using No. 7 will be described.

【0077】一般にメッセージパッシング型の通信を実
行するには、送信側の計算機がデータを送信するための
送信関数を実行し、受信側の計算機がそのデータを受信
するための受信関数を実行する。後続のデータをそれら
の計算機の間で転送するために、それらの関数が繰り返
し実行される。本実施の形態では、メッセージパッシン
グ型の通信の具体的な説明として、MPI仕様によるメ
ッセージパッシング通信を説明する。
In general, to execute message-passing type communication, a computer on the transmitting side executes a transmission function for transmitting data, and a computer on the receiving side executes a receiving function for receiving the data. These functions are repeatedly executed to transfer subsequent data between the computers. In the present embodiment, message passing communication according to the MPI specification will be described as a specific description of message passing communication.

【0078】MPI仕様によるメッセージパッシング通
信では、送信側の計算機は送信関数MPI_Sendを
実行し、受信側の計算機は受信関数MPI_Recvを
実行する。今の場合、送信処理708が起動されると、
送信側のTCP/IPエミュレーションライブラリ11
3は、先に記載したMPI仕様のアプリケーションプロ
グラムの例にあるように、送信関数MPI_Sendを
呼び出す。なお、送信関数MPI_Sendを呼び出す
前に初期処理としてMPI_Init、MPI_Com
m_rank等の関数の呼び出しを実行する必要がある
が、これらの処理は、先に記載した関数EMU_acc
ept, EMU_connect内の内部テーブル登
録処理(510,511)と同時に行なう 。一方、受
信側のTCP/IPエミュレーションライブラリ112
は、内部高速通信網105を用いるために受信関数MP
I_Recvを呼び出す。
In the message passing communication according to the MPI specification, the computer on the transmission side executes a transmission function MPI_Send, and the computer on the reception side executes the reception function MPI_Recv. In this case, when the transmission process 708 is activated,
Transmission side TCP / IP emulation library 11
3 calls the transmission function MPI_Send as in the example of the application program of the MPI specification described above. Before calling the transmission function MPI_Send, MPI_Init, MPI_Com
It is necessary to execute a call to a function such as m_rank, and these processes are performed by the function EMU_acc described above.
ept, performed at the same time as the internal table registration processing (510, 511) in the EMU_connect. On the other hand, the TCP / IP emulation library 112 on the receiving side
Is a receiving function MP for using the internal high-speed communication network 105.
Call I_Recv.

【0079】送信側のTCP/IPエミュレーションラ
イブラリ113が上記送信処理708内で呼び出す関数
MPI_Sendの引数で指定するバッファアドレスb
ufferおよびバッファ長lengthは、送信側の
アプリケーションプログラム108が発行した関数EM
U_writeの対応する引数に等しくされる。一方、
受信側のTCP/IPエミュレーションライブラリ11
2が受信処理707内で呼び出す関数MPI_Recv
の引数で指定するバッファアドレスbufferおよび
バッファ長lengthは、後に説明するように受信側
のアプリケーションプログラム107が発行した、関数
EMU_readの引数が指定するバッファアドレスお
よびバッファ長もしくは受信側のTCP/IPエミュレ
ーションライブラリ113内に設けられる特定のバッフ
ァのアドレスおよびサイズに等しくされる。
The buffer address b specified by the argument of the function MPI_Send called by the TCP / IP emulation library 113 on the transmission side in the transmission processing 708
buffer and the buffer length length are the functions EM issued by the application program 108 on the transmission side.
It is equal to the corresponding argument of U_write. on the other hand,
TCP / IP emulation library 11 on the receiving side
2 calls function MPI_Recv in reception processing 707
The buffer address buffer and the buffer length specified by the argument are the buffer address and the buffer length specified by the argument of the function EMU_read or the TCP / IP emulation library on the receiving side issued by the application program 107 on the receiving side as described later. It is equal to the address and size of the particular buffer provided in 113.

【0080】送信側のメッセージパッシング型ライブラ
リ141内の関数MPI_Sendは、起動されると、
対応する高速通信ライブラリ136に対し、関数MPI
_Sendに対する引数が指定するアドレスのバッファ
からその引数が指定する長さのデータを内部高速通信網
105を介して受信側の計算機124に転送することを
要求する。受信側のメッセージパッシング型ライブラリ
140内の関数MPI_Recvは、起動されると、対
応する高速通信ライブラリ135に対し、その高速通信
ライブラリ135に、この転送されたデータを内部高速
通信網105を介して受信し、関数MPI_Recvに
対する引数が指定するアドレスのバッファにその引数が
指定する長さのデータを書き込むことを要求する。
When the function MPI_Send in the message-passing type library 141 on the transmitting side is activated,
For the corresponding high-speed communication library 136, the function MPI
A request is made to transfer data of the length specified by the argument from the buffer at the address specified by the argument to _Send to the computer 124 on the receiving side via the internal high-speed communication network 105. When the function MPI_Recv in the message-passing type library 140 on the receiving side is started, the function MPI_Recv receives the transferred data via the internal high-speed communication network 105 to the corresponding high-speed communication library 135. Then, a request is made to write data of the length specified by the argument to the buffer at the address specified by the argument for the function MPI_Recv.

【0081】起動された送信側の高速転送ライブラリ1
36と受信側の高速転送ライブラリ135は、要求され
たデータの送信と受信をそれ自体公知の方法により内部
高速通信網105を介して行う。このデータ転送は具体
的には以下のように行われる。一般にはリモートメモリ
書き込みコマンドあるいはPUTコマンドといわれるコ
マンドが使用される。以下では、このコマンドをPUT
コマンドと呼ぶ。内部高速通信網105を介したデータ
転送を行う通信方法は3つのPUTコマンドにより行わ
れる。
The activated high-speed transfer library 1 on the transmitting side
36 and the high-speed transfer library 135 on the receiving side transmit and receive the requested data via the internal high-speed communication network 105 by a method known per se. This data transfer is specifically performed as follows. Generally, a command called a remote memory write command or a PUT command is used. In the following, this command is called PUT
Called a command. A communication method for performing data transfer via the internal high-speed communication network 105 is performed by three PUT commands.

【0082】まず、送信側のTCP/IPエミュレーシ
ョンライブラリ113から関数MPI_Sendが呼び
出されると、送信側のメッセージパッシング型ライブラ
リ141は、この引数が指定したバッファ長(これはす
なわち送信すべきデータの長さである)を含むデータの
属性情報を含むヘッダの送信を送信側の高速転送ライブ
ラリ136に要求する第1のPUTコマンドを発行す
る。この高速転送ライブラリ136は、受信側の計算機
102にこのヘッダを送信する。計算機102内の内部
高速通信専用ハードウェア119が、このデータを受信
側のメモリ124内の所定の位置に直接書き込む。
First, when the function MPI_Send is called from the TCP / IP emulation library 113 on the transmitting side, the message passing type library 141 on the transmitting side sends the buffer length specified by this argument (that is, the length of the data to be transmitted). The first PUT command is issued to request the high-speed transfer library 136 on the transmission side to transmit a header including the attribute information of the data including the following. The high-speed transfer library 136 transmits the header to the computer 102 on the receiving side. The hardware 119 dedicated to internal high-speed communication in the computer 102 directly writes this data to a predetermined position in the memory 124 on the receiving side.

【0083】一方、受信側TCP/IPエミュレーショ
ンライブラリ112から受信命令MPI_Recvが呼
び出されると、受信側のメッセージパッシング型ライブ
ラリ140は、まず送信側の計算機103からヘッダが
すでに送られてきているか調べる。このために後述する
データ検査命令MPI_probeが使用される。ヘッ
ダが送られてきていないときには、その受信命令の実行
は終了する。ヘッダがすでに送られてきているときに
は、そのヘッダ内のバッファ長から送信データが受信可
能か否かを判定する。すなわち、その送信データの長さ
が、上記受信命令MPI_Recvが指定したバッファ
長以下であるか否かが判定される。MPI仕様のメッセ
ージパッシング通信に限らず、一般にメッセージパッシ
ング型の通信では、送信命令が指定した送信データ長
が、受信命令が指定した受信バッファサイズより大きい
ときには、受信側の計算機はその送信データを受信しな
いようになっている。もし受信側の計算機が受信側のバ
ッファのサイズを超える受信データを受信したときに
は、そのバッファ以外のメモリ領域が受信データにより
破壊する恐れがあるためである。受信側のメッセージパ
ッシング型ライブラリ140は、上記判定の結果、送信
データが受信可能であると判断したときには、受信命令
MPI_Recvに対する引数が指定した受信バッファ
のアドレスの送信を受信側の高速通信ライブラリ135
に要求する第2のPUTコマンドを発行する。この高速
通信ライブラリ135はこのコマンドに対する応答とし
てバッファアドレスを送信側の計算機103に送信す
る。102内の内部高速通信専用ハードウェア119
は、このアドレスを送信側のメモリ125内の所定の位
置に書き込む。なお、上記判定の結果、送信データが受
信可能でないときには、受信側のメッセージパッシング
型ライブラリはバッファドレスを返さないで、エラーを
送信側の計算機に通知する。
On the other hand, when the receiving command MPI_Recv is called from the TCP / IP emulation library 112 on the receiving side, the message passing type library 140 on the receiving side first checks whether the header has already been sent from the computer 103 on the transmitting side. For this purpose, a data check instruction MPI_probe described later is used. When the header has not been sent, the execution of the reception instruction ends. If the header has already been sent, it is determined from the buffer length in the header whether the transmission data can be received. That is, it is determined whether or not the length of the transmission data is equal to or less than the buffer length specified by the reception command MPI_Recv. Not only in the message passing communication of the MPI specification, but generally in the message passing type communication, when the transmission data length specified by the transmission command is larger than the reception buffer size specified by the reception command, the receiving computer receives the transmission data. Not to be. This is because if the receiving computer receives received data exceeding the size of the receiving buffer, a memory area other than the buffer may be damaged by the received data. When the message passing type library 140 on the receiving side determines that the transmission data is receivable as a result of the above determination, the message passing type library 140 on the receiving side transmits the address of the receiving buffer designated by the argument to the receiving instruction MPI_Recv.
Issue a second PUT command. The high-speed communication library 135 transmits the buffer address to the transmitting computer 103 as a response to the command. Internal high-speed communication dedicated hardware 119 in 102
Writes this address in a predetermined position in the memory 125 on the transmission side. As a result of the determination, when the transmission data is not receivable, the message-passing type library on the receiving side does not return the buffer address, but notifies the computer on the transmitting side of the error.

【0084】最後に、送信側のメッセージパッシング型
ライブラリは、送信データと受信されたバッファアドレ
スの送信を送信側の高速転送ライブラリ136に要求す
る第3のPUTコマンドを発行する。高速転送ライブラ
リ136は、このデータとバッファアドレスを受信側の
計算機102に送信する。受信側の計算機102内の内
部高速通信専用ハードウェア119は、このバッファア
ドレスとデータを受信し、そのアドレスを有するバッフ
ァに受信したデータを直接書き込む。こうして、データ
の転送が終了する。
Finally, the message-passing library on the transmitting side issues a third PUT command requesting the high-speed transfer library 136 on the transmitting side to transmit the transmission data and the received buffer address. The high-speed transfer library 136 transmits the data and the buffer address to the computer 102 on the receiving side. The internal dedicated hardware 119 for high-speed communication in the computer 102 on the receiving side receives the buffer address and the data, and directly writes the received data to the buffer having the address. Thus, the data transfer ends.

【0085】なお、内部高速通信網105を介したデー
タ通信方法は以上の方法に限らず他の方法も使用可能で
ある。たとえば並列計算機によっては、高速通信ライブ
ラリはPUTコマンドの他にリモートメモリ書き込みコ
マンドあるいはGETコマンドも実行可能である。この
ような並列計算機の場合には、送信側のメッセージパッ
シング型ライブラリ141が上記第3のPUTコマンド
を発行するのに代えて、受信側のメッセージパッシング
型ライブラリ140がGETコマンドを発行し、受信側
の高速通信ライブラリ135が送信側のメモリ125か
ら送信データを読み出す処理を実行する。
The data communication method via the internal high-speed communication network 105 is not limited to the above method, and other methods can be used. For example, depending on the parallel computer, the high-speed communication library can execute a remote memory write command or a GET command in addition to the PUT command. In such a parallel computer, instead of the message-passing type library 141 on the transmitting side issuing the third PUT command, the message-passing type library 140 on the receiving side issues a GET command and issues a GET command. The high-speed communication library 135 executes a process of reading out transmission data from the memory 125 on the transmission side.

【0086】(8)メッセージパッシング型の通信にお
けるストリーム通信 図4に示されたデータ受信処理707,送信処理708
の詳細を図7、8に示した具体例を適宜参照して説明す
る。図4において、すでに述べたように送信側のアプリ
ケーションプログラム108が、関数EMU_writ
eを呼び出した結果(702)、送信処理708が起動
されると、メッセージパッシング型ライブラリ141に
含まれた関数MPI_Sendが呼び出される(78
1)。図7に示した例では、関数EMU_write呼
び出し時(702)の引数ではバッファア803のアド
レスSbuffと、50キロバイト(KB)のバッファ
サイズを指定すると仮定する。関数MPI_Send呼
び出し時(781)の引数が指定するバッファアドレス
とバッファサイズはこれらの値に等しくされる。以下で
は使用する関数の他の引数の説明は簡単化のために省略
する。また、指定するバッファサイズの単位はKBであ
ると仮定し、関数の引数を図示するときには、この単位
KBは簡単化のために図示しない。メッセージパッシン
グ型ライブラリ141はこの関数呼び出し781に応答
して、データの転送のために、既に述べたように高速通
信機構117にヘッダの送信を指示し、その後データの
送信を指示する。
(8) Stream Communication in Message Passing Type Communication Data reception processing 707 and transmission processing 708 shown in FIG.
Will be described with reference to the specific examples shown in FIGS. In FIG. 4, as described above, the application program 108 on the transmission side performs the function EMU_write
When the transmission process 708 is activated as a result of calling e (702), the function MPI_Send included in the message passing type library 141 is called (78).
1). In the example shown in FIG. 7, it is assumed that the address Sbuff of the buffer 803 and the buffer size of 50 kilobytes (KB) are specified in the argument at the time of calling the function EMU_write (702). The buffer address and buffer size specified by the argument at the time of calling the function MPI_Send (781) are made equal to these values. In the following, description of other arguments of the function to be used is omitted for simplification. Also, it is assumed that the unit of the designated buffer size is KB, and when the arguments of the function are illustrated, the unit KB is not illustrated for simplicity. In response to the function call 781, the message-passing type library 141 instructs the high-speed communication mechanism 117 to transmit a header as described above, and then instructs data transmission for data transfer.

【0087】一方、図4において、すでに述べたように
受信側のアプリケーションプログラム107が、関数E
MU_readを呼び出した結果(701)、受信処理
707が起動されると、この受信処理707では図6に
示す処理がなされる。なお、図7に示した例では、関数
EMU_readの呼び出し701の引数が指定するバ
ッファアドレスはRbuffであり、バッファサイズは
30KBであり、送信関数EMU_writeの呼び出
し702が指定したバッファサイズより小さいサイズを
指定していると仮定する。
On the other hand, in FIG. 4, as described above, the application program 107 on the receiving side executes the function E
When the reception process 707 is activated as a result of calling MU_read (701), the reception process 707 performs the process shown in FIG. In the example shown in FIG. 7, the buffer address specified by the argument of the call 701 of the function EMU_read is Rbuff, the buffer size is 30 KB, and a size smaller than the buffer size specified by the call 702 of the transmission function EMU_write is specified. Suppose you are.

【0088】この受信処理707では、まず、受信側の
TCP/IPエミュレーションライブラリ112内に設
けられるデータ受信用の特定のバッファ(後に示すバッ
ファ901)に受信済みでまだ受信側のアプリケーショ
ンプログラムに転送されていないデータが残っているか
を判定する命令を発行する(処理202)。この命令は
図7には示されていない。今仮定しているように最初に
関数EMU_readが実行されたときにはこの判定の
結果は否定的となる。その後、送信データ検知命令MP
I_probe771が発行され、受信側のアプリケー
ションプログラムに宛てて送信されようとするデータが
あるかを判別する(処理206)。この命令は、具体的
には、このアプリケーションプログラム107に宛てて
送信されるべきデータに関する、既に説明したヘッダが
高速通信機構116により受信済みであるか否かを判定
する命令である。もしこのヘッダが送信側のアプリケー
ションプログラム108からまだ送信されていない場合
には、受信処理708は、処理を終了し受信側アプリケ
ーションプログラム107に戻る(処理207)。受信
側アプリケーションプログラム107は受信が失敗した
ときの処理を実行する。たとえば、受信が成功するまで
関数701を繰り返し呼び出す。
In the receiving process 707, first, the data has been received by a specific data receiving buffer (a buffer 901 described later) provided in the TCP / IP emulation library 112 on the receiving side and is transferred to the application program on the receiving side. An instruction to determine whether or not unremained data remains is issued (process 202). This instruction is not shown in FIG. The first time the function EMU_read is executed, as now assumed, the result of this determination is negative. After that, the transmission data detection instruction MP
I_probe 771 is issued, and it is determined whether there is data to be transmitted to the application program on the receiving side (process 206). This instruction is, specifically, an instruction for determining whether or not the already described header regarding data to be transmitted to the application program 107 has been received by the high-speed communication mechanism 116. If the header has not been transmitted from the application program 108 on the transmitting side, the receiving process 708 ends the process and returns to the receiving application program 107 (process 207). The receiving-side application program 107 executes processing when reception has failed. For example, the function 701 is repeatedly called until the reception is successful.

【0089】ヘッダが送信側のアプリケーションプログ
ラム108からすでに送信済みであると仮定すると、そ
のヘッダが指定する送信データが受信側のアプリケーシ
ョンプログラムのバッファ812に入りきるか否かが判
定される(処理208)。図7の例では送信データのサ
イズは、50KBであり、受信側のバッファ812のサ
イズは30KBであり、この判定の結果は否定的とな
る。このような場合に、受信側のTCP/IPエミュレ
ーションライブラリ112が、この送信データを受信側
のアプリケーションプログラム107のバッファ812
に受信するMPI_Recv命令を発行すると、受信側
のメッセージパッシング型ライブラリ140は、通常は
MPI仕様によりこの命令をエラーとして処理するかも
しくは送信データの内、受信側のアプリケーションプロ
グラムのバッファ812に入りきらない分を捨ててしま
う。
Assuming that the header has already been transmitted from the application program 108 on the transmitting side, it is determined whether or not the transmission data specified by the header can fit in the buffer 812 of the application program on the receiving side (step 208). ). In the example of FIG. 7, the size of the transmission data is 50 KB, the size of the buffer 812 on the receiving side is 30 KB, and the result of this determination is negative. In such a case, the TCP / IP emulation library 112 on the receiving side stores the transmission data in the buffer 812 of the application program 107 on the receiving side.
When the MPI_Recv command to be received is issued, the message-passing type library 140 on the receiving side normally processes this command as an error according to the MPI specification or does not fit in the buffer 812 of the application program on the receiving side out of the transmission data. Discard the minute.

【0090】これを防ぐために、本実施の形態では受信
側アプリケーションプログラム107とリンクしている
受信側TCP/IPエミュレーションライブラリ112
内に、特別なバッファ901を用意し、受信側TCP/
IPエミュレーションライブラリ112はここに送信デ
ータをこのバッファ901に一旦受信することを要求す
る。すなわち、このバッファ901のアドレスEbuf
fと全送信データのサイズ50KBとを指定する、関数
MPI_Recvを呼び出す(772)。
To prevent this, in the present embodiment, the receiving side TCP / IP emulation library 112 linked to the receiving side application program 107
, A special buffer 901 is prepared and TCP /
The IP emulation library 112 requests that the buffer 901 once receive transmission data. That is, the address Ebuf of the buffer 901
Call the function MPI_Recv, which specifies f and the size of all transmission data 50 KB (772).

【0091】この関数呼び出し772に応答して、受信
側の高速通信機構116と送信側の高速通信機構117
は、すでに述べたようにしてデータを送受信し、受信側
の高速通信機構116は、このデータを上記バッファ9
01に書き込む。受信側のTCP/IPエミュレーショ
ンライブラリ112はその後、この受信データの内、関
数EMU_Read呼び出し時の引数で指定されたサイ
ズ30KBのデータを受信側のアプリケーションプログ
ラム107のバッファ812にコピーするメモリコピー
命令(MEMCPY(Rbuff、Ebuff、30K
B))773を発行する(処理209)。その後処理は
アプリケーションプログラムに戻る(処理211)。こ
うして、TCP/IPエミュレーションライブラリ11
2内のバッファ901に受信されたデータの一部906
が残っている状態で、アプリケーションプログラム間の
送受信が完了する。
In response to this function call 772, the high-speed communication mechanism 116 on the receiving side and the high-speed communication mechanism 117 on the transmitting side
Transmits and receives data as described above, and the high-speed communication mechanism 116 on the receiving side transmits the data to the buffer 9.
Write to 01. The TCP / IP emulation library 112 on the receiving side then performs a memory copy instruction (MEMCPY) for copying the data of the size 30 KB specified by the argument at the time of calling the function EMU_Read from the received data to the buffer 812 of the application program 107 on the receiving side. (Rbuff, Ebuff, 30K
B)) 773 is issued (process 209). Thereafter, the process returns to the application program (process 211). Thus, the TCP / IP emulation library 11
Part 906 of data received in buffer 901 in
The transmission and reception between the application programs are completed in the state in which.

【0092】その後さらに送信側アプリケーションプロ
グラム108がアドレスSbuff’のバッファ804
のデータ80KBを送信するために関数EMU_wri
te(Sbuff’,80KB)(790)(図7
(B))を呼び出すと、同様にして送信処理708が実
行され、この処理の中で関数MPI_Send(Sbu
ff’,80)(791)が呼び出される。一方、受信
側アプリケーションプログラム107もアドレスRbu
ff’のバッファ813に100KBのデータを受信す
るために関数EMU_read(Rbuff’,100
KB)(775)を呼び出すと、これに対しても同様に
受信707が実行される。
Thereafter, the transmitting side application program 108 further stores the buffer 804 of the address Sbuff '.
Function EMU_wr to transmit 80 KB of data
te (Sbuff ', 80 KB) (790) (FIG. 7)
When (B)) is called, the transmission processing 708 is executed in the same manner, and in this processing, the function MPI_Send (Sbu
ff ', 80) (791) is called. On the other hand, the receiving side application program 107 also stores the address Rbu.
To receive 100 KB of data in the buffer 813 of the ff ′, the function EMU_read (Rbuff ′, 100
When KB) (775) is called, reception 707 is similarly executed.

【0093】この受信処理707は、最初の判定処理2
02における判定では、受信側のTCP/IPエミュレ
ーションライブラリ112内の受信用のバッファ901
内に未転送のデータ906が残っていると判断される。
その結果、メモリコピー命令memcpy(Rbuf
f’,Ebuff+30KB,20KB)(776)を
発行して、このデータ906を受信側のアプリケーショ
ンプログラム107内のバッファ813の先頭領域90
7にコピーする(処理203)。このメモリコピーする
データの長さは、バッファ901に保持されているデー
タの長さの内、関数EMU_readに対する上記第2
の関数呼び出しが指定するバッファ長を超えない範囲に
設定される。今の場合にはバッファ901に保持されて
いるデータの長さが20KBであり、受信を要求された
データの長さが100KBより小さいので、このデータ
20KBが全てコピーされる。
This reception processing 707 is the first judgment processing 2
02, the receiving buffer 901 in the TCP / IP emulation library 112 on the receiving side is determined.
It is determined that untransferred data 906 remains in the data.
As a result, the memory copy instruction memcpy (Rbuf
f ′, Ebuff + 30 KB, 20 KB) (776), and the data 906 is stored in the head area 90 of the buffer 813 in the application program 107 on the receiving side.
7 (process 203). The length of the data to be memory-copied is the second of the length of the data held in the buffer 901 with respect to the function EMU_read.
Is set to a range that does not exceed the buffer length specified by the function call of. In this case, since the length of the data held in the buffer 901 is 20 KB and the length of the data requested to be received is smaller than 100 KB, the entire 20 KB of the data is copied.

【0094】その後受信側アプリケーションプログラム
107が要求する80KBの残りのデータをさらに受信
するために、処理206が実行される。この処理206
ではすでに説明したように、送信データがあるか否かを
か調べる命令MPI_Probe()が発行される。具
体的には、送信データに対するヘッダが受信済みである
か否かが判定される。今の場合に、送信側の関数呼び出
し791がすでに実行済みであると仮定すると、80K
Bの送信データがあることが判明する。その場合には、
この送信データのサイズが受信側アプリケーションプロ
グラム102が指定するバッファ813に入りきるか否
かが判定される(処理208)。今の場合には受信側の
アプリケーションプログラムのバッファ813の残りの
領域908のサイズは80KBなので、送信データはバ
ッファ813のこの領域908に入りきる。
Thereafter, the process 206 is executed to further receive the remaining data of 80 KB requested by the receiving-side application program 107. This processing 206
As described above, the instruction MPI_Probe () for checking whether or not there is transmission data is issued. Specifically, it is determined whether a header for the transmission data has been received. In this case, assuming that the function call 791 on the transmitting side has already been executed, 80K
It turns out that there is transmission data of B. In that case,
It is determined whether the size of the transmission data can fit in the buffer 813 specified by the receiving-side application program 102 (process 208). In this case, the size of the remaining area 908 of the buffer 813 of the application program on the receiving side is 80 KB, so that the transmission data can fit in this area 908 of the buffer 813.

【0095】この結果、関数MPI_Recv(Rbu
ff’+20KB,80KB)(778)が呼び出され
る。この関数呼び出しは、バッファ813の残りの領域
908のアドレスと送信データのサイズ80KBを指定
する。こうして、この送信データがバッファ813の領
域908に直接受信される(処理210)。その後、受
信を要求されたデータが全て受信されたか否かが判定さ
れる(処理212)。今の場合は判定の結果が肯定的で
あるので、受信処理707は終了し、処理はアプリケー
ションプログラムに戻る(処理211)。
As a result, the function MPI_Recv (Rbu
ff ′ + 20 KB, 80 KB) (778) is called. This function call specifies the address of the remaining area 908 of the buffer 813 and the size of the transmission data of 80 KB. Thus, the transmission data is directly received in the area 908 of the buffer 813 (process 210). Thereafter, it is determined whether or not all the data requested to be received has been received (process 212). In this case, since the result of the determination is positive, the receiving process 707 ends, and the process returns to the application program (process 211).

【0096】以上の手順により、複数の関数EMU_w
riteの呼び出し(702,790)が指定する送信
データをひと繋がりのデータストリームとして複数の関
数の呼び出しEMU_read(701、775)によ
り受信する、ストリーム通信を実現することができる。
According to the above procedure, a plurality of functions EMU_w
It is possible to realize stream communication in which transmission data specified by the call of write (702, 790) is received as a continuous data stream by calling EMU_read (701, 775) of a plurality of functions.

【0097】送信側のアプリケーションプログラムが指
定する送信データのサイズが受信側のアプリケーション
プログラムが指定するバッファのサイズよりも小さいと
きでも、以下のようにしてストリーム通信が簡単に実現
される。たとえば、送信側のアプリケーションプログラ
ムが50KBのデータの送信を繰り返し要求し、受信側
のアプリケーションプログラムが100KBのデータの
受信を要求する場合のストリーム通信を図8を参照して
説明する。
Even when the size of the transmission data specified by the application program on the transmission side is smaller than the size of the buffer specified by the application program on the reception side, stream communication can be easily realized as follows. For example, a description will be given of stream communication in a case where a transmission-side application program repeatedly requests transmission of 50 KB data and a reception-side application program requests reception of 100 KB data, with reference to FIG.

【0098】送信側のアプリケーションプログラムが呼
び出す関数EMU_write(702)に対する送信
処理708(図4)の中で、関数MPI_send(7
81)が呼び出される。この関数呼び出しでは、送信側
アプリケーションプログラムのバッファ803のアドレ
スSbuffとサイズ50KBを指定する。
In the transmission processing 708 (FIG. 4) for the function EMU_write (702) called by the application program on the transmission side, the function MPI_send (7
81) is called. In this function call, the address Sbuff and the size 50 KB of the buffer 803 of the transmission side application program are specified.

【0099】受信側のアプリケーションプログラムが呼
び出す関数EMU_read(701)に対する受信処
理707(図4)も、すでに述べたように図6に従い処
理される。今の仮定では処理202での判定は失敗す
る。処理206において、データ検査命令771が実行
されたときに、送信データがあると判定されたと仮定す
る。今の場合には受信側のバッファ812のサイズは、
送信側のバッファのサイズより大きいので、処理208
での判定の結果は肯定的となる。その結果、処理210
が実行される。この処理では、送信データを受信側アプ
リケーションプログラムが指定したバッファ812に直
接受信するための関数MPI_recv(774)が呼
び出される。この関数呼び出しは、受信側アプリケーシ
ョンプログラムのバッファ812の先頭アドレスRbu
ffと送信側のバッファ803のサイズ50KBを指定
する。こうして、送信側のバッファ803内の全データ
が、受信側のバッファ812内の先頭の50KBの領域
907に書き込まれる。次に処理212が実行される。
今の場合、受信を要求されたデータのサイズは100K
Bであるのに対して、すでに受信されたデータのサイズ
は50KBである。したがって、要求されたデータの一
部がまだ受信されていない。したがって、判定212の
結果は否定的となり、残りのデータを受信するために処
理206が再度実行される。
The reception process 707 (FIG. 4) for the function EMU_read (701) called by the application program on the reception side is also processed according to FIG. 6 as described above. Under the current assumption, the determination in the process 202 fails. Assume that in process 206, when the data check instruction 771 is executed, it is determined that there is transmission data. In this case, the size of the buffer 812 on the receiving side is
Since it is larger than the size of the buffer on the transmission side, the process 208
The result of the determination in is positive. As a result, the process 210
Is executed. In this process, a function MPI_recv (774) for directly receiving transmission data in the buffer 812 specified by the receiving-side application program is called. This function call is performed at the start address Rbu of the buffer 812 of the receiving side application program.
ff and the size of the transmission side buffer 803 of 50 KB are designated. In this way, all data in the buffer 803 on the transmission side is written to the first 50 KB area 907 in the buffer 812 on the reception side. Next, the process 212 is executed.
In this case, the size of the data requested to be received is 100K
B, whereas the size of the data already received is 50 KB. Thus, some of the requested data has not yet been received. Therefore, the result of decision 212 is negative, and process 206 is executed again to receive the remaining data.

【0100】もし、送信側のアプリケーションプログラ
ムが次に関数EMU_write790を呼び出せば、
それに対する送信処理708(図4)の中で、関数MP
I_send(791)が同様に呼び出される。この関
数呼び出しでも、送信側アプリケーションプログラムの
次のバッファ804のアドレスSbuff’とサイズ5
0KBを指定する。
If the transmitting application program next calls the function EMU_write 790,
In the transmission processing 708 (FIG. 4) corresponding thereto, the function MP
I_send (791) is similarly called. Even in this function call, the address Sbuff 'and the size 5 of the buffer 804 next to the transmission side application program are used.
Specify 0KB.

【0101】上記処理206を繰り返したときに、すで
に送信信側のアプリケーションプログラムが上記次の関
数EMU_Send791を呼び出していたならば、処
理206での判定結果は肯定的となり、判定処理208
に移る。今の場合には、受信側のバッファ812の残り
の領域910のサイズは送信されようとするデータのサ
イズに等しいので、この判定の結果は肯定的となる。そ
の結果、処理210が実行され、送信データを受信側の
バッファ812の残りの領域910に直接書き込むため
の第2の受信関数779が呼び出される。この関数呼び
出しでは、受信側アプリケーションプログラムのバッフ
ァ812の残りの領域910のアドレスRbuff+5
0KBと送信データのサイズ50KBとを指定する。こ
うして、処理212において、要求された全てのデータ
の受信が完了したと判断されるので、受信処理707は
完了する。なお、上記処理206が繰り返し実行された
時点で送信データが存在しないときには、受信処理70
7は終了し、処理は受信側アプリケーションプログラム
に戻る。また、上記処理208が繰り返された時点で、
処理208での判定結果が否定的であるときには、処理
209が実行される。この処理の内容は、すでに説明し
たものと同じである。以上のごとく、送信側のアプリケ
ーションプログラムが発行した送信命令EMU_wri
teが指定するバッファのサイズと受信側のアプリケー
ションプログラムが発行した受信命令EMU_read
が指定するバッファのサイズが異なっていても、また、
送信側のアプリケーションプログラムが発行する送信命
令EMU_writeの数と受信側のアプリケーション
プログラムが発行する受信命令EMU_readの数が
異なっていてもバッファストリーム通信が実現されるこ
とが分かる。
If the application program on the transmitting side has already called the next function EMU_Send 791 when repeating the above processing 206, the result of the determination in the processing 206 becomes affirmative and the determination processing 208
Move on to In this case, the result of this determination is positive because the size of the remaining area 910 of the receiving buffer 812 is equal to the size of the data to be transmitted. As a result, the process 210 is executed, and the second reception function 779 for directly writing the transmission data to the remaining area 910 of the buffer 812 on the reception side is called. In this function call, the address Rbuff + 5 of the remaining area 910 of the buffer 812 of the receiving side application program is used.
Specify 0 KB and the size of the transmission data 50 KB. Thus, in the process 212, it is determined that the reception of all the requested data has been completed, and the reception process 707 is completed. If there is no transmission data at the time when the above-described processing 206 is repeatedly executed, the reception processing 70
7 ends, and the process returns to the receiving application program. Also, when the above-mentioned process 208 is repeated,
When the result of the determination at step 208 is negative, step 209 is executed. The contents of this processing are the same as those already described. As described above, the transmission instruction EMU_wr issued by the transmission-side application program
The size of the buffer specified by te and the reception instruction EMU_read issued by the application program on the reception side
If the size of the buffer specified by is different,
It can be seen that the buffer stream communication can be realized even if the number of transmission instructions EMU_write issued by the application program on the transmission side is different from the number of reception instructions EMU_read issued by the application program on the reception side.

【0102】以上の説明から分かるように、本実施の形
態によれば、並列計算機内部の様に、メッセージパッシ
ング型通信方式の高速通信機構が提供されている計算機
で動くアプリケーション同士が、TCP/IPを用いて
データ通信を行なう際に、高速通信機構の特徴を活かし
た高速通信が可能となる。また、それ以外の計算機上で
動くアプリケーションとは、従来通りのTCP/IPに
よる通信を保証する。利用者は、既存のTCP/IPア
プリケーションを一切変更する必要がない。
As can be understood from the above description, according to the present embodiment, applications running on a computer provided with a high-speed communication mechanism of a message passing communication system, such as inside a parallel computer, can communicate with TCP / IP. When performing data communication using, high-speed communication utilizing the features of the high-speed communication mechanism becomes possible. In addition, with applications running on other computers, communication by TCP / IP as usual is guaranteed. The user does not need to change any existing TCP / IP application.

【0103】<発明の実施の形態1の変形例>本発明
は、実施の形態1の内容に限定されるのではなく、以下
に例示する変形例および他の変形例を含めいろいろの実
施形態により実施できる。
<Modifications of First Embodiment of the Invention> The present invention is not limited to the contents of the first embodiment, but includes various modifications including the following modifications and other modifications. Can be implemented.

【0104】(1)広域ネットワークの通信規約として
TCP/IPを使用したが、これに代えて他の通信規約
を用いることもできる。そのときには、TCP/IP処
理ルーチン、エミュレーションライブラリを変更する必
要があるのは言うまでもない。
(1) Although TCP / IP is used as the communication protocol of the wide area network, another communication protocol may be used instead. At that time, it is needless to say that the TCP / IP processing routine and the emulation library need to be changed.

【0105】(2)実施の形態1では、メッセージパッ
シング型ライブラリを使用したが、これを使用しないこ
とも可能である。このときには、エミュレーションライ
ブラリは、直接高速通信ライブラリを呼び出すことにな
る。
(2) In the first embodiment, the message passing type library is used, but it is also possible not to use this. At this time, the emulation library directly calls the high-speed communication library.

【0106】(3)さらに、この通信ライブラリをなく
すことも可能である。たとえば、これに代えて、専用の
回路を使用することもできる。
(3) Further, it is possible to eliminate this communication library. For example, a dedicated circuit can be used instead.

【0107】(4)実施の形態1では、内部計算機は全
て広域通信網に接続されると想定した。しかし、一部の
内部計算機が広域通信網に接続されている場合にも同様
に本発明を適用できる。
(4) In the first embodiment, it is assumed that all internal computers are connected to a wide area communication network. However, the present invention can be similarly applied to a case where some internal computers are connected to a wide area communication network.

【0108】(5)実施の形態1では、広域通信網と内
部高速通信網の両方を利用することを前提とした。しか
し、本発明によるストリーム通信それ自体は、メッセー
ジパッシング型の通信を実行可能な計算機間に適用でき
るものであり、したがって、このストリーム通信を実行
するには、TCP/IP通信を使用しないでメッセージ
パッシング型の通信のみを使用するアプリケーションプ
ログラム間の通信にも適用できる。この場合には複数種
類の通信網を使用しなくてもよい。その際には、送信側
のエミュレーションライブラリは実質的には使用しない
変形例も可能である。
(5) In the first embodiment, it is assumed that both the wide area communication network and the internal high speed communication network are used. However, the stream communication itself according to the present invention can be applied between computers capable of executing message-passing type communication. Therefore, in order to execute the stream communication, message passing without using TCP / IP communication is performed. It can also be applied to communication between application programs that use only type communication. In this case, it is not necessary to use a plurality of types of communication networks. In that case, a modification example in which the emulation library on the transmission side is not substantially used is also possible.

【0109】<発明の実施の形態2>TCP/IP処理
ルーチンには従来からアプリケーションプログラムが使
用可能な関数としてselect関数が設けられてい
る。そもそもソケット記述子はファイル記述子の一種と
して定義されている。このファイル記述子が指定するオ
ブジェクトから、データを取得することが可能であるか
どうかを調べるためのシステムコールとして、sele
ct関数が用意されている。例えば、あるソケットから
受け取り可能なデータが送信側から送られてきている
(あるいは送られようとしている)かどうかも、sel
ect関数によって調べることができる。具体的にはあ
るソケットを割り当てられているアプリケーションプロ
グラムが、送信システムコールwriteを発行したか
否かが判定できる。select関数では、見張ろうと
するファイル記述子をビット列で指定する。このビット
列の各ビットはそれぞれ個別のファイル記述子に対応し
ており、ビットを1にすることでファイル記述子を指定
する。複数のビットを1にすれば、一回のselect
関数で複数のファイル記述子を同時に見張ることができ
る。select関数は、見張っているファイル記述子
の何れかがデータ受け取り可能な状態になるまでブロッ
クする。
<Second Embodiment of the Invention> The TCP / IP processing routine has conventionally been provided with a select function as a function that can be used by an application program. In the first place, a socket descriptor is defined as a kind of file descriptor. As a system call to check whether data can be obtained from the object specified by this file descriptor,
A ct function is provided. For example, whether or not data that can be received from a certain socket has been sent (or is about to be sent) from the sender is also determined by sel.
It can be checked by an ect function. Specifically, it can be determined whether or not an application program to which a certain socket is assigned has issued a transmission system call write. In the select function, a file descriptor to be monitored is specified by a bit string. Each bit of this bit string corresponds to an individual file descriptor, and setting the bit to 1 designates the file descriptor. If a plurality of bits are set to 1, one select
Functions can watch multiple file descriptors simultaneously. The select function blocks until one of the watched file descriptors is ready to receive data.

【0110】発明の実施の形態1で用いるTCP/IP
エミュレーションライブラリでは、並列計算機内部の通
信時には従来のソケットライブラリを用いないため、s
electシステムコールでは、内部通信用のソケット
からデータ受信可能であるかどうかを調べることができ
ない。そこで、本実施の形態では、実施の形態1のごと
くTCP/IPエミュレーションライブラリを使用する
計算機システムにおいても、アプリケーションプログラ
ムが従来と同様にセレクト関数を利用可能にする。
TCP / IP used in Embodiment 1 of the Invention
The emulation library does not use the conventional socket library for communication inside the parallel computer.
The select system call cannot check whether data can be received from the internal communication socket. Therefore, in the present embodiment, even in a computer system that uses the TCP / IP emulation library as in the first embodiment, the application program can use the select function as in the related art.

【0111】本実施の形態では、内部ソケットテーブル
410、411等に登録されているソケット記述子に対
しては、内部通信専用のselectに相当する処理を
行い、それ以外のファイル記述子に対しては、従来のs
electシステムコールをそのまま用いる、という切
り分けを行うセレクト関数EMU_selectをTC
P/IPエミュレーションライブラリ113内に設け
る。
In the present embodiment, processing corresponding to “select” dedicated to internal communication is performed on socket descriptors registered in the internal socket tables 410 and 411, and other file descriptors are processed. Is the traditional s
The select function EMU_select, which separates the use of the
Provided in the P / IP emulation library 113.

【0112】ただし、内部通信用のselectとse
lectシステムコールは同時に並行して実行しなくて
はならない。2つのselectを逐次に実行するので
は、例えば内部通信用のselectがデータを待って
いる間は、外部との通信用のソケットや標準入出力など
がデータを受け取り可能な状態になった場合でも、それ
を検知することができないからである。
However, select and se for internal communication are used.
The select system call must be executed simultaneously and in parallel. By executing two select operations sequentially, for example, while the internal communication select is waiting for data, even if the external communication socket or the standard input / output is ready to receive data, Because it cannot be detected.

【0113】selectの同時実行を疑似的に実現す
る手段として、内部用selectとselectシス
テムコールをノンブロッキングで続けて発行することを
スピンループで繰り返す、という方法が考えられる。し
かしこの方法を用いると、データが受け取り可能になる
まで計算機を占有してしまい、同一計算機上で走ってい
る他のプロセスに処理が渡らなくなってしまう。
As a means for simulating the simultaneous execution of select, a method of repeatedly issuing the internal select and the select system call in a non-blocking manner repeatedly in a spin loop is conceivable. However, if this method is used, the computer is occupied until data can be received, and the process cannot be passed to another process running on the same computer.

【0114】これに対して本実施の形態では、1ループ
毎に処理を他のプロセスに譲渡する命令を挿入するとい
う方法を採る。この方法により、スピンループによる計
算機の占有を避けることができる。
On the other hand, in the present embodiment, a method is employed in which an instruction for transferring the process to another process is inserted for each loop. With this method, the computer occupation by the spin loop can be avoided.

【0115】図9は、図3で示した接続状態において、
アプリケーションプログラム108および109が送信
命令1002,1003を発行して、アプリケーション
プログラム107にデータを送信し、アプリケーション
プログラム107側でそれらのデータの到着を、sel
ect命令1001によって見張っている様子を表す。
select命令1001で指定しているビット列はソ
ケットSA0およびsa1に対応しているとする(10
04,1005)。このうちsa1は内部ソケットテー
ブルに登録されているので、内部用selectで見張
る(1008)。一方、SA0は内部ソケットテーブル
に登録されていないので、selectシステムコール
で見張る(1009)。TCP/IPエミュレーション
ライブラリで発行するselectシステムコールでは
sa1を見張る必要が無いので、アプリケーションプロ
グラム107が発行したselect命令1001で指
定されていたビット列に対し、sa1に対応するビット
を0にしたビット列を指定する。処理1008と100
9はノンブロッキングに発行し、交互に繰り返す(10
10,1011)。ただし、繰り返しの途中で処理を一
旦、他のプロセスに譲渡する。
FIG. 9 shows the state in the connection state shown in FIG.
The application programs 108 and 109 issue transmission commands 1002 and 1003 to transmit data to the application program 107, and the application program 107 determines that the data has arrived at sel.
It shows a state of being watched by an ect instruction 1001.
It is assumed that the bit string specified by the select instruction 1001 corresponds to sockets SA0 and sa1 (10
04, 1005). Among them, sa1 is registered in the internal socket table, so that it is monitored by internal select (1008). On the other hand, since SA0 is not registered in the internal socket table, it is monitored by the select system call (1009). Since the select system call issued by the TCP / IP emulation library does not need to monitor sa1, a bit string in which the bit corresponding to sa1 is set to 0 is specified for the bit string specified by the select instruction 1001 issued by the application program 107. I do. Processing 1008 and 100
9 is issued non-blocking and alternately repeated (10
10, 1011). However, the process is temporarily transferred to another process during the repetition.

【0116】図9に示したselect命令、内部用の
select関数をアプリケーションプログラムが使用
可能にするためには、TCP/IPエミュレーションラ
イブラリ112,113等にはエミュレーションセレク
ト関数EMU_selectが設けられ、アプリケーシ
ョンプログラムは、これを呼び出して使用する。アプリ
ケーションプログラムがEMU_select関数を呼
び出す際には従来と同じく、それぞれ一つのソケットに
対応するビットからなるビット列ap_bitsを指定
する。TCP/IPエミュレーションライブラリは、こ
の関数呼び出しに応答して図10にともない処理を実行
する。
In order for the application program to be able to use the select instruction and the internal select function shown in FIG. 9, the TCP / IP emulation libraries 112 and 113 are provided with an emulation select function EMU_select. , Call and use this. When the application program calls the EMU_select function, a bit string ap_bits composed of bits corresponding to one socket is specified as in the related art. The TCP / IP emulation library executes processing according to FIG. 10 in response to the function call.

【0117】まず、そのビット列ap_bitsに対し
(処理1101)、内部ソケットテーブルに登録されて
いるソケット記述子に対応したビットを0にするための
マスクをかける(処理1102)。in_maskは、
内部ソケットテーブルに登録されている全てのソケット
記述子に対応するビットが0、それ以外のビットが1で
あるようなビット列である。よって、ap_bitsに
in_maskをかけて作成したビット列ex_bit
sは、ap_bitsで指定されたファイル記述子のう
ち、内部通信用のソケット記述子を除いたビット列とな
る。その後、ex_bitsを引数にしたselect
システムコールと、内部用select処理をノンブロ
ッキングで一回ずつ実行し(処理1103,110
4)、もし、この処理で調べたファイル記述子の何れか
がデータ受け取り可能状態であった場合にはリターンす
る(処理1106)。そうでない場合は、一旦他のプロ
セスに処理を譲渡し(処理1107)、再びselec
t処理を繰り返す(処理1108)。
First, a mask is applied to the bit string ap_bits (step 1101) to set the bit corresponding to the socket descriptor registered in the internal socket table to 0 (step 1102). in_mask is
The bit string is such that the bits corresponding to all socket descriptors registered in the internal socket table are 0, and the other bits are 1. Therefore, a bit string ex_bit created by multiplying ap_bits by in_mask
s is a bit string excluding the socket descriptor for internal communication from the file descriptor specified by ap_bits. After that, select using ex_bits as an argument
The system call and the internal select processing are executed once each in a non-blocking manner (processing 1103, 110
4) If any of the file descriptors checked in this process is in a data receivable state, the process returns (process 1106). If not, the process is temporarily transferred to another process (process 1107), and select is performed again.
The t processing is repeated (processing 1108).

【0118】こうして、本実施の形態によれば、実施の
形態1のように内部高速通信機構を併用する計算機シス
テムにおいても、アプリケーションプログラムがsel
ect関数を利用可能になる。
As described above, according to the present embodiment, even in the computer system using the internal high-speed communication mechanism as in the first embodiment, the application program
The ect function becomes available.

【0119】<発明の実施の形態3>上記スピンループ
によるselect関数の実現方法では、スピンループ
の途中に他のプロセスに処理を譲渡する処理1107を
挿入することで計算機の占有を回避するが、同じ計算機
上で処理されるプロセスの優先度が低いと、そのプロセ
スには処理が渡らない可能性がある。データの到着をス
リープして待つブロッキングウェイトを用いればこれを
避けることができるが、ブロッキングウェイトの内部通
信用select処理とブロッキングウェイトのsel
ectシステムコールを、1プロセス・1スレッド上で
同時に実行することはできない。
<Embodiment 3> In the above-described method for realizing a select function by a spin loop, the occupation of a computer is avoided by inserting a process 1107 for transferring a process to another process in the middle of the spin loop. If the priority of a process processed on the same computer is low, the process may not be passed to that process. This can be avoided by using a blocking weight that sleeps and waits for the arrival of data.
The ect system call cannot be executed simultaneously on one process and one thread.

【0120】これに対して本実施の形態では、まず2つ
のスレッドを生成し、一方のスレッド上では内部用se
lectを、もう一方ではselectシステムコール
を実行するという方法を採る。この方法によれば、内部
用selectとselectシステムコールがそれぞ
れのスレッド上で独立に動作することができるため、同
時にブロックしてデータを見張ることができる。
On the other hand, in the present embodiment, first, two threads are generated, and on one thread, the internal thread is generated.
Select, and the other is to execute the select system call. According to this method, since the internal select and the select system call can operate independently on each thread, it is possible to block and watch data at the same time.

【0121】図11は、図9で示したのと同じ通信状態
を表している。ただし、内部用selectとsele
ctシステムコールの同時実行の実現方法が異なる。図
11では、これら2つのselect処理は、別々のス
レッドの上で実行する(1203,1204)。処理1
009と同様に、スレッド1203上のselectシ
ステムコールでは、sa1に対応するビットを0にした
ビット列を指定する。
FIG. 11 shows the same communication state as that shown in FIG. However, internal select and select
The method of realizing the simultaneous execution of the ct system call is different. In FIG. 11, these two select processes are executed on separate threads (1203, 1204). Processing 1
Similarly to 009, in the select system call on the thread 1203, a bit string in which the bit corresponding to sa1 is set to 0 is specified.

【0122】図12を参照するに、本実施の形態におい
て、アプリケーションプログラムがEMU_selec
t関数を発行する際に指定したビット列ap_bits
に対し、内部ソケットテーブルに登録されているソケッ
ト記述子に対応したビットを0にするためのマスクをか
けてex_bitsを作成する処理までは図10の処理
(1101,1102)と同じである(処理1301,
1302)。その後、まずノンブロッキングでsele
ctシステムコール(処理1303)と内部用sele
ct処理(処理1304)を1回ずつ行う。この処理で
調べたファイル記述子の何れかがデータ受け取り可能状
態であった場合にはリターンする。そうでない場合に
は、スレッドを2つ生成し(処理1307)、それぞれ
の上でselectシステムコール(処理1308)と
内部用select(処理1309)を実行する。これ
らの処理は、それぞれデータ受け取り状態になるまでブ
ロックする。両処理のうち先にブロックが解けた方は、
もう一方のスレッドをキャンセルして(処理1310,
1311)リターンする(処理1314,1315)。
このキャンセル処理では、スレッドを強制的に終了させ
るのではなく、そのスレッドがもう不要であるという印
を付ける。スレッドはブロックが解けた時にこの印が付
けられているかどうかを調べ(処理1316,131
7)、もし付けられていれば、キャンセルされていたこ
とになるのでそのまま消滅する(処理1318,131
9)。
Referring to FIG. 12, in the present embodiment, the application program is EMU_select
Bit string ap_bits specified when issuing the t function
On the other hand, the process up to the process of creating ex_bits by applying a mask for setting the bit corresponding to the socket descriptor registered in the internal socket table to 0 is the same as the process (1101, 1102) in FIG. 1301,
1302). Then, first, non-blocking and sele
ct system call (process 1303) and internal cell
The ct process (process 1304) is performed once. If any of the file descriptors checked in this process are in a data receivable state, the process returns. If not, two threads are generated (process 1307), and a select system call (process 1308) and an internal select (process 1309) are executed on each of them. These processes block until a data receiving state is attained. If the block is solved first in both processes,
Cancel the other thread (process 1310,
1311) Return (processing 1314, 1315).
In this canceling process, instead of forcibly terminating the thread, the thread is marked as unnecessary. The thread checks whether or not this mark is added when the block is unwound (processing 1316, 131
7) If it is attached, it means that it has been cancelled, and it is deleted as it is (processing 1318, 131)
9).

【0123】上記select処理において、スレッド
分割の前に処理1303および処理1304のノンブロ
ッキングselect処理を一回ずつ行うのは、次の理
由による。もし、処理1301が発行される以前に内部
用ソケットとそれ以外のファイル記述子が共にデータ受
け取り可能な状態になっている場合、select関数
はその両方を検知できなければならない。しかし、いき
なりスレッドを分割して、内部ソケットとそれ以外のフ
ァイル記述子を別々に見張り始めると、両スレッドのう
ち若干早く検知した方がもう一方のスレッドをキャンセ
ルしてしまうため、片方のスレッドの状態しか検知する
ことができない。これに対して処理1303および処理
1304を実行することで、処理1301が発行される
以前の内部ソケットとそれ以外の記述子の状態を両方と
も確実に調べることができる。
In the above-described select processing, the non-blocking select processing of the processing 1303 and the processing 1304 is performed once before thread division for the following reason. If both the internal socket and the other file descriptors are ready to receive data before the processing 1301 is issued, the select function must be able to detect both. However, if you split the thread and start watching the internal socket and other file descriptors separately, one of the two threads will detect the other thread slightly earlier and cancel the other thread. Only the state can be detected. On the other hand, by executing the processing 1303 and the processing 1304, it is possible to reliably check both the state of the internal socket and the state of the other descriptors before the processing 1301 is issued.

【0124】本方式では、データの到着をスリープして
待つため、実施の形態2のスピンループで待つ方法に比
べると、データ検出のタイミングが遅れるが、優先度の
低いプロセスに対しても、処理の妨げとなることを回避
できる。
In this method, the data is asleep while waiting for the arrival of data, so that the data detection timing is delayed as compared with the method of waiting in the spin loop of the second embodiment. Can be avoided.

【0125】[0125]

【発明の効果】本発明によれば、ストリーム通信をメッ
セージパッシング型の通信でもって実現できる。
According to the present invention, stream communication can be realized by message passing type communication.

【0126】本発明の他の態様によれば、第1の通信網
とそれより高速の第2の通信網に接続された計算機上で
動作するアプリケーションプログラムが、第1の通信網
に接続された他の計算機上で動作する他のアプリケーシ
ョンプログラムとの間で第1の通信規約に基づいて通信
することができ、さらに、第2の通信網に接続された他
の計算機上で動作する他のアプリケーションプログラム
との間でその第2の通信網を使用した高速の通信を行う
ことができる。
According to another aspect of the present invention, an application program running on a computer connected to a first communication network and a higher speed second communication network is connected to the first communication network. It is possible to communicate with another application program running on another computer based on the first communication protocol, and further, another application running on another computer connected to the second communication network. High-speed communication can be performed with the program using the second communication network.

【0127】さらに具体的には、上記第1の通信規約は
TCP/IP通信規約を使用できる。また、上記第2の
通信網を使用した通信を、メッセージパッシング型の通
信とすることができる。
More specifically, the first communication protocol can use a TCP / IP communication protocol. The communication using the second communication network can be a message passing type communication.

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

【図1】本発明の実施例の全体構成図。FIG. 1 is an overall configuration diagram of an embodiment of the present invention.

【図2】ソケット接続のフローチャート。FIG. 2 is a flowchart of socket connection.

【図3】ソケット接続を説明すための図。FIG. 3 is a diagram illustrating socket connection.

【図4】内部・外部通信切り分け方法のフローチャー
ト。
FIG. 4 is a flowchart of an internal / external communication separation method.

【図5】内部・外部通信切り分け方法を説明するための
図。
FIG. 5 is a view for explaining an internal / external communication separation method.

【図6】ストリーム通信のフローチャート。FIG. 6 is a flowchart of stream communication.

【図7】送受信動作に使用される命令列の一例を示す
図。
FIG. 7 is a diagram showing an example of an instruction sequence used for a transmission / reception operation.

【図8】送受信動作に使用される命令列の他の例を示す
図。
FIG. 8 is a diagram showing another example of the instruction sequence used for the transmission / reception operation.

【図9】select機能をスピンループで実現する方
法を説明するための図。
FIG. 9 is a view for explaining a method of realizing a select function by a spin loop.

【図10】select機能をスピンループで実現する
方法のフローチャート。
FIG. 10 is a flowchart of a method for implementing a select function by a spin loop.

【図11】select機能をスレッドを用いて実現す
る方法を説明するための図。
FIG. 11 is a view for explaining a method of realizing a select function using a thread.

【図12】select機能をスレッドを用いて実現す
る方法のフローチャート。
FIG. 12 is a flowchart of a method for implementing a select function using a thread.

【図13】従来のTCP/IP通信規約の階層図。FIG. 13 is a hierarchical diagram of a conventional TCP / IP communication protocol.

【図14】従来のストリーム通信を説明するための図。FIG. 14 is a diagram for explaining conventional stream communication.

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

105...並列計算機内部通信網,106...グロ
ーバル通信網,111...ソケットアプリケーション
プログラムインタフェース,118...MPI仕様の
インタフェース,119,120,121,122,1
23...ネットワークインタフェースハードウェア,
140、141...メッセージパッシング型ライブラ
リ,401,402,403,404,405,40
6...ソケット,407,408,409...ソケ
ットのコネクション,410,411...内部ソケッ
トテーブル,601...並列計算機内部通信時におけ
るデータ経路,602...外部計算機との通信時にお
けるデータ経路,803,804,812,81
3...アプリケーションプログラムのバッファ,80
9...ストリーム,901...TCP/IPエミュ
レーションライブラリ内のバッファ。
105. . . Parallel computer internal communication network, 106. . . Global Communication Network, 111. . . Socket application program interface, 118. . . Interface of MPI specification, 119, 120, 121, 122, 1
23. . . Network interface hardware,
140, 141. . . Message passing type library, 401, 402, 403, 404, 405, 40
6. . . Socket, 407, 408, 409. . . Socket connection, 410, 411. . . Internal socket table, 601. . . Data path at the time of parallel computer internal communication, 602. . . Data path at the time of communication with an external computer, 803, 804, 812, 81
3. . . Application program buffer, 80
9. . . Stream, 901. . . Buffer in TCP / IP emulation library.

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】第1の計算機上で実行されている第1のア
プリケーションプログラムが発行した複数の送信命令に
より指定される複数の送信データのそれぞれを、第2の
計算機上で実行されている第2のアプリケーションプロ
グラムが発行した複数の受信命令に応答して、第2の計
算機上に設けられたエミュレーションライブラリの制御
下でメッセージパッシング型の通信で受信し、 上記複数の送信データの連なりからなるひと繋がりのデ
ータの内、上記複数の受信命令により指定されるサイズ
部分に区分して得られる部分をそれぞれの受信命令が指
定する複数のバッファに格納するように、受信されたそ
れぞれの送信データを上記エミュレーションライブラリ
の制御下で処理する計算機間データ送受信方法。
A plurality of transmission data specified by a plurality of transmission instructions issued by a first application program executed on a first computer, each of the plurality of transmission data being executed on a second computer; A plurality of transmission data received in response to a plurality of reception instructions issued by the second application program under message-passing communication under the control of an emulation library provided on the second computer. Among the connected data, each received transmission data is stored in a plurality of buffers specified by the respective reception instructions so that a portion obtained by dividing the data into the size part specified by the plurality of reception instructions is stored in the plurality of buffers specified by the respective reception instructions. An inter-computer data transmission / reception method that processes under the control of the emulation library.
【請求項2】メッセージパッシング型の通信を実行する
ための第1の通信ライブラリを有する第1の計算機上で
実行されている第1のアプリケーションプログラムが発
行した複数の送信命令に応答して、それらの送信命令に
より指定される複数のバッファに保持された複数の送信
データの送信をそれぞれ要求する複数の送信命令を、上
記第1の計算機に設けられた第1のエミュレーションラ
イブラリにより上記第1の通信ライブラリに対して発行
し、 メッセージパッシング型の通信を実行するための第2の
通信ライブラリを有する第2の計算機上で実行されてい
る第2のアプリケーションプログラムが発行した複数の
受信命令に応答して、上記複数の送信データをメッセー
ジパッシング型の通信で受信するための複数の受信命令
を、上記第2の計算機に設けられた第2のエミュレーシ
ョンライブラリにより上記第2の通信ライブラリに対し
て発行し、 第1のエミュレーションライブラリが発行した上記複数
の送信命令により指定される複数の送信データの連なり
からなるひと繋がりのデータを、上記複数の受信命令に
より指定されるサイズ部分に区分してそれぞれの受信命
令が指定する複数のバッファに格納するように、第2の
エミュレーションライブラリが発行した上記複数の受信
命令により受信される上記複数の送信データの第2の計
算機内での格納位置およびそれぞれの送信データの受信
後の第2の計算機内での移動を、上記第2のエミュレー
ションライブラリにより制御する計算機間データ送受信
方法。
2. In response to a plurality of transmission instructions issued by a first application program running on a first computer having a first communication library for executing message-passing type communication, A plurality of transmission commands requesting transmission of a plurality of transmission data held in a plurality of buffers specified by the first transmission command by the first emulation library provided in the first computer. In response to a plurality of receiving instructions issued by a second application program running on a second computer having a second communication library for issuing message-passing type communication to the library. A plurality of receiving instructions for receiving the plurality of transmission data by message-passing type communication, A second emulation library provided in the computer of the second computer, the second emulation library issues to the second communication library, and the first emulation library issues a plurality of transmission data specified by the plurality of transmission instructions issued by the first emulation library. According to the plurality of reception instructions issued by the second emulation library, the connected data is divided into size portions designated by the plurality of reception instructions and stored in a plurality of buffers designated by the respective reception instructions. Inter-computer data transmission / reception controlling the storage positions of the received plurality of transmission data in the second computer and the movement of the plurality of transmission data in the second computer after receiving the respective transmission data by the second emulation library. Method.
【請求項3】メッセージパッシング型の通信を実行する
ための第1の通信ライブラリを有する第1の計算機上で
実行されている第1のアプリケーションプログラムが発
行した複数回の送信命令に応答して、それらの送信命令
により指定される複数のバッファに保持された複数の送
信データの送信をそれぞれ要求する複数の送信命令を、
上記第1の計算機に設けられた第1のエミュレーション
ライブラリにより上記第1の通信ライブラリに対して発
行し、 メッセージパッシング型の通信を実行するための第2の
通信ライブラリを有する第2の計算機上で実行されてい
る第2のアプリケーションプログラムが発行した複数の
受信命令に応答して、上記複数の送信データをメッセー
ジパッシング型の通信で受信するための複数の受信命令
を、上記第2の計算機に設けられた第2のエミュレーシ
ョンライブラリにより上記第2の通信ライブラリに対し
て発行し、 第1のエミュレーションライブラリが発行した上記複数
の送信命令が指定する複数の送信データを連ねて構成さ
れるひと繋がりのデータを、受信側のアプリケーション
プログラムが発行した複数回の受信命令により指定され
る複数のバッファに、それぞれの受信命令が指定するサ
イズ部分に区分して格納できるように、上記第2のエミ
ュレーションライブラリにより(a)第2のエミュレー
ションライブラリが発行した上記複数の受信命令の各々
が指定する、受信データを格納するバッファのアドレス
を、現在処理中の第2のアプリケーションプログラムが
発行した受信命令が指定するバッファに属するアドレス
もしくは上記第2の通信ライブラリが利用可能なバッフ
ァに属するアドレスとなるように定め、かつ(b)、上
記第2の通信ライブラリが利用可能な上記バッファのア
ドレスを指定する、第2のエミュレーションライブラリ
が発行した受信命令により受信した送信データのその後
の上記第1の計算機内での移動を制御し、 第2のエミュレーションライブラリが発行した上記複数
の受信命令は、それぞれ第1のエミュレーションライブ
ラリが発行した上記複数の送信命令の一つに対応して発
行され、 第2のエミュレーションライブラリが発行した上記複数
の受信命令の各々が指定する受信データのサイズは、第
1のエミュレーションライブラリが発行した上記複数の
送信命令の内の対応する一つの送信命令が指定する送信
データのサイズに等しくなるように設定される計算機間
データ送受信方法。
3. In response to a plurality of transmission instructions issued by a first application program executed on a first computer having a first communication library for executing message-passing type communication, A plurality of transmission instructions requesting transmission of a plurality of transmission data held in a plurality of buffers specified by the transmission instructions, respectively.
Issued to the first communication library by a first emulation library provided in the first computer, on a second computer having a second communication library for executing message-passing type communication. In response to the plurality of reception instructions issued by the second application program being executed, the second computer is provided with a plurality of reception instructions for receiving the plurality of transmission data by message passing communication. A series of data that are issued to the second communication library by the obtained second emulation library and are formed by linking a plurality of transmission data specified by the plurality of transmission instructions issued by the first emulation library. Is specified by multiple receiving instructions issued by the receiving application program. The second emulation library (a) allows each of the plurality of reception instructions issued by the second emulation library to be stored in a plurality of buffers separately in a size portion designated by each reception instruction. The address of the buffer for storing the received data to be specified is set to the address belonging to the buffer specified by the reception command issued by the second application program currently being processed or the address belonging to the buffer usable by the second communication library. And (b) specifying the address of the buffer that can be used by the second communication library, and the first transmission data received by a reception command issued by the second emulation library. Controls movement within the computer and generates a second emulation license. The plurality of reception instructions issued by the Rally are respectively issued corresponding to one of the plurality of transmission instructions issued by the first emulation library, and each of the plurality of reception instructions issued by the second emulation library is issued. Is set to be equal to the size of the transmission data specified by the corresponding one of the plurality of transmission instructions issued by the first emulation library. Method.
【請求項4】(a)送信側のアプリケーションが指定す
るいずれかの送信データの送信を要求する、上記メッセ
ージパッシング型の通信により定められた送信命令を送
信側の計算機内で発行し、(b)上記送信命令が指定す
る送信データ長を、その送信データの送信前に、受信側
の計算機上で動作する受信側のエミュレーションライブ
ラリにより検知し、(c)受信側のアプリケーションが
発行した受信命令によって指定された受信データ長と上
記送信データ長とを、上記受信側のエミュレーションラ
イブラリにより比較し、(d)上記比較の結果に応じ
て、上記受信側の計算機内のエミュレーション用のバッ
ファに上記送信データを受信することを要求するかもし
くは上記送信データを上記アプリケーションバッファに
受信することを要求する、上記メッセージパッシング型
の通信により定められた受信命令を上記受信側のエミュ
レーションライブラリにより発行し、(e)上記送信命
令と受信側のエミュレーションライブラリにより発行し
た上記受信命令とに応答して、上記送信データを上記送
信側の計算機と上記受信側の計算機により、上記送信側
の計算機から上記エミュレーション用のバッファもしく
は上記アプリケーションバッファ内に転送する計算機間
データ送受信方法。
And (a) issuing, within the computer on the transmission side, a transmission command determined by the message-passing type communication requesting transmission of any transmission data specified by the application on the transmission side; The transmission data length specified by the transmission command is detected by a reception emulation library operating on a reception-side computer before transmission of the transmission data. The specified reception data length and the transmission data length are compared by the reception side emulation library, and (d) the transmission data is stored in an emulation buffer in the reception side computer in accordance with the result of the comparison. Or request to receive the transmission data in the application buffer. (E) issuing a reception command determined by the message-passing type communication by the emulation library on the receiving side; and (e) responding to the transmission command and the reception command issued by the emulation library on the receiving side, and An inter-computer data transmission / reception method in which transmission data is transferred from the transmission-side computer to the emulation buffer or the application buffer by the transmission-side computer and the reception-side computer.
【請求項5】(f)上記送信データが上記エミュレーシ
ョンバッファに送信されたときには、そのエミュレーシ
ョンバッファから上記受信データ長分だけのデータを上
記受信命令が指定したアプリケーションバッファ内に、
上記受信側のエミュレーションライブラリによりコピー
するステップをさらに有する請求項4に記載の計算機間
データ送受信方法。
(F) when the transmission data is transmitted to the emulation buffer, data corresponding to the reception data length from the emulation buffer is stored in an application buffer designated by the reception instruction;
5. The method according to claim 4, further comprising the step of copying using the emulation library on the receiving side.
【請求項6】(g)上記ステップ(e)により、上記送
信データが上記アプリケーションバッファ内に転送され
た場合、上記送信側の計算機が後続の送信データに関し
てステップ(a)を実行するのを待ち、(h)上記後続
の送信データに関して、ステップ(a)が実行された場
合、その後続の送信データと上記受信命令が要求した受
信データ長の残りの長さのデータに関して上記ステップ
(b)以降のステップを実行するステップをさらに有す
る請求項5に記載の計算機間データ送受信方法。
(G) If the transmission data is transferred into the application buffer in the step (e), it waits for the computer on the transmission side to execute the step (a) for the subsequent transmission data. (H) When step (a) is performed on the subsequent transmission data, the subsequent transmission data and the data of the remaining length of the reception data length requested by the reception command are processed from step (b) onward. The method according to claim 5, further comprising the step of:
【請求項7】(i)上記ステップ(a)を実行する前
に、上記エミュレーションバッファ内に受信済みでいず
れのアプリケーションバッファにも転送されていないデ
ータが残っているか否かを判別し、(j)そのデータが
残っているときには、そのバッファから上記アプリケー
ションに上記受信データ長を超えない範囲でコピーする
ステップをさらに有する請求項6に記載の計算機間デー
タ送受信方法。
(I) Before executing the step (a), it is determined whether or not data remaining in the emulation buffer and not transferred to any application buffer remains. 7. The inter-computer data transmission / reception method according to claim 6, further comprising the step of: when the data remains, copying from the buffer to the application within a range not exceeding the reception data length.
【請求項8】第1の通信網で相互に結合されている複数
の計算機を有し、少なくともその一部の計算機が第2の
通信網に相互に接続されている計算機システムにおい
て、(a)上記一部の計算機の内の第1の計算機上で動
作する第1のアプリケーションプログラムから、第2の
計算機上で動作するいずれかの第2のアプリケーション
プログラムとの間のデータ送受信に使用する通信路を、
第1の通信網を使用するために定められた通信規約に従
って動作する処理ルーチンにより決定し、(b)第1の
アプリケーションプログラムからの、上記決定された通
信路に対する接続要求をエミュレーションライブラリに
より処理し、その処理の中で、上記第2のアプリケーシ
ョンプログラムとの通信に上記第2の通信網を利用可能
か否かを判別し、(c)上記第2の通信網が利用可能と
判別されたときには、上記通信路を上記エミュレーショ
ンライブラリ内に登録し、(d)その後上記第1のアプ
リケーションプログラムがデータ送受信命令を発行した
ときに、その送受信命令により指定された通信路が、上
記エミュレーションライブラリ内に登録されているか否
かを判別し、(e)その指定された通信路が、上記エミ
ュレーションライブラリ内に登録されているときには、
上記エミュレーションライブラリにより、上記送受信命
令が要求する送受信処理を上記第2の通信網を使用して
実行し、(f)その指定された通信路が、上記エミュレ
ーションライブラリ内に登録されていないときには、上
記エミュレーションライブラリにより、上記送受信命令
が要求する送受信処理の実行を上記処理ルーティンに要
求し、上記処理ルーチンにより、その送受信処理を上記
第1の通信網を使用して実行するデータ送受信方法。
8. A computer system having a plurality of computers interconnected by a first communication network, wherein at least some of the computers are interconnected by a second communication network. A communication path used for data transmission / reception between a first application program operating on a first computer among some of the computers and any second application program operating on a second computer To
Determined by a processing routine that operates in accordance with a communication protocol defined for using the first communication network, and (b) processing a connection request for the determined communication path from the first application program by an emulation library. In the processing, it is determined whether or not the second communication network can be used for communication with the second application program. (C) When it is determined that the second communication network can be used, Registering the communication path in the emulation library; and (d) when the first application program issues a data transmission / reception instruction thereafter, the communication path specified by the transmission / reception instruction is registered in the emulation library. (E) that the specified communication path is When it is registered in the library is,
The transmission / reception process requested by the transmission / reception command is executed by the emulation library using the second communication network. (F) When the specified communication path is not registered in the emulation library, A data transmission / reception method, wherein an emulation library requests the processing routine to execute transmission / reception processing requested by the transmission / reception command, and the processing routine executes the transmission / reception processing using the first communication network.
【請求項9】上記通信規約はTCP/IPであり、 上記通信路の決定は、ソケットの生成およびソケットへ
の名前付けの処理を含む請求項8記載のデータ送受信方
法。
9. The data transmission / reception method according to claim 8, wherein the communication protocol is TCP / IP, and the determination of the communication path includes a process of generating a socket and naming the socket.
【請求項10】上記第2の通信網を使用した通信はメッ
セージパッシング型の通信である請求項8記載のデータ
送受信方法。
10. The data transmission / reception method according to claim 8, wherein the communication using the second communication network is a message passing type communication.
【請求項11】第1の通信網で相互に結合されている複
数の計算機を有し、少なくともその一部の計算機が第1
の通信網よりも高速にデータを転送可能な第2の通信網
に相互に接続され、上記一部の計算機の内の第1の計算
機上で動作する第1のアプリケーションプログラムか
ら、第2の計算機上で動作するいずれかの第2のアプリ
ケーションプログラムとの間のデータ送受信に、上記第
2の通信網を使用可能であるときには、これを使用し、
そうでないときには上記第2の通信網を使用する計算機
システムにおいて、 第1のアプリケーションプログラムに宛てて他のアプリ
ケーションプログラムから送信されるデータの有無を検
出するときに、上記第2の通信網を介して送信されるデ
ータの検出処理と、上記第1の通信網を介して送信され
るデータの検出処理とを、ノンブロックで交互に繰り返
し、 両検出処理を1回繰り返す毎に両検出処理を中断し、上
記第1の計算機上で動作している他のプロセスに処理を
譲渡する送信データ検出方法。
11. A computer having a plurality of computers interconnected by a first communication network, wherein at least some of the computers are connected to the first communication network.
From a first application program operating on a first computer of the above-mentioned some computers, the second computer being connected to a second communication network capable of transferring data at a higher speed than the communication network of the second computer; When the second communication network is available for data transmission / reception with any of the second application programs operating on the above, this is used,
Otherwise, in the computer system using the second communication network, when detecting the presence / absence of data transmitted from another application program addressed to the first application program, through the second communication network The process of detecting data to be transmitted and the process of detecting data transmitted via the first communication network are alternately repeated in a non-block manner. And a transfer data detecting method for transferring the processing to another process running on the first computer.
【請求項12】第1の通信網で相互に結合されている複
数の計算機を有し、少なくともその一部の計算機が第1
の通信網よりも高速にデータを転送可能な第2の通信網
に相互に接続され、上記一部の計算機の内の第1の計算
機上で動作する第1のアプリケーションプログラムか
ら、第2の計算機上で動作するいずれかの第2のアプリ
ケーションプログラムとの間のデータ送受信に、上記第
2の通信網を使用可能であるときには、これを使用し、
そうでないときには上記第2の通信網を使用する計算機
システムにおいて、 第1のアプリケーションプログラムに宛てて他のアプリ
ケーションプログラムから送信されるデータの有無を検
出するときに、二つのスレッドを生成し、 上記第2の通信網を介して送信されるデータの検出処理
と、上記第1の通信網を介して送信されるデータの検出
処理とを、それぞれのスレッド上で独立に行なうデータ
検出方法。
12. A computer having a plurality of computers interconnected by a first communication network, at least some of which are connected to the first computer.
From a first application program operating on a first computer of the above-mentioned some computers, the second computer being connected to a second communication network capable of transferring data at a higher speed than the communication network of the second computer; When the second communication network is available for data transmission / reception with any of the second application programs operating on the above, this is used,
Otherwise, in the computer system using the second communication network, when detecting the presence / absence of data transmitted from another application program to the first application program, two threads are generated. A data detection method for independently performing detection processing of data transmitted via the second communication network and detection processing of data transmitted via the first communication network on respective threads.
JP13236498A 1998-05-14 1998-05-14 Data transmission / reception method between computers Expired - Fee Related JP3628514B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13236498A JP3628514B2 (en) 1998-05-14 1998-05-14 Data transmission / reception method between computers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13236498A JP3628514B2 (en) 1998-05-14 1998-05-14 Data transmission / reception method between computers

Publications (2)

Publication Number Publication Date
JPH11328134A true JPH11328134A (en) 1999-11-30
JP3628514B2 JP3628514B2 (en) 2005-03-16

Family

ID=15079650

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13236498A Expired - Fee Related JP3628514B2 (en) 1998-05-14 1998-05-14 Data transmission / reception method between computers

Country Status (1)

Country Link
JP (1) JP3628514B2 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003526150A (en) * 2000-02-29 2003-09-02 パルテク アクチェンゲゼルシャフト Method for controlling communication of a single computer in a computer network
US6826622B2 (en) 2001-01-12 2004-11-30 Hitachi, Ltd. Method of transferring data between memories of computers
JP2007534073A (en) * 2004-04-21 2007-11-22 レベル、ファイブ、ネットワークス、インコーポレーテッド User level stack
WO2012039216A1 (en) * 2010-09-24 2012-03-29 日本電気株式会社 Information processing device, method therefor and program therefor
WO2013027247A1 (en) * 2011-08-25 2013-02-28 富士通株式会社 Information processing device and method for controlling information processing device
JP2014006628A (en) * 2012-06-22 2014-01-16 Nec Engineering Ltd Client device, client control method, and program
US9117034B2 (en) 2012-03-30 2015-08-25 Fujitsu Limited Data processing apparatus, computation device, control method for data processing apparatus
JP2017016693A (en) * 2006-06-13 2017-01-19 タンネンバウム、ズヴィ Support for cluster computing for application program

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003526150A (en) * 2000-02-29 2003-09-02 パルテク アクチェンゲゼルシャフト Method for controlling communication of a single computer in a computer network
JP2011018383A (en) * 2000-02-29 2011-01-27 Partec Ag Method of controlling communication of single computer in computer network
US6826622B2 (en) 2001-01-12 2004-11-30 Hitachi, Ltd. Method of transferring data between memories of computers
JP2007534073A (en) * 2004-04-21 2007-11-22 レベル、ファイブ、ネットワークス、インコーポレーテッド User level stack
JP4825794B2 (en) * 2004-04-21 2011-11-30 ソーラーフレア コミュニケーションズ インコーポレーテッド User level stack
JP2020009450A (en) * 2006-06-13 2020-01-16 タンネンバウム、ズヴィ Cluster computing support for application programs
JP2017016693A (en) * 2006-06-13 2017-01-19 タンネンバウム、ズヴィ Support for cluster computing for application program
US10333768B2 (en) 2006-06-13 2019-06-25 Advanced Cluster Systems, Inc. Cluster computing
US11128519B2 (en) 2006-06-13 2021-09-21 Advanced Cluster Systems, Inc. Cluster computing
US11563621B2 (en) 2006-06-13 2023-01-24 Advanced Cluster Systems, Inc. Cluster computing
US11570034B2 (en) 2006-06-13 2023-01-31 Advanced Cluster Systems, Inc. Cluster computing
US11811582B2 (en) 2006-06-13 2023-11-07 Advanced Cluster Systems, Inc. Cluster computing
US12021679B1 (en) 2006-06-13 2024-06-25 Advanced Cluster Systems, Inc. Cluster computing
JPWO2012039216A1 (en) * 2010-09-24 2014-02-03 日本電気株式会社 Information processing apparatus, method and program thereof
WO2012039216A1 (en) * 2010-09-24 2012-03-29 日本電気株式会社 Information processing device, method therefor and program therefor
WO2013027247A1 (en) * 2011-08-25 2013-02-28 富士通株式会社 Information processing device and method for controlling information processing device
US9117034B2 (en) 2012-03-30 2015-08-25 Fujitsu Limited Data processing apparatus, computation device, control method for data processing apparatus
JP2014006628A (en) * 2012-06-22 2014-01-16 Nec Engineering Ltd Client device, client control method, and program

Also Published As

Publication number Publication date
JP3628514B2 (en) 2005-03-16

Similar Documents

Publication Publication Date Title
CN110177118B (en) RDMA-based RPC communication method
US7089289B1 (en) Mechanisms for efficient message passing with copy avoidance in a distributed system using advanced network devices
US7817634B2 (en) Network with a constrained usage model supporting remote direct memory access
EP1581875B1 (en) Using direct memory access for performing database operations between two or more machines
US6693880B2 (en) System of controlling the flow of information between senders and receivers across links being used as channels
US6799200B1 (en) Mechanisms for efficient message passing with copy avoidance in a distributed system
US5878225A (en) Dual communication services interface for distributed transaction processing
US7274706B1 (en) Methods and systems for processing network data
Chen et al. Constructing adaptive software in distributed systems
US7640364B2 (en) Port aggregation for network connections that are offloaded to network interface devices
US9049218B2 (en) Stateless fibre channel sequence acceleration for fibre channel traffic over Ethernet
US8458280B2 (en) Apparatus and method for packet transmission over a high speed network supporting remote direct memory access operations
US8438321B2 (en) Method and system for supporting hardware acceleration for iSCSI read and write operations and iSCSI chimney
US20070208820A1 (en) Apparatus and method for out-of-order placement and in-order completion reporting of remote direct memory access operations
AU2014200239B2 (en) System and method for multiple sender support in low latency fifo messaging using rdma
Tian et al. Accelerating distributed deep learning using multi-path RDMA in data center networks
US20060069788A1 (en) Interface method, system, and program product for facilitating layering of a data communications protocol over an active message layer protocol
US7539760B1 (en) System and method for facilitating failover of stateful connections
EP1570369A2 (en) An apparatus and method for receive transport protocol termination
US6510465B1 (en) Dual communication services interface for distributed transaction processing
JP3628514B2 (en) Data transmission / reception method between computers
US6681254B1 (en) Method of controlling the flow of information between senders and receivers across links being used as channels
US6442613B1 (en) Controlling the flow of information between senders and receivers across links being used as channels
US20050283545A1 (en) Method and system for supporting write operations with CRC for iSCSI and iSCSI chimney
Seifert et al. SCI SOCKET-A fast socket implementation over SCI

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040914

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041109

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: 20041207

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20041208

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

Free format text: PAYMENT UNTIL: 20071217

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20081217

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20081217

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20091217

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees