JPH0348361A - Simulation system - Google Patents

Simulation system

Info

Publication number
JPH0348361A
JPH0348361A JP18305089A JP18305089A JPH0348361A JP H0348361 A JPH0348361 A JP H0348361A JP 18305089 A JP18305089 A JP 18305089A JP 18305089 A JP18305089 A JP 18305089A JP H0348361 A JPH0348361 A JP H0348361A
Authority
JP
Japan
Prior art keywords
simulation
processing
processors
particle
processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP18305089A
Other languages
Japanese (ja)
Inventor
Toshiyuki Nakada
中田 登志之
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP18305089A priority Critical patent/JPH0348361A/en
Publication of JPH0348361A publication Critical patent/JPH0348361A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

PURPOSE:To reduce the latter half time of each time step processing by using (n) processors, and when the number of processors to be simulated is reduced less than n/k, and allocating k (1<k<n) processors to the simulation of one particle. CONSTITUTION:A multiprocessor system is constituted of (n) processors 21 to 2n and a common memory 3 to be read/written from these processors 21 to 2n. In the case of simulating (m) particles by means of n(n<m) processors in each time step, one processor is allocated to each particle until n particles are left to execute simulation. When the processing of one particle can be divided into (k) processing to be mutually communicated, (k) processors are allocated to the processing of one particle after n/k particles are left to execute simulation among these processors by means of the parallel processing of fine processing units. Thus, the latter half time of each time step processing can be reduced.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、マルチプロセッサシステムを用いて粒子系の
シミュレーションを実行するためのシミュレーションシ
ステムに関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a simulation system for executing a particle system simulation using a multiprocessor system.

(従来の技術) モンテカルロシミュレーションなどの粒子系のシミュレ
ーション処理をマルチプロセッサ上で並列処理に”上り
実現する方式として下記のものが知られている。
(Prior Art) The following is known as a method for realizing particle-based simulation processing such as Monte Carlo simulation in parallel processing on a multiprocessor.

■そのタイムステップのシミュレーションを実行してい
ない粒子に仕事が無いプロセッサを割り当てる。
■Assign a processor with no work to particles that are not running the simulation for that time step.

■あるプロセッサの仕事が終わると、そのシミュレーシ
ョンの結果を受けて、エネルギーのロスなどの結果に足
し合わせる(共通処理)。その後、まだそのタイムステ
ップのシミュレーションを実行していない粒子が存在す
れば、新たにそのプロセッサをその粒子のシミュレーシ
ョンに割り当てる。
■When a certain processor's work is completed, the results of the simulation are received and added to the results such as energy loss (common processing). After that, if there is a particle that has not yet been simulated for that time step, that processor is newly assigned to the simulation of that particle.

以上の■、■を各タイムステップ1回のシミュレーショ
ンの処理において行い二粒子がなくなるまで、実行する
。こうすることにより、並列処理を可能としている。
The above steps (1) and (2) are performed in one simulation process at each time step until there are no more two particles. This allows parallel processing.

(発明が解決しようとする課題) しかし、この様な方式では、各粒子のシミュレーション
を1台のプロセッサで担当するため、1タイムステップ
の各粒子の処理時間が長い場合や1タイムステップの各
粒子の処理時間が粒子によって異なる場合、タイムステ
ップの後半で全ての粒子がプロセッサに割り当てられた
後、最後の粒子の処理が終わるまでは、次のタイムステ
ップの処理に進めないため、各々の粒子のシミュレーシ
ョンが終わるにつれて、仕1Eの無いプロセッサが増加
し、その分シミュレーションに要する時間が増加すると
いう欠点が存在した。
(Problem to be solved by the invention) However, in such a method, since one processor is in charge of simulating each particle, there are cases where the processing time for each particle in one time step is long, or the simulation of each particle in one time step is If the processing time differs depending on the particle, after all particles are assigned to the processor in the latter half of the time step, processing cannot proceed to the next time step until the last particle has been processed. As the simulation ends, the number of idle processors increases, and the time required for the simulation increases accordingly.

本発明の目的は、このような従来の欠点を解除し、各タ
イムステップの後半においても、各プロセッサに仕事を
割り当てることにより、各プロセッサの稼働率を高め、
シミュレーションに要する時間を短縮することにある。
The purpose of the present invention is to eliminate such conventional drawbacks and increase the utilization rate of each processor by allocating work to each processor even in the latter half of each time step.
The aim is to shorten the time required for simulation.

(課題を解決するための手段) 本発明ではシミュレーションを実行するマルチプロセッ
サとして、一つのプロセスの処理をより細かい処理単位
の処理に分割し、1個のプロセスの起動時に複数個のプ
ロセッサを該プロセスに割り当てて、該プロセスの該細
かい処理単位ごとに処理を各プロセッサに分担させるこ
とにより、複数個のプロセッサを用いて、1個のプロセ
スの処理を実行する゛4とを可能にしたマルチプロセッ
サシステムを用いる。
(Means for Solving the Problems) In the present invention, as a multiprocessor that executes simulation, the processing of one process is divided into smaller processing units, and when one process is started, multiple processors are 4. A multiprocessor system that makes it possible to execute the processing of one process using a plurality of processors by allocating the processing to each processor and distributing processing to each processor for each detailed processing unit of the process. Use.

(作用) 本発明では、各タイムステップでm個の粒子をn(n 
< m)台のプロセッサを用いてシミュレーションを実
行する場合、n個の粒子が残るまでは、1個の粒子のシ
ミュレーションに1台のプロセッサを割り当てて、シミ
ュレーションを実行させる。
(Function) In the present invention, m particles are n(n
When executing a simulation using <m) processors, one processor is assigned to the simulation of one particle and the simulation is executed until n particles remain.

1個の粒子の処理が互いに通信し合うk個の処理に分割
できる場合、本システムでは、詠個の粒子が残った時点
以後では一つの粒子のシミュレーションの処理にk個の
プロセッサを割り当てて、それらのプロセッサの間では
細かい処理単位での並列処理を用いて、シミュレーショ
ンを実行する。
If the processing of one particle can be divided into k processes that communicate with each other, then in this system, after the number of particles remaining, k processors are assigned to process the simulation of one particle. The simulation is executed using parallel processing in small processing units between these processors.

一般にはk台のプロセッサを用いて細かい処理の並列性
を活用するとプロセッサ間の同期のオーバヘツドなどの
ために、速度向上はp(1<p<k)になる。
In general, if k processors are used to take advantage of the parallelism of detailed processing, the speed improvement will be p (1<p<k) due to the overhead of synchronization between the processors.

従って、本発明を用いることにより、n台のプロセッサ
を用いて、シミュレーションの対象となるプロセッサの
個数がn個以下になった時点以後で本来なら、仕事の無
いプロセッサが出てくるはずの時点以後でもk(1<k
<n)台のプロセッサを1個の粒子のシミュレーション
に割り当てることにより、仕事の黒いプロセッサの台数
を減少させ、各タイムステップの処理の後半の時間を減
らすことが可能になるという効果が偶られる。
Therefore, by using the present invention, when using n processors, the number of processors to be simulated becomes n or less, and after the point when normally there would be a processor with no work to do, But k(1<k
By assigning <n) processors to the simulation of one particle, the effect is that it is possible to reduce the number of busy processors and reduce the time in the second half of the processing of each time step.

(実施例) 次に第1図から第4図を用いて本発明の実施例について
説明する。
(Example) Next, an example of the present invention will be described using FIGS. 1 to 4.

第1図は本発明で用いるマルチプロセッサの1つの例を
説明するブロック図である。第1図において、マルチプ
ロセッサシステム1はn台のプロセッサ21〜2nと、
これらのプロセッサから読み書き奸能な共有メモリ3か
ら構成される。
FIG. 1 is a block diagram illustrating one example of a multiprocessor used in the present invention. In FIG. 1, a multiprocessor system 1 includes n processors 21 to 2n,
These processors constitute a shared memory 3 that is capable of reading and writing.

第2図は本発明における1個の粒子のシミュレーション
における処理の流れを示している。第2図においては説
明の簡単化のために本発明のk=2の場合を示している
。第2図(a)において、1個の粒子の処理は独立した
処理a5と処理b6並びに処理aと処理bの結果を用い
た処理7から構或される。
FIG. 2 shows the flow of processing in the simulation of one particle in the present invention. In FIG. 2, the case of k=2 of the present invention is shown to simplify the explanation. In FIG. 2(a), the processing of one particle consists of independent processing a5, processing b6, and processing 7 using the results of processing a and processing b.

この粒子のシミュレーションの処理を1台で行うときは
、処理a5を行った後、処理b6を行1,)、その後、
処理aと処理bの結果を用いた処理7を行うと言うこと
を繰り返す。
When performing this particle simulation process with one machine, after performing process a5, process b6 is performed in line 1,), and then,
Processing 7 using the results of processing a and processing b is repeated.

一方この粒子のシミュレーションの処理を2台で行うと
きは、第2図(b)に示すように処理a4を片方のプロ
セッサで、処理b5をもう一方のプロセ・ノサで行い、
処理aと処理bの結果を用いた処理7を片方のプロセツ
ザ(第2図(b)では処理a4を実行したプロセッサ)
で実行させる。この場合、処理b5を実行するプロセッ
サはその処理の後に結果をもう一方のプロセッサに転送
する必要があるため、ブロセ・ノサ間の同期と転送8を
実行する必要がある。同様に、処理aと処理bの結果を
用いた処理7を実行した後にはその結果を処理b5を実
行するプロセ・ノサ【こ転送する必要があるため、プロ
セッサ間の同期と転送8を実行する必要がある。その結
果、プロセ・ノサが暇な時間9が生じるため、2台で処
理を行った場合の処理時間は1台で処理を行った場合の
1/2にはならないが、1台で実行した時の1/p(1
<p<2)にはなる。
On the other hand, when processing this particle simulation using two processors, processing a4 is performed by one processor and processing b5 is performed by the other processor, as shown in FIG. 2(b).
Processing 7 using the results of processing a and processing b is executed by one of the processors (in Fig. 2 (b), the processor that executed processing a4)
Run it with In this case, since the processor executing process b5 needs to transfer the result to the other processor after the process, it is necessary to perform synchronization and transfer 8 between Broce and Nosa. Similarly, after executing process 7 using the results of processes a and b, the results must be transferred to a processor that executes process b5. There is a need. As a result, there will be idle time9 for the processor, so the processing time when processing with two machines will not be 1/2 of the time when processing with one machine, but when it is executed with one machine. 1/p(1
<p<2).

第3図は、本発明において、1タイムステップのシミュ
レーション時において、各プロセッサを粒子のシミュレ
ーションに割り嘉てるアルゴリズムを示したものである
FIG. 3 shows an algorithm for allocating each processor to particle simulation during one time step simulation in the present invention.

第3図において、全プロセッサの台数がnで、1粒子の
処理を独立したk個の処理からなるとした時、シミュレ
ーションの対象として残っている粒子の個数が硫以上か
否かの判定を行い(第3図81)、詠以上の時は、次に
暇なプロセッサが存在するか否かを判定(第3図82)
シ、存在すれば、1台のプロセッサで、1個の粒子のシ
ミュレーションを実行させ(第3図84)、存在しない
場合には待機した後、再度S2を試みる。
In Figure 3, when the total number of processors is n and the processing of one particle consists of k independent processes, it is determined whether the number of particles remaining as simulation targets is greater than or equal to sulfur ( 81 in Fig. 3), if the number is higher than that, it is determined whether there is a next free processor (82 in Fig. 3).
If the particle exists, one processor executes the simulation of one particle (FIG. 3 84), and if the particle does not exist, waits and then tries S2 again.

シミュレーションの対象として残っている粒子の個数が
n/k以下になると、暇なプロセッサがk台存在するま
で待ち、(第3図86)、その時点でk台のプロセッサ
I゛こ、1個の粒子のシミュレーションを実行させる。
When the number of particles remaining as simulation targets becomes n/k or less, it waits until there are k free processors (Fig. 3, 86), and at that point, k processors Run particle simulation.

(第3図87)。(Figure 3 87).

第4図(a)、(b)は各々5個の粒子のシミュレーシ
ョンを3台のプロセッサ(n=3)で、独立な処理が2
(k=2)の時の1タイムステップの処理を従来の処理
方式と本発明の方式について、模式的に示したものであ
る。
Figures 4 (a) and (b) each simulate 5 particles using 3 processors (n = 3), with 2 independent processes.
12 schematically shows the processing of one time step when (k=2) for the conventional processing method and the method of the present invention.

第4図において、従来の処理方式においては各粒子#1
〜7l!5に関して、1台のプロセッサによるシミュレ
ーションが実行され、その後共通処理が実行される。そ
のため、プロセッサの暇な時間が生じている。
In Fig. 4, in the conventional processing method, each particle #1
~7l! Regarding No. 5, a simulation is performed by one processor, and then common processing is performed. This results in processor idle time.

一方本発明の方式においては、n/k = 1.5のた
め、粒子#1〜#4のシミュレーションの処理において
は、1台のプロセッサによるシミュレーション4が実行
され、粒子#5の処理が2台でシミュレーションが実行
される。
On the other hand, in the method of the present invention, since n/k = 1.5, in the simulation processing of particles #1 to #4, simulation 4 is executed by one processor, and the processing of particle #5 is executed by two processors. The simulation is performed.

この結果、1タイムステップの処理を従来の処理方式と
本発明の方式で較べると、本発明の処理方式の方が処理
時間が短縮されていることがわかる。
As a result, when comparing the processing of one time step between the conventional processing method and the method of the present invention, it can be seen that the processing time of the processing method of the present invention is shorter.

(発明の効果) 以上説明したように、本発明ではn台のプロセッサを用
いて、シミュレーションの対象となるプロセッサの個数
が銚個以下になった時点以後で本来なら、仕事の無いプ
ロセッサが出てくるはずの時点以後でもk(1<k<n
)台のプロセッサを1個の粒子のシミュレーションに割
り当てることにより、仕事の蝿いプロセッサの台数を減
少させ、各タイムステップの処理の後半の時間を減らす
ことが可能になるという効果が得られる。
(Effects of the Invention) As explained above, in the present invention, by using n processors, after the number of processors to be simulated becomes less than 1, there are processors that have no work to do. Even after the time when k (1<k<n
) Assigning processors to the simulation of one particle has the effect of reducing the number of busy processors and reducing the time in the latter half of the processing of each time step.

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

第1図は本発明で用いるマルチプロセッサシステムの図
、第2図(a)、(b)は1個の粒子のシミュレーショ
ンにおける処理の流れを示す模式図、第3図は、本発明
における1タイムステップのシミュレーション時の各プ
ロセッサを粒子のシミュレーションに割り当てるアルゴ
リズムを示した図、第4図は5個の粒子のシミュレーシ
ョンを3台のプロセッサ(n=3)で、独立な処理が2
(k=2)の時の1タイムステップの処理を従来の処理
方式と本発明の方式についてね模式的に示した図、であ
る。 1...マルチプロセッサシステム、21〜2n・・・
プロセッサ、3・・・共有メモリ。
Figure 1 is a diagram of the multiprocessor system used in the present invention, Figures 2 (a) and (b) are schematic diagrams showing the flow of processing in the simulation of one particle, and Figure 3 is a diagram of the 1-time process in the present invention. Figure 4 shows an algorithm that assigns each processor to particle simulation during step simulation.
FIG. 2 is a diagram schematically showing processing of one time step when (k=2) for a conventional processing method and a method according to the present invention. 1. .. .. Multiprocessor system, 21~2n...
Processor, 3... shared memory.

Claims (1)

【特許請求の範囲】  m(m>0)個のシミュレーションの対象となる粒子
のシミュレーションを時間のきざみ(タイムステップ)
単位に実行しては、前記各粒子のシミュレーションの結
果を集計し、次の時間のシミュレーションを実行するシ
ミュレーションシステムで、1個の前記粒子のシミュレ
ーション処理がk(1<k)個の互いに通信する処理に
よって、構成される様なシミュレーションシステムにお
いて、複数の並列動作するプロセスが作動するシステム
で、一つのプロセスの処理をより細かい処理単位の処理
に分割し、前記プロセスの起動時に複数個のプロセッサ
を該プロセスに割り当てて、該プロセスの該細かい処理
単位ごとに処理を分担させることにより、複数個のプロ
セッサを用いて処理を実行することを可能にしたマルチ
プロセッサシステムを用いて、 前記特定の時間のシミュレーションに於て、前記シミュ
レーションの対象となる粒子の個数がn個以上の時は、
1個のプロセッサを1個の前記粒子のシミュレーション
に割り当てて、前記特定時間のシミュレーションが続行
し前記シミュレーションの対象となる粒子の個数がn/
k個以下になった後は、複数個のプロセッサを1個の前
記粒子のシミュレーションに割り当てることを特徴とし
た、シミュレーション方式。
[Claims] The simulation of m (m>0) particles to be simulated is performed in time increments (time steps).
In a simulation system that is executed unit by unit, the simulation results of each particle are aggregated and the simulation is executed for the next time, and the simulation process of one particle communicates with k (1<k) each other. In a simulation system that is configured based on processing, in which multiple processes operate in parallel, the processing of one process is divided into smaller processing units, and multiple processors are activated when the process is started. Using a multiprocessor system that makes it possible to execute processing using a plurality of processors by assigning the process to each of the detailed processing units of the process, In the simulation, when the number of particles targeted for the simulation is n or more,
One processor is assigned to the simulation of one particle, the simulation continues for the specific time, and the number of particles targeted for the simulation is n/
A simulation method characterized in that, after the number of particles becomes k or less, a plurality of processors are assigned to simulation of one particle.
JP18305089A 1989-07-14 1989-07-14 Simulation system Pending JPH0348361A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18305089A JPH0348361A (en) 1989-07-14 1989-07-14 Simulation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18305089A JPH0348361A (en) 1989-07-14 1989-07-14 Simulation system

Publications (1)

Publication Number Publication Date
JPH0348361A true JPH0348361A (en) 1991-03-01

Family

ID=16128864

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18305089A Pending JPH0348361A (en) 1989-07-14 1989-07-14 Simulation system

Country Status (1)

Country Link
JP (1) JPH0348361A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8612981B2 (en) 2006-11-07 2013-12-17 Sony Corporation Task distribution method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8612981B2 (en) 2006-11-07 2013-12-17 Sony Corporation Task distribution method

Similar Documents

Publication Publication Date Title
CN104834561B (en) A kind of data processing method and device
TWI614682B (en) Efficient work execution in a parallel computing system
EP1381939B1 (en) Registers for data transfers within a multithreaded processor
Nukada et al. Scalable multi-gpu 3-d fft for tsubame 2.0 supercomputer
US20070180161A1 (en) DMA transfer apparatus
US20170286168A1 (en) Balancing thread groups
Huo et al. Porting irregular reductions on heterogeneous CPU-GPU configurations
CN111767121B (en) Operation method, device and related product
Binet et al. Multicore in production: Advantages and limits of the multiprocess approach in the ATLAS experiment
JPH0348361A (en) Simulation system
JP6790854B2 (en) Processing equipment
US11574087B2 (en) Multi-processor simulation on a multi-core machine
US11640302B2 (en) SMID processing unit performing concurrent load/store and ALU operations
JPH0268651A (en) Parallel processing system for repeat control structure
US7899995B1 (en) Apparatus, system, and method for dependent computations of streaming multiprocessors
Kitai et al. Distributed storage control unit for the Hitachi S-3800 multivector supercomputer
US20240311199A1 (en) Software-defined compute unit resource allocation mode
CN118012631B (en) Operator execution method, processing device, storage medium and program product
JPS6049464A (en) Inter-processor communication system of multi-processor computer
JPH03184176A (en) Logical simulation system
CN118708533A (en) K8 s-oriented multi-machine multi-card GPU optimal communication scheduling method and system
CN102855206A (en) Data flow and interaction between data flow and control flow
CN118689658A (en) Computing device, method of performing computing tasks in a computing device, computer-readable storage medium, and computer program product
CN116627887A (en) Method and chip for processing graph data
JPS61234440A (en) Parallel logic simulation machine