JP5874155B2 - Particle contact determination calculation method, particle contact determination calculation apparatus, and computer program - Google Patents

Particle contact determination calculation method, particle contact determination calculation apparatus, and computer program Download PDF

Info

Publication number
JP5874155B2
JP5874155B2 JP2013253717A JP2013253717A JP5874155B2 JP 5874155 B2 JP5874155 B2 JP 5874155B2 JP 2013253717 A JP2013253717 A JP 2013253717A JP 2013253717 A JP2013253717 A JP 2013253717A JP 5874155 B2 JP5874155 B2 JP 5874155B2
Authority
JP
Japan
Prior art keywords
contact determination
lattice
calculation
particle
parallel
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.)
Active
Application number
JP2013253717A
Other languages
Japanese (ja)
Other versions
JP2015114674A (en
Inventor
宏 竹田
宏 竹田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
R-FLOW CO., LTD.
Original Assignee
R-FLOW CO., 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 R-FLOW CO., LTD. filed Critical R-FLOW CO., LTD.
Priority to JP2013253717A priority Critical patent/JP5874155B2/en
Publication of JP2015114674A publication Critical patent/JP2015114674A/en
Application granted granted Critical
Publication of JP5874155B2 publication Critical patent/JP5874155B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Complex Calculations (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Description

本発明は、粒子の接触判定計算方法、粒子の接触判定計算装置、及びコンピュータプログラムにかかり、特に、所定の解析対象領域において接触判定格子を用いて行う、粒子の接触判定計算方法、粒子の接触判定計算装置、及びコンピュータプログラムに関する。   The present invention relates to a particle contact determination calculation method, a particle contact determination calculation apparatus, and a computer program, and in particular, a particle contact determination calculation method and a particle contact performed using a contact determination grid in a predetermined analysis target region. The present invention relates to a determination calculation device and a computer program.

粉体計算やMPS(Moving Particle Semi-implicit)法による接触を考慮した粒子解析において、粒子接触判定計算は、全体の時間の多くを占めると言われており、高速化が必須な処理である。特に近年の計算機においては、ノード内に8スレッド以上の並列実行可能なCPUが普及している。したがって、並列化による高速化が課題となっている。   In particle analysis that considers contact by powder calculation or MPS (Moving Particle Semi-implicit) method, particle contact determination calculation is said to occupy much of the entire time, and speeding up is an essential process. Particularly in recent computers, CPUs capable of parallel execution of 8 threads or more are widely used in nodes. Therefore, speeding up by parallelization is an issue.

従来、粒子接触判定計算においては、接触判定計算の計算量を減らす方法が使われてきた。接触判定計算を全粒子について行うのではなく、接触する可能性のある近傍の粒子についてのみ物理量の計算を行う。この近傍の粒子を絞り込むために、接触判定格子を用いる方法がある(例えば、非特許文献1参照)。また、キャッシュを有効利用することで並列化時の台数効果を上げるため、粒子に番号を振ったうえで、粒子を接触判定時の演算が局所化するように並び替える方法が知られている(例えば、非特許文献2参照)。   Conventionally, in the particle contact determination calculation, a method of reducing the calculation amount of the contact determination calculation has been used. The contact determination calculation is not performed for all particles, but the physical quantity is calculated only for neighboring particles that may come into contact. In order to narrow down the particles in the vicinity, there is a method using a contact determination grid (for example, see Non-Patent Document 1). In addition, in order to increase the number effect at the time of parallelization by effectively using the cache, a method of rearranging the particles so that the computation at the time of contact determination is localized after numbering the particles is known ( For example, refer nonpatent literature 2).

酒井幹夫編著:粉体の数値シミュレーション,丸善出版 (2012)Edited by Mikio Sakai: Numerical simulation of powder, Maruzen Publishing (2012) 西浦泰介,阪口秀:GPUを用いたDEMの高速化アルゴリズム, Transactions ofJSCES, paper No.20100007 (2010)Taisuke Nishiura, Shu Sakaguchi: DEM acceleration algorithm using GPU, Transactions of JSCES, paper No.20100007 (2010)

ところで、粉体計算で用いられる離散要素法(Discrete Element Method:DEM)で必要となる、接触する各粒子に働く接触力の足しこみ計算において、従来は、作用−反作用の法則を用いて演算量の削減を行っている。この従来法をスレッド並列化する際、接触する相手の情報も同時に更新することになるが、この操作は他スレッドが更新する情報の書き換えにほかならない。したがって、複数のスレッド間でデータの読み書きが競合し、排他制御が必要となる。この排他制御はOpenMPを利用する場合、critical指示文やatomic指示子を入れるのが普通である(例えば、非特許文献1参照)。   By the way, in the calculation of the addition of the contact force acting on each contacting particle, which is necessary in the discrete element method (DEM) used in powder calculation, conventionally, the amount of computation is calculated using the law of action-reaction. Reduction. When this conventional method is thread-parallelized, information on the contact partner is also updated at the same time, but this operation is nothing but rewriting of information updated by other threads. Therefore, data read / write conflicts among a plurality of threads, and exclusive control is required. In this exclusive control, when OpenMP is used, it is usual to insert a critical directive or an atomic directive (see, for example, Non-Patent Document 1).

一方、critical指示文等を入れない並列化では、接触時に相手の情報を更新しない方法により排他制御を回避してきた。しかしこの方法は、critical指示文を入れる方法に対して、約2倍の演算量の増大になる。つまり、排他制御する方法では演算量が1/2になるメリットがある反面、排他制御によるスレッド並列化のオーバーヘッドが生じる。一方で、排他制御がない方法では演算量が増える反面、スレッド並列化時のオーバーヘッドが少ない。つまり、両者は欠点と利点があり、状況に応じて最適な方法が異なる。   On the other hand, in parallel processing without inserting a critical directive or the like, exclusive control has been avoided by a method that does not update the partner's information at the time of contact. However, this method increases the amount of computation by about twice as much as the method of inserting a critical directive. In other words, the exclusive control method has an advantage that the amount of calculation is halved, but an overhead of thread parallelization by exclusive control occurs. On the other hand, in the method without exclusive control, the amount of computation increases, but the overhead at the time of thread parallelization is small. That is, both have drawbacks and advantages, and the optimum method differs depending on the situation.

そこで本発明は、このような問題に鑑みてなされたもので、その目的とするところは、接触判定計算において更なる高速化を図ることの可能な、粒子の接触判定計算方法、粒子の接触判定計算装置、及びコンピュータプログラムを提供することにある。   Therefore, the present invention has been made in view of such problems, and the object of the present invention is to provide a particle contact determination calculation method and a particle contact determination capable of further speeding up the contact determination calculation. A computer apparatus and a computer program are provided.

上記課題を解決するために、本発明によれば、以下のような粒子の接触判定計算方法、粒子の接触判定計算装置、及びコンピュータプログラムが提供される。   In order to solve the above problems, according to the present invention, there are provided the following particle contact determination calculation method, particle contact determination calculation apparatus, and computer program.

本発明の粒子の接触判定計算方法は、3次元の解析対象領域において接触判定格子を用いて接触判定計算装置が行う粒子の接触判定計算方法であって、前記接触判定計算装置は、粒子の接触判定計算を行う接触判定計算部を備え、前記接触判定計算部は、格子番号が(2i−1,2i−1,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、格子番号が(2i,2i−1,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、格子番号が(2i−1,2i,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、格子番号が(2i,2i,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、格子番号が(2i−1,2i−1,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、格子番号が(2i,2i−1,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、格子番号が(2i−1,2i,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、格子番号が(2i,2i,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、を所定の順序で繰り返し行う(iは以上の整数)ことを特徴とする。 Contact determination calculation method of the particles of the present invention is a contact determination calculation method of the particles contact determination computing device performs using a contact determination lattice in the three-dimensional analysis target area, the contact determination computing device, the contact of the particles A contact determination calculation unit that performs determination calculation, and the contact determination calculation unit performs in parallel the particle contact determination calculation in the contact determination lattice having the lattice number (2i-1, 2i-1, 2i-1). And a step of performing the particle contact determination calculation in the contact determination lattice with the lattice number (2i, 2i-1, 2i-1) in parallel, and the lattice number (2i-1, 2i, 2i-1) The step of performing the contact determination calculation of the particles in the contact determination lattice in parallel, the step of performing the contact determination calculation of the particles in the contact determination lattice of the number (2i, 2i, 2i-1) in parallel, and the lattice number of ( 2i-1, The step of performing the contact determination calculation of the particles in the contact determination grid of number i-1, 2i) in parallel and the contact determination calculation of the particles in the contact determination lattice of the number (2i, 2i-1, 2i) in parallel A step of performing in parallel a particle contact determination calculation in a contact determination grid having a grid number of (2i-1, 2i, 2i) and a contact determination grid having a grid number of (2i, 2i, 2i) The step of performing the particle contact determination calculation in parallel is repeatedly performed in a predetermined order (i is an integer of 1 or more).

本発明の他の粒子の接触判定計算方法は、1次元の解析対象領域において接触判定格子を用いて行う粒子の接触判定計算方法であって、格子番号が奇数番の接触判定格子における粒子の接触判定計算を並列に行うステップと、格子番号が偶数番の接触判定格子における粒子の接触判定計算を並列に行うステップと、を交互に行うことを特徴とする。   Another particle contact determination calculation method of the present invention is a particle contact determination calculation method performed using a contact determination grid in a one-dimensional analysis target region, and the particle contact in an odd-numbered contact determination grid The step of performing the determination calculation in parallel and the step of performing the contact determination calculation of the particles in the contact determination lattice having an even number of lattice numbers in parallel are alternately performed.

また、本発明の他の粒子の接触判定計算方法は、2次元の解析対象領域において接触判定格子を用いて行う粒子の接触判定計算方法であって、格子番号が(2i−1,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、格子番号が(2i,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、格子番号が(2i−1,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、格子番号が(2i,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、を所定の順序で繰り返し行う(iは以上の整数)ことを特徴とする。 Another particle contact determination calculation method of the present invention is a particle contact determination calculation method performed using a contact determination grid in a two-dimensional analysis target region, and the grid number is (2i-1, 2i-1). The step of performing the contact determination calculation of the particles in the contact determination lattice of No.), the step of performing the contact determination calculation of the particles in the contact determination lattice of the number (2i, 2i-1) in parallel, and the lattice number of A step of performing in parallel the particle contact determination calculation in the (2i-1, 2i) contact determination lattice, and a step of performing in parallel the particle contact determination calculation in the contact determination lattice of the number (2i, 2i). Are repeatedly performed in a predetermined order (i is an integer of 1 or more).

また、本発明の他の粒子の接触判定計算方法は、n次元(nは1以上の整数)の解析対象領域において接触判定格子を用いて行う粒子の接触判定計算方法であって、前記接触判定格子を、2個の格子からなる単位格子にグループ分けし、前記各単位格子において、前記単位格子内の同じ位置の格子に同じ値を付与することで、前記単位格子内の2個の格子に1〜2の値を付与し、同じ値の格子における粒子の接触判定計算を並列に行うステップを、所定の順序で繰り返し行うことを特徴とする。 Another particle contact determination calculation method of the present invention is a particle contact determination calculation method performed using a contact determination grid in an n-dimensional (n is an integer of 1 or more) analysis target region. The lattices are grouped into unit lattices composed of 2 n lattices, and in each unit lattice, the same value is given to lattices at the same positions in the unit lattices, so that 2 n pieces in the unit lattices are given. The step of assigning a value of 1 to 2 n to the lattice and performing the contact determination calculation of the particles in the lattice having the same value in parallel is repeatedly performed in a predetermined order.

また、本発明にかかる粒子の接触判定計算装置は、粒子の接触判定計算を行う接触判定計算部を備え、接触判定計算部は、上述した粒子の接触判定計算方法と同様の技術的特徴を有する。   The particle contact determination calculation apparatus according to the present invention includes a contact determination calculation unit that performs particle contact determination calculation, and the contact determination calculation unit has the same technical characteristics as the particle contact determination calculation method described above. .

また、本発明にかかるコンピュータプログラムは、コンピュータを、上記粒子の接触判定計算装置として機能させるためのコンピュータプログラムである。   Moreover, the computer program concerning this invention is a computer program for functioning a computer as said particle | grain contact determination calculation apparatus.

本発明によれば、接触判定格子を、粒子が接触しないようにグループ化した上で並列計算を行うことができる。このため、接触する相手の情報も同時に更新する、いわゆる作用−反作用の法則を用いて演算量の削減を行うことができる。このような並列計算を行うことで、演算量はcritical指示文による方法と同じく1/2にしつつも、排他制御を必要としない。このようにして、接触判定計算において更なる高速化を図ることが可能である。   According to the present invention, it is possible to perform parallel calculation after grouping contact determination grids so that particles do not contact. For this reason, it is possible to reduce the amount of calculation by using a so-called action-reaction law that simultaneously updates information on the contact partner. By performing such parallel calculation, the computation amount is halved as in the method using the critical directive, but exclusive control is not required. In this way, it is possible to further speed up the contact determination calculation.

本発明の基本的な技術的特徴は、上述したように、接触判定格子を、粒子が接触しないようにグループ化した上で並列計算を行うことである。このことは、接触判定格子を複数のカラーに色分けすることとしてイメージすることができる。そこで、本明細書において、本発明の粒子の接触判定計算方法を「マルチカラー接触判定法」とも称する。また、このマルチカラー接触判定法で用いる接触判定格子のことを、「マルチカラー接触判定格子」とも称する。   As described above, the basic technical feature of the present invention is to perform parallel calculation after grouping the contact determination grids so that the particles do not contact each other. This can be imagined as color-coding the contact determination grid into a plurality of colors. Therefore, in the present specification, the particle contact determination calculation method of the present invention is also referred to as “multi-color contact determination method”. The contact determination grid used in the multicolor contact determination method is also referred to as “multicolor contact determination grid”.

本発明によれば、作用−反作用の法則を用いて演算量の削減を行いつつも、排他制御を必要としない。このようにして、接触判定計算において更なる高速化を図ることが可能である。本発明のその他の効果については、以下の発明を実施するための形態の項でも説明する。   According to the present invention, the amount of calculation is reduced using the action-reaction law, but exclusive control is not required. In this way, it is possible to further speed up the contact determination calculation. The other effects of the present invention will be described in the section for carrying out the invention below.

接触判定格子のイメージを示す図である。It is a figure which shows the image of a contact determination grid | lattice. 1次元のマルチカラー接触判定格子を概念的に示す図である。It is a figure which shows notionally a one-dimensional multi-color contact determination grid. マルチカラー接触判定法のプログラムを示す図である。It is a figure which shows the program of the multi-color contact determination method. 1次元のマルチカラー接触判定法の流れを示す図である。It is a figure which shows the flow of the one-dimensional multi-color contact determination method. 2次元のマルチカラー接触判定格子を概念的に示す図である。It is a figure which shows notionally a two-dimensional multi-color contact determination grid. 2次元のマルチカラー接触判定法の流れを示す図である。It is a figure which shows the flow of the two-dimensional multi-color contact determination method. 3次元のマルチカラー接触判定格子を概念的に示す図である。It is a figure which shows notionally a three-dimensional multi-color contact determination grid. 3次元のマルチカラー接触判定法の流れを示す図である。It is a figure which shows the flow of the three-dimensional multi-color contact determination method. 本実施形態の方法(Method3)と従来法(Method1、Method2)との効果の比較を示す図である。It is a figure which shows the comparison of the effect of the method (Method3) of this embodiment, and the conventional method (Method1, Method2).

以下に添付図面を参照しながら、本発明の好適な実施の形態について詳細に説明する。さらに、従来の方法と本実施形態にかかるマルチカラー接触判定法とのスレッド並列実行性能を比較することで、マルチカラー接触判定法の有効性を検証する。なお、本明細書及び図面において、実質的に同一の機能構成を有する構成要素については、同一の符号を付することにより重複説明を省略する。   Exemplary embodiments of the present invention will be described below in detail with reference to the accompanying drawings. Furthermore, the effectiveness of the multi-color contact determination method is verified by comparing the thread parallel execution performance of the conventional method and the multi-color contact determination method according to the present embodiment. In addition, in this specification and drawing, about the component which has the substantially same function structure, duplication description is abbreviate | omitted by attaching | subjecting the same code | symbol.

まず、本実施形態の前提となる接触判定計算について説明する。   First, the contact determination calculation which is a premise of the present embodiment will be described.

はじめに、粒子を登録する。ここでは一例として、疑似乱数(以下、単に乱数ともいう)で発生させて粒子を登録する。次に粒子番号の並び替えを行う。本実施形態では、解析対象となる領域(例えば、3次元領域)に任意の数だけ粒子を発生させる。粒子の位置は、乱数で決められる。そして、各粒子について接触判定計算を行う。この接触判定計算には、接触する可能性のある粒子を判定するために、以下に述べる接触判定格子を用いる。   First, register the particles. Here, as an example, particles are registered by generating pseudo-random numbers (hereinafter also simply referred to as random numbers). Next, the particle numbers are rearranged. In the present embodiment, an arbitrary number of particles are generated in a region to be analyzed (for example, a three-dimensional region). The position of the particle is determined by a random number. And contact determination calculation is performed about each particle | grain. In this contact determination calculation, a contact determination grid described below is used to determine particles that may come into contact.

図1は、接触判定格子のイメージを示す図である。図1に示したように、解析対象領域を格子状に分割する。その後、格子100内に入っているすべての粒子110を、対応する判定格子上に登録する。格子幅を粒子直径と同じかそれ以上にすることにより、接触する可能性のある粒子を同一格子内と隣接格子内に存在する粒子に限定することができるため、計算量を減らすことができる。なお、格子幅は、粒子直径以上であれば、必ずしも粒子直径と同じでなくてもよい。   FIG. 1 is a diagram illustrating an image of a contact determination grid. As shown in FIG. 1, the analysis target area is divided into a grid. Thereafter, all particles 110 contained in the lattice 100 are registered on the corresponding determination lattice. By setting the lattice width to be equal to or larger than the particle diameter, it is possible to limit the particles that may come into contact to the particles existing in the same lattice and in the adjacent lattice, and thus the amount of calculation can be reduced. The lattice width is not necessarily the same as the particle diameter as long as it is equal to or larger than the particle diameter.

接触する粒子に対する接触力を更新する際、自分自身の情報だけでなく、相手の情報も同時に更新する。このとき、右隣り(又は上隣りなど)の格子のみの粒子と接触判定を行う。これは、作用−反作用の法則を用いて演算量を1/2に削減するための処理である。   When updating the contact force for the contacting particles, not only the information of itself but also the information of the other party is updated at the same time. At this time, contact determination is performed with particles on only the right adjacent (or upper adjacent) lattice. This is a process for reducing the amount of calculation to ½ using the action-reaction law.

この処理について、OpenMP並列化することを考える。このとき、例えば粒子番号0番と粒子番号1番の粒子が、同一格子内にあるとする。また、粒子番号0番の粒子はスレッド0、粒子番号1番の粒子はスレッド1で処理されるとする。このとき、スレッド0において更新を行っている最中に、スレッド1において更新を行う状況がありうる。すなわち、スレッド0とスレッド1の間で、同時に値を更新しようとするタイミングがありうる。この状態では、スレッド0もしくはスレッド1の結果のみが反映され、逐次の結果と一致しなくなる。したがって、この処理は、排他制御が必要である。以下、衝突判定計算において、スレッド間で値を同時に書き込むことを「競合」と呼ぶことにする。   For this processing, consider OpenMP parallelization. At this time, for example, it is assumed that the particles of particle number 0 and particle number 1 are in the same lattice. Further, it is assumed that the particle number 0 is processed by the thread 0 and the particle number 1 is processed by the thread 1. At this time, there may be a situation where the update is performed in the thread 1 while the update is performed in the thread 0. That is, there may be a timing between the thread 0 and the thread 1 to update the value at the same time. In this state, only the result of thread 0 or thread 1 is reflected and does not match the sequential result. Therefore, this process requires exclusive control. Hereinafter, in the collision determination calculation, simultaneous writing of values between threads is referred to as “contention”.

従来、競合を回避するには、OpenMPで提供されるcritical指示子を用いたディレクティブであるcritical指示文やatomic文により、排他制御を行うことで競合の問題を制御してきた(例えば、非特許文献1を参照)。また、critical指示文を使わない方法として、接触時に相手の情報を更新しないようにすることで、競合を回避してきた。ただしこの方法では、接触力計算に関して冗長計算を行うことから、演算量が2倍に増加する。なお、本明細書において、作用−反作用の原理を利用せずに接触時に相手の情報を更新しない接触力計算のことを、「冗長計算」と称する。   Conventionally, in order to avoid a conflict, the conflict problem has been controlled by performing exclusive control using a critical directive or an atomic statement that is a directive using a critical indicator provided by OpenMP (for example, non-patent literature). 1). In addition, as a method that does not use critical directives, conflicts have been avoided by not updating the other party's information at the time of contact. However, in this method, since the redundant calculation is performed with respect to the contact force calculation, the calculation amount is doubled. In the present specification, contact force calculation that does not use the action-reaction principle and does not update the partner's information at the time of contact is referred to as “redundant calculation”.

以上のような問題を解消する方法として、以下、本実施形態にかかるマルチカラー接触判定法について、詳細に説明する。   As a method for solving the above problems, the multi-color contact determination method according to the present embodiment will be described in detail below.

マルチカラー接触判定法は、マルチカラー接触判定格子を用いた接触判定計算の方法である。マルチカラー接触判定格子とは、従来の接触判定計算に用いる接触判定格子を用いるが、接触判定計算のためのアクセスの仕方が異なる接触判定格子のことである。以下ではまず、1次元の場合における例を示すことで、マルチカラー接触判定法のアルゴリズムを説明する。   The multi-color contact determination method is a contact determination calculation method using a multi-color contact determination grid. The multi-color contact determination grid is a contact determination grid that uses a contact determination grid used in conventional contact determination calculation, but has a different access method for the contact determination calculation. Hereinafter, the algorithm of the multi-color contact determination method will be described first by showing an example in a one-dimensional case.

(1)1次元の解析対象領域
図2は、1次元のマルチカラー接触判定格子を概念的に示す図である。図2(a)は、接触判定格子の格子番号を示し、図2(b)は、マルチカラー接触判定格子を示し、図2(c)は、マルチカラーを付すための単位格子を示す。なお、本実施形態のマルチカラー接触判定法の適用の前提は、接触格子の格子幅を粒子直径、あるいはそれ以上に取ることである。また、接触判定格子を用いた接触判定計算には、格子番号ごとに並列計算する方法(格子並列)と、粒子番号ごとに計算する方法(粒子並列)が知られているが、本実施形態では、格子並列を前提とする。すなわち、一つの接触格子内に存在する粒子の接触判定計算は同一のスレッドで行う。
(1) One-dimensional analysis target region FIG. 2 is a diagram conceptually showing a one-dimensional multi-color contact determination grid. FIG. 2A shows the grid number of the contact determination grid, FIG. 2B shows the multi-color contact determination grid, and FIG. 2C shows the unit grid for attaching the multi-color. In addition, the premise of application of the multi-color contact determination method of this embodiment is to take the lattice width of the contact lattice to the particle diameter or more. Moreover, in the contact determination calculation using the contact determination grid, a method of calculating in parallel for each grid number (lattice parallel) and a method of calculating for each particle number (particle parallel) are known. Assuming grid parallel. That is, the contact determination calculation of particles existing in one contact lattice is performed by the same thread.

OpenMP並列化を考慮すると、接触判定格子の性質上、対象格子番号xの両隣格子である、格子番号(x−1)と格子番号(x+1)には依存関係があるが、それ以外の格子には依存関係がない。1次元の場合にこれを一般化すると、格子番号が奇数番の接触判定格子どうしには依存関係がなく、また、格子番号が偶数番の接触判定格子どうしには依存関係がない。ここで、依存関係がないとは、データの競合が起き得ないために並列実行が可能であることをいい、依存関係があるとは、データ競合が起き得るために並列実行ができないことをいう。   Considering OpenMP parallelization, due to the nature of the contact determination grid, there are dependencies between the grid number (x−1) and the grid number (x + 1), which are both adjacent grids of the target grid number x. Has no dependencies. If this is generalized in the one-dimensional case, there is no dependency between the contact determination grids with odd-numbered grid numbers, and there is no dependency between the contact determination grids with even-numbered grid numbers. Here, when there is no dependency, it means that parallel execution is possible because there is no data contention, and when there is a dependency, it means that parallel execution is not possible because data contention can occur. .

そこで、図2(b)に示したマルチカラー接触判定格子を採用する。図2(b)に示したように、並列実行が可能である奇数番の格子番号x(x=1、3、5、7、9、・・・)に対して、値“1”を付与する。また、並列実行が可能である偶数番の格子番号x(x=2、4、6、8、・・・)に対して、値“2”を付与する。この値“1”と値“2”は、接触判定格子を2色(2色)のカラーで色分けすることを意味する。このようにしてマルチカラー接触判定格子を定義することができる。なお、値“1”と値“2”は、単に両者を区別するものに過ぎず、番号自体に特別の意味はない。奇数番の格子に対して値“2”を付与し、偶数番の格子に対して値“1”を付与してもよいことは言うまでもない。 Therefore, the multi-color contact determination grid shown in FIG. As shown in FIG. 2B, a value “1” is assigned to an odd-numbered lattice number x (x = 1, 3, 5, 7, 9,...) That can be executed in parallel. To do. A value “2” is assigned to even-numbered grid numbers x (x = 2, 4, 6, 8,...) That can be executed in parallel. The value "1" to the value "2" means that the color-coded collision detection grating color two-color (2 1-color). In this way, a multi-color contact determination grid can be defined. It should be noted that the value “1” and the value “2” merely distinguish the two, and the number itself has no special meaning. It goes without saying that the value “2” may be assigned to the odd-numbered lattice and the value “1” may be assigned to the even-numbered lattice.

接触判定格子への値の付与の仕方として、次のように考えることもできる。まず、図2(a)の接触判定格子を2個(2個)ずつの単位格子(1次元単位格子)にグループ分けする。図2(c)は、1次元単位格子を示す(iは1以上の整数)。そして、各1次元単位格子に対して、単位格子内の同じ位置の格子に同じ値を付与する。図2(c)の一例では、1次元単位格子の左位置(格子番号2i−1)の格子に対して値“1”が付与されている。また、右位置(格子番号2i)の格子に対して値“2”が付与されている。これをすべての1次元単位格子に対して行う。このようにして、図2(b)に示したマルチカラー接触判定格子を定義することができる。 As a method of assigning a value to the contact determination grid, it can be considered as follows. First, grouped in Figure 2 two contact determination lattice (a) (2 1 pieces) each unit cell of the (1-dimensional unit cell). FIG. 2C shows a one-dimensional unit cell (i is an integer of 1 or more). For each one-dimensional unit cell, the same value is assigned to the lattice at the same position in the unit cell. In the example of FIG. 2C, the value “1” is assigned to the lattice at the left position (lattice number 2i−1) of the one-dimensional unit lattice. The value “2” is assigned to the lattice at the right position (lattice number 2i). This is performed for all one-dimensional unit cells. In this way, the multi-color contact determination grid shown in FIG. 2B can be defined.

以上のように番号付けされたマルチカラー接触判定格子を用いた、粒子の接触判定計算方法について、図3及び図4を参照しながら説明する。図3は、マルチカラー接触判定法のプログラムを示す図である。ここでは1次元であるため、n=1であり、MAX_COLOR=2=2である。図4に示したように、まず、値“1”が付与された格子の接触判定計算を並列に行う(ステップS102)。その後、値“2”が付与された格子の接触判定を行う(ステップS104)。この接触判定を必要に応じて繰り返し行う。例えば、個々の粒子の位置と速度を小さな時間刻み巾(ΔT)でもって、少しずつ更新するような粉体解析の場合には、各時間ステップにおいて、粒子の接触判定を行い、接触している粒子に対しては接触力を求めるようにしてもよい。 A particle contact determination calculation method using the multi-color contact determination grids numbered as described above will be described with reference to FIGS. FIG. 3 is a diagram showing a program for the multi-color contact determination method. Here, since it is one-dimensional, n = 1 and MAX_COLOR = 2 1 = 2. As shown in FIG. 4, first, the contact determination calculation of the lattice to which the value “1” is assigned is performed in parallel (step S102). Thereafter, the contact determination of the grid with the value “2” is performed (step S104). This contact determination is repeated as necessary. For example, in the case of powder analysis in which the position and speed of individual particles are updated little by little with a small time interval (ΔT), particle contact determination is performed at each time step to make contact. The contact force may be obtained for the particles.

上述したように、本実施形態のマルチカラー接触判定法の適用の前提は、接触格子の格子幅を粒子直径、あるいはそれ以上に取ることである。そうすることで、同じ値(カラー)の格子内にある粒子どうしは接触することがない。また、本実施形態では、格子並列を前提とし、一つの接触格子内に存在する粒子の接触判定計算は同一のスレッドで行う。そのためマルチカラー接触判定法では、自分と相手の接触力を更新する際に、原理上、競合が起きない。その結果、並列化をしても複数のスレッド間でデータの競合が起きない。なお、マルチカラー接触判定法では、逐次の接触判定計算とは加減算の順序が異なる。ただし、数学上における演算結果の一致は保証される。以上のようにして、マルチカラー接触判定法では、並列実行(計算)が可能である。   As described above, the premise of the application of the multi-color contact determination method of the present embodiment is that the lattice width of the contact lattice is set to the particle diameter or more. By doing so, particles in the same value (color) lattice do not contact each other. Further, in this embodiment, on the premise of lattice parallel, contact determination calculation of particles existing in one contact lattice is performed by the same thread. Therefore, in the multi-color contact determination method, there is no competition in principle when updating the contact force between the user and the opponent. As a result, even if parallelization is performed, there is no data contention among multiple threads. In the multi-color contact determination method, the order of addition / subtraction is different from the sequential contact determination calculation. However, the coincidence of calculation results in mathematics is guaranteed. As described above, in the multi-color contact determination method, parallel execution (calculation) is possible.

以上は1次元の解析対象に対するマルチカラー接触判定法の説明である。2次元、3次元に解析対象を広げる場合においても、マルチカラー接触判定法は、マルチカラー接触判定格子を2次元、3次元に拡張することで拡張が可能となる。以下、順に説明する。   The above is the description of the multi-color contact determination method for the one-dimensional analysis target. Even when the analysis target is expanded to two dimensions or three dimensions, the multi-color contact determination method can be expanded by extending the multi-color contact determination grid to two dimensions or three dimensions. Hereinafter, it demonstrates in order.

(2)2次元の解析対象領域
まず、2次元の解析対象領域について、図5、図6を参照しながら説明する。図5は、2次元のマルチカラー接触判定格子を概念的に示す図である。図5(a)は、2次元のマルチカラー接触判定格子を示し、図5(b)は、マルチカラーを付すための単位格子を示す。図6は、2次元のマルチカラー接触判定法の流れを示す図である。
(2) Two-dimensional analysis target region First, a two-dimensional analysis target region will be described with reference to FIGS. 5 and 6. FIG. 5 is a diagram conceptually showing a two-dimensional multi-color contact determination grid. FIG. 5A shows a two-dimensional multi-color contact determination grid, and FIG. 5B shows a unit grid for applying multi-color. FIG. 6 is a diagram illustrating a flow of a two-dimensional multi-color contact determination method.

マルチカラー接触判定法を2次元に拡張するには、図5(a)に示したように、2次元にマルチカラー接触判定格子に拡張する。図5(a)に示したように、接触判定格子上のデータ依存を回避するため、4色(2色)に色分けする。このことで、1次元と同様の議論で、マルチカラー接触判定法が実現できる。すなわち、図5(a)に示したように、マルチカラー接触判定格子においては、値“1”が付与された格子どうしには依然関係がない。同様に、値“2”が付与された格子どうしには依存関係がなく、値“3”が付与された格子どうしには依存関係がなく、値“4”が付与された格子どうしには依存関係がない。このため、上記1次元と同様の議論で並列実行が可能である。 In order to extend the multi-color contact determination method in two dimensions, as shown in FIG. As shown in FIG. 5 (a), in order to avoid data dependency on contact determination grid, color coded to four colors (2 3 colors). Thus, a multi-color contact determination method can be realized with the same discussion as in one dimension. That is, as shown in FIG. 5A, in the multi-color contact determination grid, there is still no relation between the grids assigned the value “1”. Similarly, there is no dependency between the grids with the value “2”, there is no dependency between the grids with the value “3”, and there is no dependency between the grids with the value “4”. There is no relationship. For this reason, parallel execution is possible with the same discussion as in the above one dimension.

接触判定格子への値の付与の仕方について説明する。まず、図5(a)を2×2個ずつの単位格子(2次元単位格子)に分割する。図5(b)は、2次元単位格子の一つを示す(iは1以上の整数)。そして、各2次元単位格子に対して、単位格子内の同じ位置の格子に同じ値を付与する。図5(b)の一例では、格子番号が(2i−1,2i−1)番の格子に値“1”が付与されている。また、格子番号が(2i,2i−1)番の格子に値“2”が付与されている。また、格子番号が(2i−1,2i)番の格子に値“3”が付与されている。また、格子番号が(2i,2i)番の格子に値“4”が付与されている。これをすべての2次元単位格子に対して行う。このようにして、図5(a)に示したマルチカラー接触判定格子を定義することができる。   A method of assigning values to the contact determination grid will be described. First, FIG. 5A is divided into 2 × 2 unit cells (two-dimensional unit cells). FIG. 5B shows one of the two-dimensional unit cells (i is an integer of 1 or more). For each two-dimensional unit cell, the same value is assigned to the lattice at the same position in the unit cell. In the example of FIG. 5B, the value “1” is assigned to the lattice having the lattice number (2i-1, 2i-1). Also, the value “2” is assigned to the grid having the grid number (2i, 2i−1). Further, the value “3” is assigned to the grid having the grid number (2i-1, 2i). Further, the value “4” is assigned to the grid having the grid number (2i, 2i). This is performed for all two-dimensional unit cells. In this way, the multi-color contact determination grid shown in FIG. 5A can be defined.

以上のように番号付けされたマルチカラー接触判定格子を用いた、粒子の接触判定計算方法について、図6を参照しながら説明する。まず、格子番号が(2i−1,2i−1)番の格子、すなわち、値“1”が付与された格子の接触判定計算を並列に行う(ステップS202)。次に、格子番号が(2i,2i−1)番の格子、すなわち、値“2”が付与された格子の接触判定を行う(ステップS204)。次に、格子番号が(2i−1,2i)番の格子、すなわち、値“3”が付与された格子の接触判定を行う(ステップS206)。次に、格子番号が(2i,2i)番の格子、すなわち、値“4”が付与された格子の接触判定を行う(ステップS208)。当該処理は、図3に示したマルチカラー接触判定法のプログラムにおいて、n=2、MAX_COLOR=2=4として実行することができる。 A particle contact determination calculation method using the multi-color contact determination grids numbered as described above will be described with reference to FIG. First, the contact determination calculation is performed in parallel for the lattice having the lattice number (2i-1, 2i-1), that is, the lattice having the value “1” (step S202). Next, contact determination is performed on the lattice having the lattice number (2i, 2i-1), that is, the lattice having the value "2" (step S204). Next, contact determination is performed on the lattice having the lattice number (2i-1, 2i), that is, the lattice having the value “3” (step S206). Next, contact determination is performed on the lattice having the lattice number (2i, 2i), that is, the lattice having the value “4” (step S208). This processing can be executed as n = 2 and MAX_COLOR = 2 2 = 4 in the multi-color contact determination method program shown in FIG.

(3)3次元の解析対象領域
次に、3次元の解析対象領域について、図7、図8を参照しながら説明する。図7は、3次元のマルチカラー接触判定格子を概念的に示す図である。図7(a)は、3次元のマルチカラー接触判定格子を示し、図7(b)は、マルチカラーを付すための単位格子を示す。図8は、3次元のマルチカラー接触判定法の流れを示す図である。
(3) Three-dimensional analysis target region Next, the three-dimensional analysis target region will be described with reference to FIGS. FIG. 7 is a diagram conceptually showing a three-dimensional multi-color contact determination grid. FIG. 7A shows a three-dimensional multi-color contact determination grid, and FIG. 7B shows a unit grid for applying multi-color. FIG. 8 is a diagram illustrating a flow of a three-dimensional multi-color contact determination method.

マルチカラー接触判定法を3次元に拡張するには、図7(a)に示したように、3次元にマルチカラー接触判定格子を拡張する。図7(a)に示したように、接触判定格子上のデータ依存を回避するため、8色(2色)色に色分けする。このことで、1次元、2次元と同様の議論で、マルチカラー接触判定法が実現できる。すなわち、図7(a)に示したように、マルチカラー接触判定格子においては、値“1”が付与された格子どうしには依然関係がない。同様に、値“2”が付与された格子どうしには依存関係がなく、値“3”が付与された格子どうしには依存関係がなく、値“4”が付与された格子どうしには依存関係がなく、値“5”が付与された格子どうしには依存関係がなく、値“6”が付与された格子どうしには依存関係がなく、値“7”が付与された格子どうしには依存関係がなく、値“8”が付与された格子どうしには依存関係がない。このため、上記1次元、2次元と同様の議論で並列実行が可能である。 In order to extend the multi-color contact determination method to three dimensions, as shown in FIG. 7A, the multi-color contact determination grid is extended to three dimensions. As shown in FIG. 7 (a), in order to avoid data dependency on contact determination grid, color coded to 8 colors (2 3 colors) color. Thus, a multi-color contact determination method can be realized with the same discussion as in one dimension and two dimensions. That is, as shown in FIG. 7A, in the multi-color contact determination grid, there is still no relation between the grids assigned the value “1”. Similarly, there is no dependency between the grids with the value “2”, there is no dependency between the grids with the value “3”, and there is no dependency between the grids with the value “4”. There is no dependency between the grids to which the value “5” is assigned, there is no dependency between the grids to which the value “6” is assigned, and there is no dependency between the grids to which the value “7” is assigned. There is no dependency relationship, and there is no dependency relationship between grids to which the value “8” is assigned. For this reason, parallel execution is possible in the same discussion as the one-dimensional and two-dimensional cases.

接触判定格子への値の付与の仕方について説明する。まず、図7(a)を2×2×2個ずつの単位格子(3次元単位格子)に分割する。図7(b)は、3次元単位格子の一つを示す(iは1以上の整数)。そして、各3次元単位格子に対して、単位格子内の同じ位置の格子に同じ値を付与する。   A method of assigning values to the contact determination grid will be described. First, FIG. 7A is divided into 2 × 2 × 2 unit cells (three-dimensional unit cells). FIG. 7B shows one of the three-dimensional unit cells (i is an integer of 1 or more). For each three-dimensional unit cell, the same value is assigned to the lattice at the same position in the unit cell.

図7(b)の一例では、格子番号が(2i−1,2i−1,2i−1)番の格子に値“1”が付与されている。また、格子番号が(2i,2i−1,2i−1)番の格子に値“2”が付与されている。また、格子番号が(2i−1,2i,2i−1)番の格子に値“3”が付与されている。また、格子番号が(2i,2i,2i−1)番の格子に値“4”が付与されている。また、格子番号が(2i−1,2i−1,2i)番の格子に値“5”が付与されている。また、格子番号が(2i,2i−1,2i)番の格子に値“6”が付与されている。また、格子番号が(2i−1,2i,2i)番の格子に値“7”が付与されている。また、格子番号が(2i,2i,2i)番の格子に値“8”が付与されている。これをすべての3次元単位格子に対して行う。このようにして、図7(a)に示したマルチカラー接触判定格子を定義することができる。   In the example of FIG. 7B, the value “1” is assigned to the lattice having the lattice number (2i-1, 2i-1, 2i-1). Further, the value “2” is assigned to the lattice having the lattice number (2i, 2i-1, 2i-1). Further, the value “3” is assigned to the lattice having the lattice number (2i-1, 2i, 2i-1). Also, the value “4” is assigned to the grid having the grid number (2i, 2i, 2i−1). In addition, the value “5” is given to the lattice having the lattice number (2i-1, 2i-1, 2i). Also, the value “6” is assigned to the grid having the grid number (2i, 2i-1, 2i). Further, the value “7” is assigned to the grid having the grid number (2i-1, 2i, 2i). Also, the value “8” is assigned to the grid having the grid number (2i, 2i, 2i). This is performed for all three-dimensional unit cells. In this way, the multi-color contact determination grid shown in FIG. 7A can be defined.

以上のように番号付けされたマルチカラー接触判定格子を用いた、粒子の接触判定計算方法について、図8を参照しながら説明する。まず、格子番号が(2i−1,2i−1,2i−1)番の格子、すなわち、値“1”が付与された格子の接触判定計算を並列に行う(ステップS302)。次に、格子番号が(2i,2i−1,2i−1)番の格子、すなわち、値“2”が付与された格子の接触判定を行う(ステップS304)。次に、格子番号が(2i−1,2i,2i−1)番の格子、すなわち、値“3”が付与された格子の接触判定を行う(ステップS306)。次に、格子番号が(2i,2i,2i−1)番の格子、すなわち、値“4”が付与された格子の接触判定を行う(ステップS308)。   A particle contact determination calculation method using the multi-color contact determination grids numbered as described above will be described with reference to FIG. First, the contact determination calculation is performed in parallel for the lattice having the lattice number (2i-1, 2i-1, 2i-1), that is, the lattice having the value "1" (step S302). Next, contact determination is performed for the grid having the grid number (2i, 2i-1, 2i-1), that is, the grid having the value “2” (step S304). Next, contact determination is performed for the grid having the grid number (2i-1, 2i, 2i-1), that is, the grid to which the value “3” is assigned (step S306). Next, contact determination is performed for the grid having the grid number (2i, 2i, 2i-1), that is, the grid having the value “4” (step S308).

以下同様に、格子番号が(2i−1,2i−1,2i)番の格子、すなわち、値“5”が付与された格子の接触判定計算を並列に行う(ステップS310)。次に、格子番号が(2i,2i−1,2i)番の格子、すなわち、値“6”が付与された格子の接触判定を行う(ステップS312)。次に、格子番号が(2i−1,2i,2i)番の格子、すなわち、値“7”が付与された格子の接触判定を行う(ステップS314)。次に、格子番号が(2i,2i,2i)番の格子、すなわち、値“8”が付与された格子の接触判定を行う(ステップS316)。当該処理は、図3に示したマルチカラー接触判定法のプログラムにおいて、n=3、MAX_COLOR=2=8として実行することができる。 Similarly, the contact determination calculation is performed in parallel for the lattice having the lattice number (2i-1, 2i-1, 2i), that is, the lattice having the value "5" (step S310). Next, contact determination is performed on the grid having the grid number (2i, 2i-1, 2i), that is, the grid having the value “6” (step S312). Next, contact determination is performed for the lattice having the lattice number (2i-1, 2i, 2i), that is, the lattice having the value “7” (step S314). Next, contact determination is performed on the grid having the grid number (2i, 2i, 2i), that is, the grid assigned the value “8” (step S316). This process can be executed as n = 3 and MAX_COLOR = 2 3 = 8 in the multi-color contact determination method program shown in FIG.

以上、本実施形態にかかる粒子の接触判定計算方法について説明した。本実施形態の方法は、専用の装置(粒子の接触判定計算装置)によって実行してもよい。かかる粒子の接触判定計算装置は、粒子の接触判定計算部を備えることができる。そして、かかる粒子の接触判定計算部は、本実施形態で説明した粒子の接触判定計算方法を実行することができる。   The particle contact determination calculation method according to the present embodiment has been described above. The method of the present embodiment may be executed by a dedicated device (particle contact determination calculation device). Such a particle contact determination calculation device may include a particle contact determination calculation unit. The particle contact determination calculation unit can execute the particle contact determination calculation method described in this embodiment.

また、専用の装置ではなく、汎用のコンピュータに所定のコンピュータプログラムを組み込むことによって、コンピュータを、上述したような粒子の接触判定計算装置として機能させてもよい。かかるコンピュータプログラムは、CR−ROM、DVD−ROM、半導体メディアなどの各種記憶媒体に格納された形で市場を流通させることができる。また、様々なネットワークを介した伝達、例えばインターネットを介したダウンロードによって市場を流通させるようにしてもよい。   In addition, a predetermined computer program may be incorporated into a general-purpose computer instead of a dedicated device so that the computer functions as the particle contact determination calculation device as described above. Such a computer program can be distributed in the market in the form of being stored in various storage media such as CR-ROM, DVD-ROM, and semiconductor media. Further, the market may be distributed by transmission via various networks, for example, download via the Internet.

以上、本実施形態に特徴的なマルチカラー接触判定法について説明した。次いで、性能評価について説明する。   The multi-color contact determination method that is characteristic of the present embodiment has been described above. Next, performance evaluation will be described.

本性能評価では、以下の仕様により評価を行った。
・インテル(R) Core(TM) i7-2600プロセッサー(クアッドコア/3.40GHz/TB時最大3.80GHz/8MBスマートキャッシュ/HT対応)
・8GBメモリ[4GB×2 (DDR3 SDRAM PC3-10600)/デュアルチャネル]
・Windows(R)7 Professional正規版(OEM)[64bit]
In this performance evaluation, evaluation was performed according to the following specifications.
Intel (R) Core (TM) i7-2600 processor (quad core / 3.40GHz / TB up to 3.80GHz / 8MB smart cache / HT compatible)
・ 8GB memory [4GB × 2 (DDR3 SDRAM PC3-10600) / Dual channel]
・ Windows (R) 7 Professional regular version (OEM) [64bit]

本性能評価では、粒子径は0.002、粒子数は6250万、ステップ数は20に設定した。また判定時に各粒子は接触数の情報を更新するが、3次元の接触判定格子を利用するため、1粒子あたりの接触数情報の上限は12とする。   In this performance evaluation, the particle size was set to 0.002, the number of particles was 62.5 million, and the number of steps was set to 20. In addition, each particle updates the information on the number of contacts at the time of determination. However, since a three-dimensional contact determination grid is used, the upper limit of the information on the number of contacts per particle is 12.

本実施形態にかかるマルチカラー接触判定法の有効性を見るために、以下の表1のように3つのプログラムを用意した。表1は、Methodによる実装方式の違いを示す。   In order to see the effectiveness of the multi-color contact determination method according to this embodiment, three programs are prepared as shown in Table 1 below. Table 1 shows the difference in the mounting method by Method.

表1では、接触判定格子並列化時のデータの競合を防ぐためにcritical指示文を入れたプログラムをmethod1とする。接触判定格子並列において、相手の情報を書き込まず、計算量が2倍になるプログラムをmethod2とする。以上のmethod1、method2は従来法である。最後に、本実施形態の方法であるマルチカラー接触判定格子を用いて並列化するプログラムをmethod3とする。   In Table 1, a program including a critical directive is referred to as method 1 in order to prevent data conflict when parallelizing the contact determination grid. In the contact determination grid parallel, a program that does not write the partner information and doubles the calculation amount is defined as method2. The above method 1 and method 2 are conventional methods. Finally, a program to be parallelized using the multi-color contact determination grid which is the method of the present embodiment is method3.

1ノードを占有し、OpenMPにより最大8スレッドで並列実行したときの計算時間と台数効果について性能を評価する。ここで台数効果とは、並列処理の効果を示す一般的な指標である。式(1)のように「逐次実行における計算時間」に対する「並列実行における実行時間」の比で表される。   The performance is evaluated for the calculation time and the number effect when one node is occupied and parallel execution is performed with a maximum of 8 threads by OpenMP. Here, the number effect is a general index indicating the effect of parallel processing. As expressed by equation (1), it is represented by the ratio of “execution time in parallel execution” to “calculation time in sequential execution”.

S=逐次実行に要する計算時間/並列計算に要する計算時間・・・式(1)   S = Computation time required for sequential execution / Computation time required for parallel computation (1)

なお、式(1)における計算時間とは、接触判定計算に要する計算時間と粒子の接触力計算時間を合計した総計算時間のことを指す。   In addition, the calculation time in Formula (1) refers to the total calculation time which totaled the calculation time required for contact determination calculation, and the contact force calculation time of particle | grains.

各methodにおいて、逐次計算(スレッド数1)と並列計算(スレッド数2、4、6、及び8)での計算時間の比較を行う。ここで計算時間とは、5ステップ目以降の計算時間を測定し、その値を平均したものである。計算時間の結果を、以下の表2及び図9に示す。表2は、各methodの実行時間(秒)を示す。   In each method, the calculation time is compared between sequential calculation (number of threads 1) and parallel calculation (number of threads 2, 4, 6, and 8). Here, the calculation time is obtained by measuring the calculation time after the fifth step and averaging the values. The results of calculation time are shown in Table 2 below and FIG. Table 2 shows the execution time (seconds) of each method.

表2から、8スレッド時において、本実施形態にかかるマルチカラー接触判定法を利用することで最大で1.62倍(method1の5.656[秒]に対する、method3の3.496[秒])の速度向上が得られることがわかる。   From Table 2, the maximum multi-color contact determination method according to the present embodiment is used by using the multi-color contact determination method according to the present embodiment at 1.62 times (3.46 [seconds] of method3 with respect to 5.656 [seconds] of method1). It can be seen that an improvement in speed can be obtained.

以上、本実施形態では、粉体解析等で用いられる接触判定計算において、マルチカラー接触判定格子を用いた新しいスレッド並列化手法である、マルチカラー接触判定法について説明した。また、いくつかの従来法に対する性能評価を行った。従来法では、格子並列を採用しているが、計算の効率化のために、粒子番号のリナンバリングを行っている。本実施形態のマルチカラー接触判定法では、このリナンバリングに加え、格子のアクセスの仕方を工夫することで、スレッド並列化時にデータ競合が起こらないようにしている。そのため、従来法に対しより高い並列化効率が期待できる。そして、上述したように、本実施形態のマルチカラー接触判定法は、計算時間と台数効果の両方において、従来手法より優れた結果が得られた。   As described above, in the present embodiment, the multi-color contact determination method, which is a new thread parallel method using the multi-color contact determination grid, has been described in the contact determination calculation used in powder analysis and the like. In addition, performance evaluation for some conventional methods was performed. In the conventional method, lattice parallelism is used, but particle number renumbering is performed in order to improve calculation efficiency. In the multi-color contact determination method of this embodiment, in addition to this renumbering, the method of accessing the grid is devised to prevent data contention during thread parallelization. Therefore, higher parallelization efficiency can be expected than the conventional method. As described above, the multi-color contact determination method of the present embodiment obtained results superior to the conventional method in both the calculation time and the number effect.

以上、添付図面を参照しながら本発明の好適な実施形態について説明したが、本発明はかかる例に限定されないことは言うまでもない。当業者であれば、特許請求の範囲に記載された範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、それらについても当然に本発明の技術的範囲に属するものと了解される。   As mentioned above, although preferred embodiment of this invention was described referring an accompanying drawing, it cannot be overemphasized that this invention is not limited to this example. It will be apparent to those skilled in the art that various changes and modifications can be made within the scope of the claims, and these are naturally within the technical scope of the present invention. Understood.

例えば、上記実施形態では、解析対象空間として、1次元〜3次元空間について説明したが、本発明はこれに限定されず、任意の次元数の解析対象空間に適用可能である。   For example, in the above embodiment, the one-dimensional to three-dimensional space has been described as the analysis target space. However, the present invention is not limited to this, and can be applied to an analysis target space having an arbitrary number of dimensions.

本発明は、粒子の接触判定計算方法、粒子の接触判定計算装置、及びコンピュータプログラムに利用可能であり、特に、所定の解析対象領域において接触判定格子を用いて行う、粒子の接触判定計算方法、粒子の接触判定計算装置、及びコンピュータプログラムに利用可能である。   The present invention is applicable to a particle contact determination calculation method, a particle contact determination calculation device, and a computer program, and in particular, a particle contact determination calculation method performed using a contact determination grid in a predetermined analysis target region, It can be used for a particle contact determination calculation device and a computer program.

10 接触判定格子
20 粒子
100 1次元接触判定格子
110 マルチカラー接触判定格子(1次元)
120 1次元単位格子
210 マルチカラー接触判定格子(2次元)
220 2次元単位格子
310 マルチカラー接触判定格子(3次元)
320 3次元単位格子
10 Contact determination grid 20 Particle 100 One-dimensional contact determination grid 110 Multi-color contact determination grid (one-dimensional)
120 One-dimensional unit cell 210 Multi-color contact determination cell (2D)
220 2D unit cell 310 Multi-color contact determination cell (3D)
320 3D unit cell

Claims (3)

3次元の解析対象領域において接触判定格子を用いて接触判定計算装置が行う粒子の接触判定計算方法であって、
前記接触判定計算装置は、粒子の接触判定計算を行う接触判定計算部を備え、
前記接触判定計算部は、
格子番号が(2i−1,2i−1,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i,2i−1,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i−1,2i,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i,2i,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i−1,2i−1,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i,2i−1,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i−1,2i,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i,2i,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
を所定の順序で繰り返し行う(iは以上の整数)ことを特徴とする、粒子の接触判定計算方法。
A contact determination calculation method for particles performed by a contact determination calculation device using a contact determination grid in a three-dimensional analysis target region,
The contact determination calculation device includes a contact determination calculation unit that performs contact determination calculation of particles,
The contact determination calculation unit
Performing in parallel the particle contact determination calculation in the contact determination lattice having the lattice number (2i-1, 2i-1, 2i-1);
Performing in parallel the particle contact determination calculation in the contact determination lattice with the lattice number (2i, 2i-1, 2i-1);
Performing in parallel the particle contact determination calculation in the contact determination lattice with the lattice number (2i-1, 2i, 2i-1);
Performing in parallel the particle contact determination calculation in the contact determination lattice with the lattice number (2i, 2i, 2i-1);
Performing in parallel the particle contact determination calculation in the contact determination lattice having the lattice number (2i-1, 2i-1, 2i);
Performing in parallel the particle contact determination calculation in the contact determination lattice having the lattice number (2i, 2i-1, 2i);
Performing in parallel the particle contact determination calculation in the contact determination lattice having the lattice number (2i-1, 2i, 2i);
Performing in parallel the particle contact determination calculation in the contact determination lattice with the lattice number (2i, 2i, 2i);
Are repeatedly performed in a predetermined order (i is an integer equal to or greater than 1 ).
3次元の解析対象領域において接触判定格子を用いて行う粒子の接触判定計算装置であって、
粒子の接触判定計算を行う接触判定計算部を備え、
前記接触判定計算部は、
格子番号が(2i−1,2i−1,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i,2i−1,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i−1,2i,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i,2i,2i−1)の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i−1,2i−1,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i,2i−1,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i−1,2i,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i,2i,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
を所定の順序で繰り返し行う(iは以上の整数)ことを特徴とする、粒子の接触判定計算装置。
A particle contact determination calculation apparatus using a contact determination grid in a three-dimensional analysis target region,
Provided with a contact determination calculation unit that performs contact determination calculation of particles,
The contact determination calculation unit
Performing in parallel the particle contact determination calculation in the contact determination lattice having the lattice number (2i-1, 2i-1, 2i-1);
Performing in parallel the particle contact determination calculation in the contact determination lattice with the lattice number (2i, 2i-1, 2i-1);
Performing in parallel the particle contact determination calculation in the contact determination lattice with the lattice number (2i-1, 2i, 2i-1);
Performing in parallel a particle contact determination calculation in a contact determination lattice with a lattice number of (2i, 2i, 2i-1);
Performing in parallel the particle contact determination calculation in the contact determination lattice having the lattice number (2i-1, 2i-1, 2i);
Performing in parallel the particle contact determination calculation in the contact determination lattice having the lattice number (2i, 2i-1, 2i);
Performing in parallel the particle contact determination calculation in the contact determination lattice having the lattice number (2i-1, 2i, 2i);
Performing in parallel the particle contact determination calculation in the contact determination lattice with the lattice number (2i, 2i, 2i);
Are repeatedly performed in a predetermined order (i is an integer equal to or greater than 1 ).
コンピュータを、3次元の解析対象領域において接触判定格子を用いて行う粒子の接触判定計算装置として機能させるためのコンピュータプログラムであって、
前記接触判定計算装置は、粒子の接触判定計算を行う接触判定計算部を備え、
前記接触判定計算部は、
格子番号が(2i−1,2i−1,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i,2i−1,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i−1,2i,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i,2i,2i−1)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i−1,2i−1,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i,2i−1,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i−1,2i,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
格子番号が(2i,2i,2i)番の接触判定格子における粒子の接触判定計算を並列に行うステップと、
を所定の順序で繰り返し行う(iは以上の整数)ことを特徴とする、コンピュータプログラム。
A computer program for causing a computer to function as a particle contact determination calculation device using a contact determination grid in a three-dimensional analysis target region,
The contact determination calculation device includes a contact determination calculation unit that performs contact determination calculation of particles,
The contact determination calculation unit
Performing in parallel the particle contact determination calculation in the contact determination lattice having the lattice number (2i-1, 2i-1, 2i-1);
Performing in parallel the particle contact determination calculation in the contact determination lattice with the lattice number (2i, 2i-1, 2i-1);
Performing in parallel the particle contact determination calculation in the contact determination lattice with the lattice number (2i-1, 2i, 2i-1);
Performing in parallel the particle contact determination calculation in the contact determination lattice with the lattice number (2i, 2i, 2i-1);
Performing in parallel the particle contact determination calculation in the contact determination lattice having the lattice number (2i-1, 2i-1, 2i);
Performing in parallel the particle contact determination calculation in the contact determination lattice having the lattice number (2i, 2i-1, 2i);
Performing in parallel the particle contact determination calculation in the contact determination lattice having the lattice number (2i-1, 2i, 2i);
Performing in parallel the particle contact determination calculation in the contact determination lattice with the lattice number (2i, 2i, 2i);
Are repeated in a predetermined order (i is an integer of 1 or more).
JP2013253717A 2013-12-08 2013-12-08 Particle contact determination calculation method, particle contact determination calculation apparatus, and computer program Active JP5874155B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013253717A JP5874155B2 (en) 2013-12-08 2013-12-08 Particle contact determination calculation method, particle contact determination calculation apparatus, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013253717A JP5874155B2 (en) 2013-12-08 2013-12-08 Particle contact determination calculation method, particle contact determination calculation apparatus, and computer program

Publications (2)

Publication Number Publication Date
JP2015114674A JP2015114674A (en) 2015-06-22
JP5874155B2 true JP5874155B2 (en) 2016-03-02

Family

ID=53528472

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013253717A Active JP5874155B2 (en) 2013-12-08 2013-12-08 Particle contact determination calculation method, particle contact determination calculation apparatus, and computer program

Country Status (1)

Country Link
JP (1) JP5874155B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7244757B2 (en) * 2019-07-01 2023-03-23 富士通株式会社 Information processing device, particle simulation method and particle simulation system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4899607B2 (en) * 2006-04-19 2012-03-21 学校法人同志社 Particle behavior simulation apparatus, particle behavior simulation method, and computer program
CN103229177B (en) * 2010-09-15 2016-08-24 联邦科学与工业研究组织 discrete element method

Also Published As

Publication number Publication date
JP2015114674A (en) 2015-06-22

Similar Documents

Publication Publication Date Title
Agullo et al. Task-based FMM for multicore architectures
Páll et al. A flexible algorithm for calculating pair interactions on SIMD architectures
JP4984306B2 (en) Retargeting application programs for execution by general purpose processors
Lutz et al. PARTANS: An autotuning framework for stencil computation on multi-GPU systems
JP6319880B2 (en) Parallelism extraction method and program creation method
Hwu What is ahead for parallel computing
US9229717B2 (en) Register allocation for clustered multi-level register files
CN110574045A (en) Graph matching for optimized deep network processing
US11107187B2 (en) Graph upscaling method for preserving graph properties
JP6205168B2 (en) System and method for parallel model checking utilizing parallel structured duplicate detection
Iturbe et al. Runtime Scheduling, Allocation, and Execution of Real‐Time Hardware Tasks onto Xilinx FPGAs Subject to Fault Occurrence
DiMarco et al. Performance impact of dynamic parallelism on different clustering algorithms
Bøgh et al. Work-efficient parallel skyline computation for the GPU
Adlerborn et al. A parallel QZ algorithm for distributed memory HPC systems
US10599638B2 (en) System and method for identifying maximal independent sets in parallel
Langguth et al. Parallel performance modeling of irregular applications in cell-centered finite volume methods over unstructured tetrahedral meshes
JP5874155B2 (en) Particle contact determination calculation method, particle contact determination calculation apparatus, and computer program
US9081561B2 (en) Method for improving execution performance of multiply-add instruction during compiling
Jin et al. Optimizing an atomics-based reduction kernel on OpenCL FPGA platform
Jiménez et al. Three‐dimensional thinning algorithms on graphics processing units and multicore CPUs
Sørensen Auto‐tuning of level 1 and level 2 BLAS for GPUs
KR100938903B1 (en) Dynamic data allocation method on an application with irregular array access patterns in software controlled cache memory
Kim et al. Optimizing seam carving on multi-GPU systems for real-time content-aware image resizing
KR101754998B1 (en) Multi Core System and Method for Processing Data
JP6519228B2 (en) Data allocation determination device, data allocation determination program, and data allocation determination method

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151005

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151117

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20151228

R150 Certificate of patent or registration of utility model

Ref document number: 5874155

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150