JP7318383B2 - Information processing program, information processing method, and information processing apparatus - Google Patents
Information processing program, information processing method, and information processing apparatus Download PDFInfo
- Publication number
- JP7318383B2 JP7318383B2 JP2019134863A JP2019134863A JP7318383B2 JP 7318383 B2 JP7318383 B2 JP 7318383B2 JP 2019134863 A JP2019134863 A JP 2019134863A JP 2019134863 A JP2019134863 A JP 2019134863A JP 7318383 B2 JP7318383 B2 JP 7318383B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- threshold
- residual
- simulation
- unit
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/11—Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/544—Buffers; Shared memory; Pipes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2111/00—Details relating to CAD techniques
- G06F2111/10—Numerical modelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Medical Informatics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Mathematical Physics (AREA)
- Geometry (AREA)
- Computer Hardware Design (AREA)
- Data Mining & Analysis (AREA)
- Business, Economics & Management (AREA)
- Strategic Management (AREA)
- Pure & Applied Mathematics (AREA)
- Computational Mathematics (AREA)
- Human Resources & Organizations (AREA)
- Mathematical Optimization (AREA)
- Economics (AREA)
- Mathematical Analysis (AREA)
- Operations Research (AREA)
- Computing Systems (AREA)
- General Business, Economics & Management (AREA)
- Development Economics (AREA)
- Game Theory and Decision Science (AREA)
- Tourism & Hospitality (AREA)
- Quality & Reliability (AREA)
- Algebra (AREA)
- Marketing (AREA)
- Databases & Information Systems (AREA)
- Entrepreneurship & Innovation (AREA)
- Debugging And Monitoring (AREA)
- Complex Calculations (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Description
本発明は、情報処理プログラム、情報処理方法、及び情報処理装置に関する。 The present invention relates to an information processing program, an information processing method, and an information processing apparatus.
近年、製品の構造にかかる応力の検証、気体や液体の振る舞いの検証等に、構造解析や流体解析のシミュレーションが用いられるようになっている。解析シミュレーションでは、非線形解析ではニュートン法などの反復法が用いられ、各反復において線形ソルバを解く。線形ソルバ自体も反復法で解かれることが多い。 In recent years, structural analysis and fluid analysis simulations have come to be used to verify the stress applied to the structure of products and to verify the behavior of gases and liquids. In analytical simulation, an iterative method such as Newton's method is used for nonlinear analysis, solving a linear solver at each iteration. Linear solvers themselves are also often solved iteratively.
デバイス特性に関する所定の条件を解析に用いる方程式により得た解の行列が線形方程式の収束判定を満たすか否かに応じて収束判定の条件を変更することで、当該解の行列の非線形方程式による収束条件を満たすまでの計算時間を短縮する技術等が知られている。 Convergence of the solution matrix by the nonlinear equation by changing the convergence judgment condition according to whether the solution matrix obtained from the equation using the predetermined condition for the analysis of the device characteristics satisfies the convergence judgment of the linear equation Techniques and the like for shortening the calculation time until the conditions are satisfied are known.
構造解析や流体解析のシミュレーションでは、非線形解析を行う場合がある。非線形解析ではニュートン法などの反復法では収束条件として残差の閾値があり、シミュレーションの演算時間を高速化するためには、残差閾値を最適な値に設定することが有効であるが、事前に最適な残差閾値を得ることができない。 Nonlinear analysis may be performed in simulations of structural analysis and fluid analysis. In nonlinear analysis, iterative methods such as Newton's method have a residual threshold value as a convergence condition. , the optimal residual threshold cannot be obtained.
したがって、1つの側面では、最適な残差閾値の設定を可能とし、非線形解析の反復回数を低減することで、演算時間を短縮することを目的とする。 Accordingly, one aspect of the present invention aims at shortening the computation time by making it possible to set an optimum residual threshold and reducing the number of iterations of the nonlinear analysis.
一態様によれば、1又は複数のコンピュータに、線形解析を反復して非線形解析を行う第1の処理を実行させ、前記第1の処理により複数の実験値で残差閾値ごとに求めた前記線形解析の反復ごとの残差推移と演算時間とに基づいて、NNにより前記線形解析の収束判定に用いる残差閾値を推論させる第2の処理とを実行させ、前記第1の処理と前記第2の処理との間で行われるデータの受け渡しを、メモリに設定された共有メモリを用いたプロセス間通信により行わせることを特徴とする情報処理プログラムが提供される。
According to one aspect, one or more computers are caused to perform a first process of repeating linear analysis to perform nonlinear analysis, and the first process determines for each residual threshold with a plurality of experimental values a second process of inferring a residual threshold value used for determining convergence of the linear analysis by the NN based on the residual transition and the computation time for each iteration of the linear analysis; There is provided an information processing program characterized in that the data exchange between the processes of 2 is performed by inter-process communication using a shared memory set in the memory.
また、本開示によれば、情報処理方法、及び情報処理装置が提供される。 Further, according to the present disclosure, an information processing method and an information processing apparatus are provided.
最適な残差閾値の設定を可能とし、非線形解析の反復回数を低減することで、演算時間を短縮することができる。 By making it possible to set the optimum residual threshold and reducing the number of iterations of the nonlinear analysis, the computation time can be shortened.
以下、本発明の実施の形態を図面に基づいて説明する。構造解析や流体解析のシミュレーションでは非線形方程式の解析(「非線形解析」という)を行うこともあり、非線形解析ではNewton法などを用いて線形ソルバを反復的に解くことで解を求めている。線形ソルバ自体も大規模な問題に対しては反復法(CG(Conjugate Gradient:共役勾配法)など)を用いて解を求めることが多い。 BEST MODE FOR CARRYING OUT THE INVENTION An embodiment of the present invention will be described below with reference to the drawings. In structural analysis and fluid analysis simulations, nonlinear equation analysis (called "nonlinear analysis") is sometimes performed, and in nonlinear analysis, solutions are obtained by iteratively solving a linear solver using Newton's method or the like. The linear solver itself often uses an iterative method (such as CG (Conjugate Gradient)) to obtain a solution for a large-scale problem.
シミュレーションの演算時間を高速化するために、発明者等は、非線形解析における反復処理の収束条件となる残差閾値の調整方向をAI(Artificial Intelligence:人工知能)に学習させて動的に増加又は減少することによりシミュレーションを実行することを見出した。この場合、線形ソルバの反復処理により収束するまでの時間経過による残差の系列(「残差曲線」又は「残差推移」という)を、シミュレーションプログラムから機械学習プログラムへと渡すことで、残差閾値の学習が行われる。この手法は第2実施例で詳述する。 In order to speed up the calculation time of the simulation, the inventors let AI (Artificial Intelligence) learn the adjustment direction of the residual threshold, which is the convergence condition of iterative processing in nonlinear analysis, and dynamically increase or We found that the simulation was performed by reducing In this case, by passing the series of residuals over time until convergence by the iterative process of the linear solver (called "residual curve" or "residual transition") from the simulation program to the machine learning program, the residual Threshold learning is performed. This technique will be described in detail in the second embodiment.
しかしながら、シミュレーションプログラムと機械学習プログラムとは一般的に言語が異なるため、シミュレーションと学習との間でデータをやり取りするためのファイルアクセスに時間が掛かる。この問題を解決するために、発明者等は、第1実施例によるプロセス間通信を見出した。第2実施例では、動的な残差閾値の調整手法について説明する。 However, since simulation programs and machine learning programs generally use different languages, it takes time to access files for exchanging data between simulation and learning. To solve this problem, the inventors found inter-process communication according to the first embodiment. In the second embodiment, a dynamic residual threshold adjustment technique will be described.
後述される第1実施例~第2実施例は、図1に示すようなハードウェア構成を有する情報処理装置に実装可能であり、第1実施例~第2実施例のいずれか又は両方を実装することにより、シミュレーションの処理速度を改善することができる。 The first to second embodiments described later can be implemented in an information processing apparatus having a hardware configuration as shown in FIG. 1, and either or both of the first to second embodiments can be implemented. By doing so, the processing speed of the simulation can be improved.
図1は、情報処理装置のハードウェア構成例を示す図である。図1より、情報処理装置100は、コンピュータであって、CPU(Central Processing Unit)11と、メインメモリ12と、ディスク13と、GPU(Graphics Processing Unit)14gと、GPUメモリ14mと、入力装置15と、表示装置16と、通信I/F17と、ドライブ装置18とを有し、バスBに接続される。このハードウェア構成は、第2実施例においても同様である。
FIG. 1 is a diagram illustrating a hardware configuration example of an information processing apparatus. 1, the
CPU11は、情報処理装置100全体を制御するプロセッサに相当し、ディスク13から読み込まれメインメモリ12(例えば、RAM(Random Access Memory))に格納されたシミュレーションプログラムを実行し以下に説明する本実施例における処理を実現する。CPU11は、また、シミュレーション以外の様々な処理を行う。
The
GPU14gは、AI推論用のプロセッサに相当し、シミュレーションの実行により得られたシミュレーションデータを用いて、本実施例における残差閾値の調整方向を推定するAI推論を行う。GPU14mは、GPU14gが利用するローカルメモリでありAI推論を行うNN270(図3)のプログラムを記憶している。AI推論は、GPU14gがGPU14mに記憶されたプログラムを実行することにより、NN270の最適なパラメータ値を学習する。
The
入力装置15は、ユーザによって操作され、操作に応じてデータを入力し、表示装置16は、ユーザーインタフェースとして様々な画面を表示する。通信I/F17は、外部装置との通信を制御する。
The
記憶媒体19(例えば、CD-ROM(Compact Disc Read-Only Memory)等)に記憶された本実施例に係るシミュレーションプログラムは、ドライブ装置18を介してディスク13にインストールされ、CPU11によって実行可能となる。また、機械学習プログラムも同様に記憶媒体19からドライブ装置18を介してディスク13にインストールされ、GPU14gによって実行可能となる。
A simulation program according to the present embodiment stored in a storage medium 19 (for example, a CD-ROM (Compact Disc Read-Only Memory) or the like) is installed on the
記憶媒体19(例えば、CD-ROM(Compact Disc Read-Only Memory)等)に記憶された本実施例に係るシミュレーションプログラム及び機械学習プログラムは、ドライブ装置18を介して記憶部130にインストールされ、CPU11によって実行可能となる。シミュレーションプログラム及び機械学習プログラムはそれぞれ別の記憶媒体19からインストールされてもよい。
A simulation program and a machine learning program according to the present embodiment stored in a storage medium 19 (for example, a CD-ROM (Compact Disc Read-Only Memory), etc.) are installed in the storage unit 130 via the
尚、本実施例に係るプログラムを格納する記憶媒体19はCD-ROMに限定されず、コンピュータが読み取り可能な、構造(structure)を有する1つ以上の非一時的(non-transitory)な、有形(tangible)な媒体であればよい。コンピュータ読取可能な記憶媒体として、CD-ROMの他に、DVD(Digital Versatile Disk)ディスク、USBメモリ等の可搬型記録媒体、フラッシュメモリ等の半導体メモリであっても良い。
Note that the
[第1実施例]
また、第1実施例では、図2に示すような機能構成を有する情報処理装置100において、プロセス間通信によりシミュレーションを高速化する手法について説明する。図2は、情報処理装置の機能構成例を示す図である。
[First embodiment]
Also, in the first embodiment, a technique for speeding up simulation by inter-process communication in the
図2より、情報処理装置100は、主に、シミュレーション部30と、機械学習部40とを処理部として有する。また、問題データ2、閾値Th、シミュレーションデータ204d、シミュレーション結果5、推論結果71等は、第1実施例で説明するように一部を共有メモリ12a(図8)として用いることにより、メインメモリ12に記憶されるものとして示す。
As shown in FIG. 2, the
シミュレーション部30は、CPU11がシミュレーションプログラムを実行することにより実現される処理部であり、問題データ2に対して所定の解析を行い、主に、非線形解析部32と、線形解析部34とを有する。所定の解析とは、構造解析、流体解析等である。シミュレーション部30によって得られた解析結果は表示装置16に表示されてもよい。
The
非線形解析部32は、問題データ2を読み込んで非線形解析を行う処理部である。非線形解析ではNewton-Raphson法などの反復法を用いて解を得る。非線形解析部32は、非線形回数を所定の回数分繰り返し、繰り返しごとに、線形解析部34に、問題データ2から得られるパラメータ値等と、収束判定に用いる閾値Th(即ち、残差閾値)とを与え、線形方程式による解析を行わせる。非線形解析によって得られた非線形解析データは、後述されるnonlin_dataに相当する。
The
線形解析部34は、閾値Thを満たすまで線形方程式を用いた解析を反復し、反復ごとの解と閾値Thとの差分を示す残差と、シミュレーション時間等の線形解析データをメインメモリ12に出力する。閾値Thを満たすまで線形方程式を用いた解析を反復する処理には、線形ソルバが用いられる。線形解析部34によって得られた線形解析データは、後述されるlin_dataに相当する。
The
非線形解析データは、非線形解析の繰り返しごとに得られるデータであり、また、線形解析データは反復ごとに累積されたデータである。そして、様々なパラメータ値、解等を含む、非線形解析データ及び線形解析データがシミュレーションデータ204dに相当する。シミュレーションデータ204dは、AI推論ごとに機械学習部40に読み込まれる。
Nonlinear analysis data is data obtained for each iteration of nonlinear analysis, and linear analysis data is data accumulated for each iteration. Nonlinear analysis data and linear analysis data, including various parameter values, solutions, etc., correspond to the
また、シミュレーションの開始から終了までの時間経過で示された実行環境及び実行状態を示すデータの集まりを実行ログ4a(図42)という。実行ログ4aには、シミュレーションデータ204dが含まれる。また、問題データ2に対する目的の解をシミュレーション結果5という。
Also, a collection of data indicating the execution environment and the execution state indicated by the passage of time from the start to the end of the simulation is called an
第1実施例では、非線形解析を行うために線形解析を用いる情報処理装置100において、実験値で閾値Thごとに求めた反復ごとの残差推移、演算時間などを示すログデータに基づいて残差の閾値Thを決定する。
In the first embodiment, in the
機械学習部40は、線形解析部34で用いる閾値Thを調整するNN270のパラメータ値を学習する学習部50と、訓練済みのNN270を用いて閾値Thの増減(調整方向)を推論する推論部60とを有する。
The
学習部50は、図3に示すように、シミュレーションデータ204dにラベル付けして作成した学習データ6gをNN270に入力し、NN270が推論したクラスを示す推論結果71と、学習データ6gのラベルとの誤差をNN270にフィードバックする。
As shown in FIG. 3, the
推論部60は、訓練済みのNN270により閾値Thの増減を示す推論結果71を得る。一例として、推論結果71は、NN270によって分類されるクラス「1」、「2」、及び「3」のいずれかを示すものとする。この場合、クラス「1」は、閾値Thの増加を指定し(閾値up)、クラス「2」は、閾値Thの調整不要を指定し(閾値keep)、クラス「3」は、閾値Thの減少を指定する(閾値down)。
The
推論部60は、訓練済みのNN270に、シミュレーションデータ204dに対して残差を小さくするようにクラスを推論する。推論結果71はメインメモリ12に記憶され、シミュレーション部30の非線形解析部32への戻り値となる。
The
非線形解析部32では、推論部60が推論した推論結果71に基づいて閾値Thを更新し線形解析部34に与える。このような閾値Thの調整によりシミュレーションに掛かる時間を短縮することが可能となる。
The
閾値Thは、反復法での収束条件の一つであり、線形解析部34への閾値Thの与え方が解の精度と実行時間に影響を与える。閾値Thは任意の値に設定しても、非線形解析が収束する限り、最終的な解の精度には影響を与えないと考えられる。しかしながら、最適な残差閾値を高速に推定できれば、非線形解析全体を高速化することが可能となる。
The threshold Th is one of the convergence conditions in the iterative method, and how the threshold Th is given to the
このような観点から、発明者等は、NN270を用いて閾値Thの増減を学習し、また、訓練済みのNN270を用いて、閾値Thの増減を予測することで、最適値へと閾値Thを近付けることができ、線形解析が収束するまでの反復回数及び処理時間を短縮できることを見出した。図3及び図4を参照して、情報処理装置100で行われる処理の概要について説明する。この例では、NN270としてCNN(Convolutional Neural Network)を用いた場合で説明するが、NNはCNNに限定されるものではない。
From this point of view, the inventors use the
図3は、学習処理を説明するための図である。図3において、問題データ2に対して異なる候補閾値を用いたシミュレーションごとのシミュレーションデータ204dを参照して、反復ごとの残差推移、演算時間等に基づいて候補閾値の中から、学習用に用いる基準閾値を決定する。そして、残差曲線データ4dそれぞれには、この基準閾値と候補閾値との差分に基づいてラベル付けを行い、学習データ6gとして使用される。候補閾値は、実験値に相当する。
FIG. 3 is a diagram for explaining the learning process. In FIG. 3, referring to the
基準閾値より小さい候補閾値を使用したシミュレーションデータ204dには、ラベル「1」が付与されている。基準閾値より大きい候補閾値を使用したシミュレーションデータ204dは、ラベル「3」が付与されている。また、基準閾値と一致する候補閾値を使用したシミュレーションデータ204dには、ラベル「2」が付与されている。即ち、前述した最短時間でシミュレーションが終了したときのシミュレーションデータ204dに対しては、ラベル「2」が付与される。
The
シミュレーションデータ204dをNN270に入力することで推論結果71を得る。一例として、推論結果71は、閾値Thを上げるクラス1、閾値Thを維持するクラス2、及び閾値Thを下げるクラス3のいずれか1つを示す。推論結果71は、学習データ6gのラベルと比較され、比較結果としての誤差がNN270にフィードバックされる。この誤差のフィードバックによりNN270のパラメータ値が更新される。訓練済みのNN270が、推論部60で用いられる。
An
上述では、クラス1、2、及び3に分類する場合を例としたが、閾値Thを上げる場合とそれ以外の場合のみに分類してもよい。その場合には、学習部50では、学習時に候補閾値3が基準閾値3refより低い場合にラベル0を付与し、それ以外ではラベル1を付与するようにし、推論結果71として、クラス0又はクラス1を推論するようにしてもよい。
In the above description, the classification into
図4は、推論処理を説明するための図である。図4では、シミュレーション部30としてCPU11を機能させるシミュレーションプログラムの一例として、疑似コード31を示している。
FIG. 4 is a diagram for explaining inference processing. FIG. 4 shows pseudo code 31 as an example of a simulation program that causes the
疑似コード31において、“call fstr_Newton”により非線形解析が実行されると、非線形解析部32内で、“call auto_threshold”により、機械学習部40の推論部60が呼び出される。推論部60は、シミュレーションデータ204dをNN270に入力し、推論結果71を得る。得られた推論結果71は、“call auto_threshold”の戻り値として非線形解析部32に渡される。非線形解析部32は、推論結果71に基づいて閾値Thを更新し、“call solve_LINEQ”を実行し、更新された閾値Thで線形ソルバでの処理が行われる。
In the pseudo code 31, when the nonlinear analysis is executed by "call fstr_Newton", the
“call auto_threshold”による推論結果71の取得は、線形ソルバの実行ごとに行わなくてもよい。予め定めた線形ソルバの実行回数ごとに、推論結果71を取得し閾値Thを更新してもよい。
Acquisition of the
上述したような構成において、発明者等は、シミュレーションデータ204dが1GBのデータサイズの場合でオーバーヘッドを検証した。図5は、検証結果のグラフを示す図である。図5において、縦軸に反復ごとのオーバーヘッドを時間(秒)で示し、横軸に反復回数を示している。シミュレーションデータ204dの入出力によるオーバーヘッドが反復ごとに線形解析の処理時間を示している。
In the configuration as described above, the inventors verified the overhead when the
図5のグラフ3aでは、シミュ―レーションにおける線形解析の反復が86回の場合、シミュレーションデータ204dに対するファイルアクセスを伴う処理時間3bを示している。この検証結果から、NN270を用いて閾値Thを調整することで、シミュレーションを高速化できたことが分かる。
Graph 3a of FIG. 5 shows
ところで、前述したように、シミュレーション部30を実現するシミュレーションプログラムと、機械学習部40を実現する機械学習プログラムとは言語が異なっている。一例として、シミュレーションプログラムは、構造解析ソルバであれば、FrontISTR等の科学計算用の手続き型言語のプログラムである。機械学習プログラムについては、Python等のNNを構築するスクリプト言語と、Python等から利用可能なライブラリのKeras等では深層学習言語が使用されている。
By the way, as described above, the language of the simulation program that implements the
そのため、シミュレーション部30のプログラミング言語と、機械学習部40のうち、NN270を利用するスクリプト言語とは、CPU11で実行され、NN270はライブラリとしてGPUmに記憶され、GPU15gによって実行される。
Therefore, the programming language of the
プログラミング言語とスクリプト言語とはCPU11で実行されるがプログラム言語が異なるため、シミュレーションデータ204dと、推論結果71とは、通常、ディスク13に格納し、シミュレーション部30と機械学習部40との間のデータの送受信にはファイルアクセスが行われている。このファイルアクセスは、シミュレーション時間を消費する問題がある。ファイルアクセスとは、具体的には、図4において、推論部60によるシミュレーションデータ204dの取得と、非線形解析部32による推論結果71の取得の際に行われる。
Although the programming language and the script language are executed by the
第1実施例では、このファイルアクセスによる処理時間の消費を改善するための仕組みについて図6及び図7で説明する。シミュレーションデータ204d等のNN270への入力データ及びNNからの戻り値である推論結果71は、共有メモリを介して転送し、ディスク13へのアクセスを回避する。また、閾値Thが更新されるまでシミュレーション部30による共有メモリへのアクセスをブロックする。
In the first embodiment, a mechanism for improving consumption of processing time due to file access will be described with reference to FIGS. 6 and 7. FIG. Input data to the
図6は、第1実施例におけるプロセス間通信によるデータ送受信を説明するための図である。図6中、点線はデータの流れを示し、実線は処理の流れを示す。以下、情報処理装置100は、UNIX系のOS(一例として、LINUX等)を実装している場合で説明するが、OSを限定するものではない。
FIG. 6 is a diagram for explaining data transmission/reception by inter-process communication in the first embodiment. In FIG. 6, dotted lines indicate the flow of data, and solid lines indicate the flow of processing. In the following, the
図6において、反復ループを含む高性能(High-Performance Computing、HPC)アプリケーション230は、処理の反復ごとにシミュレーションデータ204dが出力される。シミュレーションデータ234dは、ここでは、シミュレーション処理の高速化に関する値の調整を行うためにNN270に入力するデータである。
In FIG. 6, a High-Performance Computing (HPC)
高性能アプリケーション232は、高性能アプリケーション230の一部であり、データ転送機能を有する部分に相当する。高性能アプリケーション232は、シミュレーションデータ204dを共有メモリ12aに書き込み(send_data())、名前付きパイプ12bにデータ転送完了を設定する。具体的には、シミュレーションデータ204dの先頭アドレスを設定することによりデータ転送完了を示す。
The
一方、機械学習メインプログラム250は、名前付きパイプ12bから先頭アドレスを読み込み、共有メモリ12aにアクセスしてシミュレーションデータ204dを読み込んで、NN270へ入力する。NN270によるAI推論が実行される。機械学習メインプログラム250は、NN270から推論結果71を得ると、名前付きパイプ12bに推論結果71を設定する。
On the other hand, the machine learning
高性能アプリケーション232は、名前付きパイプ12bから推論結果71を取得し、シミュレーションを続行する。即ち、取得した推論結果71を用いて閾値Thを増減又は維持し(X<-get_AI_prediction())、調整後の閾値Th(変数X)を用いて、シミュレーションを継続する(continue_simulation(X))。
The
図6において、図2のシミュレーション部30、非線形解析部32及び線形解析部34が、それぞれ、高性能アプリケーション230、高性能アプリケーション232、及びcontinue_simulation(X)に相当する。また、図2の機会学習部40は、機械学習メインプログラム250により実現される。以下の説明において、同様の図において同様の対応付けとなる。
6, the
図7は、異種プログラム言語間におけるプロセス間通信の概要を説明するための図である。図7において、シミュレーション38は、シミュレーション部30によって実行される処理であり、仮想メモリアドレス38adを用いてOS仮想メモリ12vを介してメインメモリ12にアクセスする。また、機械学習処理48は、機械学習部40によって実行される処理であり、仮想メモリアドレス48adを用いてOS仮想メモリ12vを介してメインメモリ12にアクセスする。
FIG. 7 is a diagram for explaining an overview of interprocess communication between different types of programming languages. In FIG. 7, the
メインメモリ12には、シミュレーション38により仮想メモリアドレス38adを用いて、ディスク13からNN270の入力データとなるシミュレーションデータ204dが書き込まれる。また、機械学習処理48により仮想メモリアドレス48adを用いてシミュレーションデータ204dがメインメモリ12から読み込まれる。
名前付きパイプ12bは、シミュレーションデータ204dの送受信用に用いる名前付きパイプ12b-1と、推論結果71(即ち、戻り値)の出力用に名前付きパイプ12b-2とを有することが好ましい。
The named
図8は、シミュレーションでAIが利用される場合のプロセス間通信の概要を説明するための図である。図8において、メインメモリ12は、CM領域12m-1と、共有メモリ12aと、名前付きパイプ領域12pと、ML領域12m-2とを有する。
FIG. 8 is a diagram for explaining an overview of interprocess communication when AI is used in simulation. In FIG. 8, the
CM領域12m-1には、シミュレーションプログラムの命令(以下、「シミュレーション命令」という)と処理にデータとが記憶され、ML領域12m-2には、機械学習プログラムの命令(以下、「スクリプト命令」という)とデータとが記憶される。また、共有メモリ12aには、ディスク13からDMA(Direct Memory Access)によりデータ転送されたシミュレーションデータ204dが記憶される。名前付きパイプ領域12pは、名前付きパイプ12b-1と名前付きパイプ12b-2として利用される領域である。
The
CPU11は、CM領域12m-1から順にシミュレーション命令を実行することでシミュレーションを行い、シミュレーションにより得られたシミュレーションデータ204dをディスク13に記憶し、データ転送指示を行う。最新のシミュレーションデータ204dがDMAにより共有メモリ12aへとデータ転送させる。一方、CPU11は、名前付きパイプ領域12内において名前付きパイプ12b-1に先頭アドレスを書き込む。
The
CPU11は、機械学習による閾値Thの調整の学習時及び推論時には、ML領域12、-2から順にスクリプト命令を実行する。CPU11は、NN270に与えるシミュレーションデータ204dを共有メモリ12aから読み出して、入力データとしてNN270に与える。NN270は、GPU14mを用いるGPU14gにより実行される。
The
次に、実装例を図9及び図10に示す。図9は、図6における実装例を示す図である。図9では、図6に対応付けて、図2の機能構成において実装され得るプログラム言語の例を示している。 Next, mounting examples are shown in FIGS. 9 and 10. FIG. FIG. 9 is a diagram showing an implementation example in FIG. FIG. 9 shows an example of a program language that can be implemented in the functional configuration of FIG. 2 in association with FIG.
高性能アプリケーション230及び232は、Fortran言語であるFrontISTRでプログラムされ、高性能アプリケーション230により繰り返し処理がn回行われた場合、シミュレーションデータ204dは、非線形解析の繰り返し(iteration 0 to n-1)ごとの線形解析の残差推移を示すログを含む。また、機械学習メインプログラム250は、スクリプト言語のPythonでプログラムされ、Keras等のAPI(Application Programming Interface)を介してGoogle社製のTensorflowなどによるNN270を利用する。
The high-
図10は、図7における実装例を示す図である。図10では、シミュレーション38は、ニュートン・ラフソン法に基づく処理(ニュートン・ラフソン処理)がFortran、C、又はC++等によりプログラムされ実装される。機械学習処理48は、深層学習処理がPython等によりプログラムされ実装される。
FIG. 10 is a diagram showing an implementation example in FIG. In FIG. 10, the
次に、プロセス間通信による情報処理装置100の処理について図11及び図12で説明する。図11及び図12において、名前付きパイプ12b-1を“sync”で指定し、名前付きパイプ12b-2を“return”で指定する。図11は、シミュレーション処理を説明するためのフローチャート図である。
Next, processing of the
図11より、シミュレーション部30は、シミュレーションプロセスを開始すると、共有メモリ12aを設定し(ステップS311)、Pythonプロセスを起動する(fork)(ステップS312)。共有メモリ12aは、メモリマップトファイルによりOS仮想メモリ12vに展開される。そして、機械学習部40による機械学習が開始する(図12)。
11, when the simulation process is started, the
そして、非線形解析部32は、非線形解析部32により非線形解析ループを開始し(ステップS313)、AI推論を行うか否かを判定する(ステップS314)。第1実施例において、AI推論とは、残差の閾値Thの増減を予測する機械学習処理に相当する。また、AI推論の要否判定の一例として、図4に例示したような“call auto_threshold”による機械学習処理の呼び出しのイベントがあったか否かを判定すればよい。
Then, the
AI推論を行わない場合(ステップS314のNO)、シミュレーション部30は、線形ソルバを実行する(ステップS315)。線形解析部34により線形解析が行われる。その後、シミュレーション部30は、ステップS313へと戻り、非線形解析を繰り返す。一方、AI推論を行う場合(ステップS314のYES)、非線形解析部32は、名前付きパイプ“sync”に接続して、ロック解除を待つ(ステップS317)。
When AI inference is not performed (NO in step S314), the
非線形解析部32は、ロック解除を検出すると、シミュレーションデータ204dを共有メモリ12aにコピーする(書き込む)(ステップS318)。共有メモリ12aにシミュレーションデータ204dがDMAデータ転送により書き込まれる。一方で、非線形解析部32は、機械学習部40を呼び出して調整要求を行う。
Upon detecting unlocking, the
その後、非線形解析部32は、名前付きパイプ“return”から推論結果71を読み込んで取得し(ステップS321)、得られた推論結果71を用いて更新した閾値Thで線形ソルバを実行する(ステップS322)。線形ソルバの処理が終了すると、非線形解析部32は、ステップS313へと戻り、上述した同様の処理を繰り返す。
After that, the
図12は、シミュレーションとの連携において動作する機械学習処理を説明するためのフローチャート図である。図12において、機械学習部40は、Pythonでプログラムされているとする。シミュレーションプロセスからのPythonプロセスの開始に応じて、機械学習部40による機械学習処理が開始される(ステップS410)。また、以下の説明では推論部60による推論処理が行われる場合で説明する。学習部50の学習処理については、第2実施例で詳述する。
FIG. 12 is a flowchart for explaining machine learning processing that operates in cooperation with simulation. In FIG. 12, it is assumed that the
機械学習部40は、共有メモリ12aを設定し(ステップS411)、推論部60は、訓練済みモデルをロードする(ステップS412)。共有メモリ12aは、シミュレーションプロセスと同じメモリマップトファイルにより設定される。練済みモデルとは、学習部50により訓練済みのNN270に相当する。
The
そして、推論部60は、無限ループを開始する(ステップS413)。無限ループの開始により、名前付きパイプ“sync”に接続する(ステップS414)。名前付きパイプ“sync”への接続により、非線形解析部32へロック解除が通知される。推論部60は、新たな調整要求があるか否かを判断する(ステップS415)。
Then, the
推論部60は、NN270にするためにシミュレーションデータ204dから入力データを構築し(ステップS17)、入力データをNN270へと入力して閾値Thの調整方向を推論する(ステップS418)。
The
次に、プロセス間通信を例を用いて説明する。図13及び図14は、シミュレーションのメインプロセスにおけるプロセス間通信に係る処理の一例を説明するための図である。 Inter-process communication will now be described using an example. 13 and 14 are diagrams for explaining an example of processing related to inter-process communication in the main process of simulation.
図13より、シミュレーション部30は、シミュレーションの開始時に共有メモリ12aを設定する(ステップS351)。そして、シミュレーション部30は、Pythonプロセスを起動(fork)する(ステップS352)。Python子プロセスが起動し、Python子プロセスと共有メモリ12aを共有するために、共有メモリアドレスとタイミングとが通知される。タイミングは、調整要求が行われるタイミングを指定する。タイミングが2を示す場合、非線形解析を2回行うごとに調整要求がなされることを示す。
From FIG. 13, the
シミュレーション部30は、線形解析用の閾値lin_thを初期化する(ステップS353)。閾値lin_thは、図2の閾値Thに相当する変数である。閾値lin_thの初期設定値は、シミュレーション部30のプログラムに組み込まれていても良いし、シミュレーション開始時に、ユーザにより設定されてもよい。
The
閾値lin_thが初期設定されると、シミュレーションループが開始される(ステップS354)。即ち、非線形解析部32による非線形解析処理が、定めた回数(#nonlin_iter)分繰り返されるように、繰り返し回数を示すイテレーションの値に#nonlin_iterが設定される。#nonlin_iterの初期値は0であるため、初期設定時にはイテレーションの値に0が設定される。そして、非線形解析部32は、前処理を実行する(ステップS355)。具体的な前処理の内容は、ステップS356からS361で説明する。
When the threshold lin_th is initialized, a simulation loop is started (step S354). That is, #nonlin_iter is set to the iteration value indicating the number of repetitions so that the nonlinear analysis processing by the
イテレーションの値が0であるか否かが判断される(ステップS356)。同時に、機械学習部40へ閾値Thの調整要求が送信される。イテレーションの値が0である場合(ステップS356のYES)、非線形解析部32は、ステップS362へと進む。
It is determined whether or not the iteration value is 0 (step S356). At the same time, a request for adjusting the threshold value Th is sent to the
一方、イテレーションの値が0でない場合(ステップS356のNO)、非線形解析部32は、ライトモードで名前付きパイプ“sync”をオープンする(ステップS357)。非線形解析部32は、機械学習部40からのロック解除を待って、共有メモリ12aへの書き込みを開始する。
On the other hand, if the iteration value is not 0 (NO in step S356), the
ロック解除の検出に応じて、非線形解析部32は、共有メモリ12aにシミュレーションデータ204dを書き込む(ステップS358)。ディスク13に蓄積されたシミュレーションデータ204dが共有メモリ12aにDMAデータ転送によりコピーされる。
Upon detection of unlocking, the
次に、非線形解析部32は、以下のW1~W4の手順で共有メモリ12aへの書き込みを行う。以下の説明において、共有メモリ12aが24(=4×6)セルの例で説明するが、このメモリサイズに限定するものではない。
Next, the
また、addresss_1は#nonlin_iter(非線形解析の繰り返し回数)が記憶されるセルのアドレスを示し、addresss_2は#lin_iter(線形解析の反復回数)が記憶されるセルのアドレスを示し、addresss_3は非線形解析データの先頭アドレスを示す。非線形解析データは、非線形解析を繰り返すごとに蓄積されるため、セル数が累積される。そのため、線形解析データの開始アドレスは、addresss_3に#nonlin_iterを加算した値で示される。 Also, addresses_1 indicates the address of the cell where #nonlin_iter (number of iterations of nonlinear analysis) is stored, addresses_2 indicates the address of the cell where #lin_iter (number of iterations of linear analysis) is stored, and addresses_3 indicates the address of the nonlinear analysis data. Indicates the starting address. Since the nonlinear analysis data is accumulated each time the nonlinear analysis is repeated, the number of cells is accumulated. Therefore, the start address of the linear analysis data is indicated by adding #nonlin_iter to addresses_3.
W1:addresss_3から非線形データを書き込む。
W2:addresss_3に#nonlin_iterを加算したアドレスから線形データを書き込む。
W3:addresss_1に#nonlin_iterを記憶する。#nonlin_iterが更新される。
W4:addresss_2に#lin_iterを記憶する。#lin_iterが更新される。
非線形データ及び線形データを書き込み後に、カウンタとなる#nonlin_iter及び#lin_iterを更新する。W1~W4の終了で、新たなデータの書き込みが完了したこととなる。
W1: Write non-linear data from addresses_3.
W2: Write linear data from an address obtained by adding #nonlin_iter to addresses_3.
W3: Store #nonlin_iter in addresses_1. #nonlin_iter is updated.
W4: Store #lin_iter in addresses_2. #lin_iter is updated.
After writing the nonlinear data and linear data, #nonlin_iter and #lin_iter, which are counters, are updated. At the end of W1 to W4, writing of new data is completed.
図14より、非線形解析部32は、リードモードで名前付きパイプ“return”をオープンする(ステップS359)。機械学習部40によるロック解除に応じて、非線形解析部32は、名前付きパイプ“return”から値を読み出して今回の推論結果71を取得する(ステップS360)。
14, the
そして、非線形解析部32は、得られた推論結果と前回の閾値lin_thとから、今回の閾値lin_thを取得する(ステップS361)。一例として、閾値lin_thを推論結果に基づいて更新する処理部(algorithm)を備えるようにすればよい。
Then, the
更新により今回の閾値lin_thを取得すると、ステップS356の条件節を抜けて、非線形解析部32は、線形解析部34に線形解析を行わせ、線形解析結果を得る(ステップS362)。線形解析部34に対して今回の閾値lin_thが通知される。そして、繰り返し回数iterationを1インクリメントする(ステップS364)。
When the current threshold lin_th is obtained by updating, the
非線形解析部32は、非線形解析が収束条件に達したか否かを判断する(ステップS364)。非線形解析が収束条件に達していない場合(ステップS364のNO)、非線形解析部32は、図13のステップS356へと戻り、上述した同様の処理を繰り返す。一方、非線形解析が収束条件に達した場合(ステップS364のYES)、非線形解析部32は、シミュレーションループを終了する。
The
シミュレーションループが終了すると、シミュレーション部30は、ライトモードで名前付きパイプ“sync”をオープンする(ステップS365)。そして、このメインプロセスが終了する。
When the simulation loop ends, the
図15は、Python子プロセスにおけるプロセス間通信に係る処理の一例を説明するための図である。図15において、シミュレーション部30からの共有メモリアドレスとタイミングとの通知に応じて、Python子プロセスが起動し、Python子プロセス内で、機械学習部40による閾値Thの調整に係る機械学習が行われる。
FIG. 15 is a diagram for explaining an example of processing related to inter-process communication in a Python child process; In FIG. 15, a Python child process is activated in response to notification of a shared memory address and timing from the
機械学習部40は、シミュレーション部30から通知された共有メモリアドレスに基づいて、共有メモリ12aを設定し(ステップS471)、訓練済みモデルをロードする(ステップS472)。そして、機械学習部40による無限ループが開始される(ステップS473)。各無限ループにおいて行われる処理内容は、ステップS474~S483で説明する。
The
機械学習部40は、リードモードで名前付きパイプ“sync”をオープンする(ステップS474)。シミュレーションメインプロセス(シミュレーション部30)にロック解除が通知される。機械学習部40は、新たな調整要求の有無判定ループを行う(ステップS475)。
The
即ち、機械学習部40は、解析回数を示す#nonlin_iterと#lin_iterとを共有メモリ12aから読み出して(ステップS476)、データが書き込まれているか否かを判定する(ステップS477)。具体的には、以下のような処理を行う。
That is, the
#nonlin_iterが前回の非線形解析回数にタイミングを加算した値に一致しない(条件A)、又は、#lin_iterが前回の線形解析回数と一致する場合(条件B)、カウントを1インクリメントする。条件Aと条件Bの両方が成立する場合、又は、カウントの更新後、現在のカウントが設定値(例えば、“1000”)以上の場合、機械学習部40は、新たな調整要求はないと判断し、Pythonプログラムを終了する。
If #nonlin_iter does not match the previous nonlinear analysis count plus timing (condition A), or if #lin_iter matches the previous linear analysis count (condition B), the count is incremented by one. If both condition A and condition B are satisfied, or if the current count is equal to or greater than a set value (eg, "1000") after updating the count, the
一方、条件A及び条件Bが成立しない場合、即ち、データの書き込みが確認できた場合、機械学習部40は、新たな調整要求があると判断し、この新たな調整要求の有無判定ループから抜けて(ステップS478)、共有メモリ12aからデータを読み込む(ステップS479)。
On the other hand, if condition A and condition B are not satisfied, that is, if data writing can be confirmed, the
推論部40は、推論に用いる入力データを構築し(ステップS480)、NN270を用いて閾値Thの調整を推論する(ステップS481)。NN270は、Kerase等であり、GPU14gで動作する。推論部40から推論結果71が出力される。
The
機械学習部40は、ライトモードで名前付きパイプ“return”をオープンし(ステップS482)、“return”モードで推論結果を名前付きパイプ“return”に書き込む。その後、無限ループを終了させて、機械学習部40による処理を終了する。Python子プロセスが終了する。
The
図16は、プロセス間通信における状態例を示す図である。調整要求が行われるタイミングは2であるとする。図16(A)では、シミュレーションが4回繰り返された直後の共有メモリ12aの状態例を示している。共有メモリ12a内には、#nonlin_iterは4回を示し、非線形解析データは4個のセルに書き込まれている。また、#lin_iterは12回を示し、線形解析データは12個のセルに書き込まれている。
FIG. 16 is a diagram showing a state example in interprocess communication. Assume that the timing at which an adjustment request is made is 2. FIG. 16A shows an example of the state of the shared
機械学習部40の状態は、現在の#nonlin_iterは2回であると認識し、#lin_iterは6回であると認識しているものとする。タイミングは2であるとする。この場合、現在の#nonlin_iter「2回」とタイミング「2」とを加算して得た値「4」が、共有メモリ12aの#nonlin_iter「4回」と一致する。また、現在の#lin_iter「6回」と#lin_iter「12回」とは一致しない。この場合に新たな調整要求があったと判定する。
It is assumed that the
図16(B)では、シミュレーションによりデータ書き込まれたが、カウンタ更新されていない状態例を示している。共有メモリ12a内には、#nonlin_iterは4回を示し、非線形解析データは6個のセルに記憶されている。また、#lin_iterは12回を示し、線形解析データは16個のセルに記憶されている。
FIG. 16B shows an example of a state in which data has been written by simulation but the counter has not been updated. In the shared
非線形解析を2回行って、それぞれの結果が各セルに書き込まれ、合計6個のセルが利用されている状態である。図16(A)で更新された閾値Thを用いて、線形解析が2回実行され、実行ごとに2個のセルに線形解析データが書き込まれるため、前回までのデータを含めて全体で16個のセルが利用された状態である。#lin_iterは未更新の状態である。 The nonlinear analysis is performed twice and each result is written to each cell, so that a total of 6 cells are used. Using the threshold value Th updated in FIG. 16A, linear analysis is executed twice, and linear analysis data is written to two cells each time. cells are in use. #lin_iter is in an unupdated state.
機械学習部40の状態は、現在の#nonlin_iterは4回であると認識し、#lin_iterは12回であると認識している。この場合、現在の#nonlin_iter「4回」とタイミング「2」とを加算して得た値「6」が、共有メモリ12aの#nonlin_iter「4回」と一致しない。一方、現在の#lin_iter「12回」と#lin_iter「12回」とは一致する。この場合には新たな調整要求はないと判定する。
The
図16(C)では、データ書き込み完了後、シミュレーションがカウンタを共有メモリに記憶した状態例を示している。共有メモリ12a内には、#nonlin_iterは6回に更新されている。また、#lin_iterは16回に更新されいる。
FIG. 16C shows an example of a state in which the simulation has stored the counter in the shared memory after data writing is completed. #nonlin_iter is updated 6 times in the shared
機械学習部40の状態は、現在の#nonlin_iterは4回であると認識し、#lin_iterは12回であると認識している。この場合、現在の#nonlin_iter「4回」とタイミング「2」とを加算して得た値「6」が、共有メモリ12aの#nonlin_iter「6回」と一致する。また、現在の#lin_iter「12回」と#lin_iter「12回」とは一致する。この場合には新たな調整要求があったと判定する。
The
図17は、オーバーヘッドの検証結果例を示す図である。図17において、横軸にシミュレーション(即ち、非線形解析)の繰り返し回数を示し、縦軸に繰り返し当たりのオーバーヘッドの時間を示している。 FIG. 17 is a diagram illustrating an example of overhead verification results. In FIG. 17, the horizontal axis indicates the number of iterations of the simulation (that is, the nonlinear analysis), and the vertical axis indicates the overhead time per iteration.
動作環境は、データサイズは1GBの場合に、オーバーヘッド17aは、第1実施例による共有メモリ12aを用いて、シミュレーション部30と機械学習部40との間で共有するデータをメモリマップトファイルとしたことによるオーバーヘッドを示し、オーバーヘッド17bは、ディスク13への入出力により掛かったオーバーヘッドを示している。
As for the operating environment, when the data size is 1 GB, the overhead 17a is caused by using the shared
オーバーヘッド17bの合計と、第1実施例におけるオーバーヘッド17aから、第1実施例により、オーバーヘッドを削減できたことが分かる。 From the total overhead 17b and the overhead 17a in the first embodiment, it can be seen that the overhead can be reduced by the first embodiment.
更に、データサイズの違いによりオーバーヘッドを検証した結果を図18及び図19で示す。 Furthermore, FIG. 18 and FIG. 19 show the results of verifying the overhead due to the difference in data size.
図18は、ディスクへの入出力によるデータサイズごとの検証結果を示す図である。図18では、データサイズごとの、オーバーヘッドとシミュレーションのそれぞれの時間と、オーバーヘッドが全時間に占める割合とが示されている。 FIG. 18 is a diagram showing verification results for each data size by input/output to/from a disk. FIG. 18 shows the respective times of overhead and simulation for each data size, and the ratio of the overhead to the total time.
図19は、ディスクへの入出力によるデータサイズごとの検証結果を示す図である。図18では、データサイズごとの、オーバーヘッドとシミュレーションのそれぞれの時間と、オーバーヘッドが全時間に占める割合とが示されている。 FIG. 19 is a diagram showing verification results for each data size in input/output to/from a disk. FIG. 18 shows the respective times of overhead and simulation for each data size, and the ratio of the overhead to the total time.
上述したように、機械学習を用いたシミュレーションにおいて、第1実施例による処理時間を明らかに短縮することができる。 As described above, in simulations using machine learning, the processing time according to the first embodiment can be clearly shortened.
以下に、第2実施例において、機械学習による閾値Thの調整精度を向上させる仕組みについて詳述する。 A mechanism for improving the adjustment accuracy of the threshold value Th by machine learning in the second embodiment will be described in detail below.
[第2実施例]
第2実施例では、線形解析を反復的に解くことで解を求める非線形解析による、構造解析、流体解析等のシミュレーションにおいて、シミュレーションの実行状況に応じて、線形解析における収束判定に用いる閾値Thを、機械学習により動的に調整する。
[Second embodiment]
In the second embodiment, in the simulation of structural analysis, fluid analysis, etc. by nonlinear analysis that finds a solution by repeatedly solving linear analysis, the threshold value Th used for determining convergence in the linear analysis is set according to the execution status of the simulation. , dynamically adjusted by machine learning.
図20は、非線形解析を説明するための図である。線形解析を行う線形ソルバでは反復法にCG法を用いて解を求めることが多い。図20より、反復用では、収束条件を満たすまで解ベクトルxを繰り返し更新していく。収束条件の一つに残差の閾値Thが用いられる。残差は、残差ベクトルrのノルムで表され、残差ベクトルrは、r0=b-Axで初期化される。この残差が閾値Th以下になった時点で解ベクトルxが収束したとみなされ反復を終了する。 FIG. 20 is a diagram for explaining nonlinear analysis. A linear solver that performs linear analysis often finds a solution using a CG method as an iterative method. From FIG. 20, for iteration, the solution vector x is repeatedly updated until the convergence condition is satisfied. A residual threshold Th is used as one of the convergence conditions. The residual is expressed by the norm of the residual vector r, which is initialized with r 0 =b−Ax. When the residual becomes equal to or less than the threshold Th, it is considered that the solution vector x has converged, and the iteration ends.
閾値Thは、解の精度と実行時間に影響を与える。閾値を小さくするほど解の精度が高くなるが、反復回数が増加して実行時間が増加するため、求める精度の解をできるだけ少ない反復回数で得られるような閾値を設定することが好ましい。しかしながら、閾値Thは、経験則又はヒューリスティックに基づいたユーザの判断によって設定されている。したがって、最適な残差の閾値Thを機械学習により高速に推定し、非線形解析全体(即ち、シミュレーション全体)を高速化する手法について説明する。 The threshold Th affects solution accuracy and execution time. The smaller the threshold value, the higher the accuracy of the solution, but the number of iterations increases and the execution time increases. Therefore, it is preferable to set the threshold value so that the solution with the required accuracy can be obtained with as few iterations as possible. However, the threshold Th is set by the user's judgment based on empirical rules or heuristics. Therefore, a method of estimating the optimum residual threshold Th at high speed by machine learning and speeding up the entire nonlinear analysis (that is, the entire simulation) will be described.
図21は、第2実施例における情報処理装置の第1の機能構成例において学習部の概要を説明するための図である。図21において、情報処理装置100は、主に、シミュレーション部30と、機械学習部40とを有する。メインメモリ12には、問題データ2、ログデータ4c、候補閾値3、基準閾値3ref、学習データ6g等を記憶する。メインメモリ12の一部が共有メモリ12aとして利用されることは、第1実施例で説明した通りである。
FIG. 21 is a diagram for explaining an outline of a learning unit in the first functional configuration example of the information processing apparatus according to the second embodiment. In FIG. 21,
シミュレーション部30は、図2で説明したように、非線形解析部32と、線形解析部34とを有し、線形解析の反復ごとの残差と時刻とを取得し、ログデータ4cを出力する。ログデータ4cには、閾値Th内に残差が収束するまで反復して実行された線形解析時の残差と時間とが非線形解析の所定の繰り返し回数分記録されている。
The
また、シミュレーション部30は、学習部50から呼び出された場合には、学習部50から与えられた閾値Th固定でシミュレーションを行う。即ち、機械学習を用いないシミュレーションが行われる。具体的には、図4の疑似コード31内の“call auto_threshold”を無効にしてシミュレーションが行われる。
Further, when called by the
機械学習部40は、図4に示すようにNN270により閾値Thの調整を学習する学習部50と、シミュレーション中の閾値Thの調整を行う推論部60とを有する。推論部60については図22で説明する。
The
学習部50は、シミュレーション部30が、問題データ2ごとに、候補閾値3の複数の候補閾値3のそれぞれを与えて得られたログデータ4cを用いて、閾値Thを調整するNN270を学習する。複数の候補閾値3のそれぞれをシミュレーション部30に与えてシミュレーションを行わせてログデータ4c取得しておく。又は、学習部50が、複数の候補閾値3のそれぞれに対してシミュレーションを行わせる処理部を有するようにしてもよい。
The
学習部50は、選択した候補閾値3をシミュレーション部30に与えることで、シミュレーション部30に、問題データ2に対するシミュレーションを行わせる。シミュレーション部30は、線形解析の反復ごとに掛かった時間と残差rとを表すログデータ4cを出力する。候補閾値3ごとに得られたログデータ4cを得られる。ログデータ4cの入出力には、第1実施例で説明したような共有メモリ12aを用いた同様のプロセス間通信で行ってもよい。
The
学習部50は、候補閾値3ごとに得られたログデータ4cを参照して、反復ごとの残差推移、演算時間などを用いて、候補閾値3の中から基準閾値3refを決定し、メインメモリ12に記憶する。
The
学習部50は、ログデータ4cごとに、基準閾値3refに基づいてラベルを付与し、学習データ6gを作成する。ラベル付けは、ログデータ4cの候補閾値3と基準閾値3refとの比較結果に基づいて行われる。
The
ラベル付けの一例として、基準閾値3refより小さい候補閾値3のログデータ4cにはラベル「1」を付与し、基準閾値3refより大きい候補閾値3のログデータ4cにはラベル「3」を付与する。学習部50は、基準閾値3refと一致する候補閾値3を使用したログデータ4cには、ラベル「2」を付与する。
As an example of labeling, the
学習部50では、学習データ6gから入力データ6gを構築しNN270に入力し推論結果71を得ると、学習データ6gに付与されているラベルと比較して得られた誤差がNN270にフィードバックされる。学習部50は、シミュレーション部30よって得られた全てのログデータ4cを用いてNN270を学習する。
In the
図22は、第2実施例における情報処理装置の第1の機能構成例において推論部の概要を説明するための図である。図22において、情報処理装置100では、推論時には、主に、シミュレーション部30と、機械学習部40の推論部60とが動作する。メインメモリ12には、問題データ2、ログデータ4c、シミュレーション結果5、閾値Th、推論結果71等を記憶する。ここでは推論部60について説明する。
FIG. 22 is a diagram for explaining an outline of an inference unit in the first functional configuration example of the information processing apparatus in the second embodiment. In FIG. 22, in the
シミュレーション部30は、未知の問題データ2を解析し、得られたログデータ4cを出力する。ログデータ4cは、第1実施例におけるシミュレーションデータ204dに相当し、メモリマップトファイルとして扱えばよい。ログデータ4cは、共有メモリ12aに記憶され、名前付きパイプ12b-1にログデータ4cの先頭アドレスが指定される。
The
推論部60は、シミュレーション部30の非線形解析部32からの呼び出しに応じて、シミュレーション部30によって得られたログデータ4cを用いて、訓練済みのNN270を用いて閾値Thの増減を推論し、得られた推論結果71を出力する。推論結果71は、非線形解析部32へと戻り値として通知される。戻り値は、名前付きパイプ12b-2に設定されればよい(図7、図11)。
In response to a call from the
次に、基準閾値3refの決定例について説明する。一例として、予め、候補閾値ごとのシミュレーション時間を検証し、得られた実行時間のうち最短の実行時間であった候補閾値3を基準閾値3refに設定すればよい。
Next, an example of determining the reference threshold value 3ref will be described. As an example, the simulation time for each candidate threshold may be verified in advance, and the
図23は、候補閾値ごとのシミュレーション時間の検証例を示す図である。 FIG. 23 is a diagram illustrating an example of simulation time verification for each candidate threshold.
それぞれの候補閾値3でシミュレーションを行ったときのシミュレーション時間から、最も短かった候補閾値が基準閾値3refに設定される。このように定めた基準閾値3refを境界として、境界に基づいて閾値の変更を決定する。
The shortest candidate threshold is set as the
図24は、第1の機能構成例における学習処理を説明するためのフローチャート図である。図24において、機械学習部40では、学習部50が、複数の候補閾値3を順にシミュレーション部30に与え、シミュレーションを行わせて、候補閾値3ごとのログデータ4cを取得する(ステップS1110)。ログデータ4cは、線形解析の反復ごとの残差とシミュレーションの実行時間とを含む。
FIG. 24 is a flowchart for explaining the learning process in the first functional configuration example. In FIG. 24, in the
ログデータ4cを取得すると、学習部50は、複数のログデータ4cの中から、最短時間でシミュレーションを終了した候補閾値3を特定する(ステップS1120)。そして、学習部50は、特定した候補閾値3を基準閾値3refとして設定し、基準閾値3refと、候補閾値3との大小関係に基づいて、ログデータ4cにラベル付けを行って学習データ6gを生成する(ステップS1130)。
After obtaining the
学習部50は、生成した学習データ6gを用いてNN270を学習する(ステップS1150)。学習部50は、複数の問題データ2に対して、候補閾値3の異なる学習データ6gを用いた学習を終えると、この学習処理を終了する。
The
一方、シミュレーション30では、閾値候補3の受信に応じてシミュレーションを開始し、問題データ2を1つ読み込んで、閾値候補3を閾値Thに設定する。そして、非線形解析部32が非線形解析の前処理を行う(ステップS2011)。
On the other hand, in the
次に、線形解析部34が前処理を行ったのち(ステップS2012)、線形解析による近似解を計算し(ステップS2013)、得られた残差と時刻とをメインメモリ12に記憶する(ステップS2014)。線形解析部34は、閾値Th(=候補閾値3)を用いて線形解析の解が収束したか否かの収束判定を行う(ステップS2015)。収束していないと判定した場合(ステップS2015のNO)、線形解析部34は、ステップS2013へと戻り上述した同様の処理を繰り返す。
Next, after the
収束したと判定した場合(ステップS2015のYES)、非線形解析部32は、非線形解析の後処理(近似解の計算)を行い(ステップS2016)、非線形解析の解が収束したか否かの収束判定を行う(ステップS2017)。非線形解析の収束判定では、非線形解析用の閾値を用いて判定する。
If it is determined that convergence has occurred (YES in step S2015), the
その結果、収束していないと判定した場合(ステップS2017のNO)、非線形解析部32は、ステップS2011へと戻り上述した同様の処理を繰り返す。一方、収束したと判定した場合(ステップS2017のYES)、シミュレション部30は、シミュレーション終了時刻をメインメモリ12に記憶して、このシミュレーションを終了する。シミュレーション終了時には、残差を0とし、シミュレーション終了時刻を記憶してもよい。
As a result, when it is determined that the convergence has not occurred (NO in step S2017), the
シミュレーション部30は、機械学習部40の学習部50に、問題データ2それぞれのシミュレーションの終了ごとに終了を通知してもよいし、最後の候補閾値3に対するシミュレーションが終了してから終了を通知してもよい。或いは、シミュレーション部30は、問題データ2と候補閾値3の全ての組み合せに対してログデータ4cを出力してから、学習部50にシミュレーションの終了を通知してもよい。第2実施例における他の機能構成例についても同様である。
The
図25は、第1の機能構成例における推論処理を説明するためのフローチャート図である。図25において、シミュレーション部30の起動時に、ミュレーション時間はリセットされ、時間計測が開始される。
FIG. 25 is a flowchart for explaining inference processing in the first functional configuration example. In FIG. 25, when the
シミュレーション部30は、シミュレーション開始時に閾値Thを初期設定し、非線形解析部32は、非線形解析の前処理を行う(ステップS3011)。そして、線形解析部34は、線形解析の前処理を行い(ステップS3012)、線形解析の近似解を計算し(ステップS3013)、閾値Thを用いて線形解析の解が収束したか否かの収束判定を行う(ステップS3014)。収束していないと判定した場合(ステップS3014のNO)、線形解析部34は、ステップS3013へと戻り上述した同様の処理を繰り返す。
The
収束したと判定した場合(ステップS3014のYES)、非線形解析部32は、非線形解析の後処理(近似解の計算)を行い(ステップS3015)、非線形解析の解が収束したか否かの収束判定を行う(ステップS3016)。非線形解析の収束判定では、非線形解析用の閾値を用いて判定する。
If it is determined that convergence has occurred (YES in step S3014), the
その結果、収束していないと判定した場合(ステップS3016のNO)、非線形解析部32は、調整要求を発行し、推論部60に閾値Thの調整を推論させて、得られた推論結果71を用いて閾値Thを更新し(ステップS3017)、ステップS3011へと戻り上述同様の処理を繰り返す。収束したと判定した場合(ステップS3016のYES)、非線形解析部32は、ステップS3013へと戻り上述した同様の処理を繰り返す。
As a result, when it is determined that convergence has not occurred (NO in step S3016), the
一方、推論部60は、調整要求に応じて、直近で得られたログデータ4cから現在の線形解析の閾値Thが基準閾値3refより低いか高いかを訓練済みNN270を用いて推論する(ステップS4010)。推論部60は、得られた推論結果71を出力し(ステップS4020)、この推論処理を終了する。
On the other hand, in response to the adjustment request, the
上記第1の機能構成例では、ログデータ4cをそのまま用いたが、ログデータ4cを定めた区間ごとに区切って学習させることによりデータ拡張を行い、第1の機能構成例における閾値Thの調整精度を向上させ得ることを可能とする。
In the first functional configuration example, the
第1の機能構成例では、クラス1、2、及び3に分類する場合を例としたが、閾値Thを上げる場合とそれ以外の場合のみに分類してもよい。その場合には、学習部40では、学習時に候補閾値3が基準閾値3refより低い場合にラベル0を付与し、それ以外ではラベル1を付与するようにし、推論結果71として、クラス0又はクラス1を推論するようにしてもよい。また、非線形解析部32は、内部に線形ソルバを含むような定常解析であってもよい。以下の第2の機能構成例においても同様である。
In the first functional configuration example, classification into
図26は、第2実施例における情報処理装置の第2の機能構成例において学習部の概要を説明するための図である。図26中、図21と同様の処理部及びデータには同様の符号を付し、それらの説明を省略する。第2実施例では、残差曲線を一定区間ごとに区切ることで複数の入力データを作成し学習する。ログデータ4cに含まれる残差曲線を表すデータを残差曲線データ4dというものとする。
FIG. 26 is a diagram for explaining an outline of a learning unit in the second functional configuration example of the information processing apparatus according to the second embodiment. In FIG. 26, the same processing units and data as those in FIG. 21 are denoted by the same reference numerals, and the description thereof is omitted. In the second embodiment, a plurality of pieces of input data are created and learned by dividing the residual curve into certain sections. The data representing the residual curve included in the
学習部50は、第1の機能構成例と同様に、シミュレーション部30が、問題データ2ごとに、候補閾値3の複数の候補閾値3のそれぞれを与えて得られた複数の残差曲線データ4dのから基準閾値3refを決定する。学習部50は、最短時間でシミュレーションを終了した候補閾値3を特定し、基準閾値3refとする。また、学習部50は、残差曲線データ4dの候補閾値3が基準閾値3refより小さいか否かに基づいてラベルを決定する。
Similar to the first functional configuration example, the
その後、第2の機能構成例では、学習部50は、残差曲線データ4dを定めた区間ごとに区切って複数の入力データ6aを作成し、複数の入力データ6aのそれぞれに、残差曲線データ4dに対して決定したラベルを付与して、複数の学習データ6gを生成する。ラベル付けは上述した通りである。
After that, in the second functional configuration example, the
学習部50は、生成した一つ一つの学習データ6gをNN270に入力して得られた推測結果71と学習データ6gに付与されたラベルとの誤差を、NN270にフィードバックし、NN270の正解精度を改善する。
The
図27は、第2実施例における情報処理装置の第1の機能構成例において推論部の概要を説明するための図である。図27において、情報処理装置100では、推論時には、主に、シミュレーション部30と、機械学習部40の推論部60とが動作する。メインメモリ12には、問題データ2、残差曲線データ4d、閾値Th、推論結果71等を記憶する。メインメモリ12の一部が共有メモリ12aとして利用されることは、第1実施例で説明した通りである。ここでは推論部60について説明する。
FIG. 27 is a diagram for explaining an outline of an inference unit in the first functional configuration example of the information processing apparatus according to the second embodiment. In FIG. 27, in the
シミュレーション部30は、残差曲線データ4dを出力し、推論部60は、シミュレーション部30の非線形解析部32からの調整要求に応じて、シミュレーション部30によって得られた残差曲線データ4dを用いて、訓練済みのNN270により閾値Thの増減を推論し、得られた推論結果71を出力する。推論結果71は、非線形解析部32へと戻り値として通知される。
The
訓練済みのNN270を用いる際に、推論部60は、シミュレーション部30の非線形解析部32からの調整要求に応じて、シミュレーション部30によって得られた残差曲線データ4dを用いて、訓練済みのNN270により閾値Thの増減を推論し、得られた推論結果71を出力する。推論結果71は、非線形解析部32へと戻り値として通知される。
When using the trained
図28は、第2の機能構成例における学習処理の第1の例を説明するためのフローチャート図である。図28中、図24と同様の内容には同一ステップ番号を付し、その説明を省略する。図28において、機械学習部40では、学習部50が、複数の候補閾値3を順にシミュレーション部30に与え、シミュレーションを行わせて、候補閾値3ごとの残差曲線データ4dを取得する(ステップS1110)。残差曲線データ4dは、線形解析の反復ごとの残差とシミュレーションの実行時間とを含む。
FIG. 28 is a flowchart for explaining a first example of learning processing in the second functional configuration example. In FIG. 28, the same step numbers are given to the same contents as in FIG. 24, and the description thereof is omitted. In FIG. 28, in the
残差曲線データ4dを取得すると、学習部50は、複数の残差曲線データ4dの中から、最短時間でシミュレーションを終了した候補閾値3を特定する(ステップS1120)。そして、学習部50は、特定した候補閾値3を基準閾値3refとして設定し、基準閾値3refと、候補閾値3との大小関係に基づいて、残差曲線データ4dに対するラベルを決定する(ステップS1131)。
After obtaining the
学習部50は、残差曲線を一定区間ごとに区切って複数の入力データ6aを作成し、作成した複数の入力データのそれぞれにS1130で決定したラベルを付与して、学習データ6gを生成する(ステップS1140)。
The
学習部50は、生成した学習データ6gを用いてNN270を学習する(ステップS1150)。学習部50は、複数の問題データ2に対して、候補閾値3の異なる学習データ6gを用いた学習を終えると、この学習処理を終了する。
The
シミュレーション30による処理は、第1の機能構成例における処理(図24)と同様であるため、その説明を省略する。
The processing by the
図29は、第2の機能構成例における推論処理を説明するためのフローチャート図である。図29中、図25と同様の内容には同一ステップ番号を付し、その説明を省略する。第2の機能構成例では、シミュレーション部30による、推論結果71を用いた、閾値Thの調整例について説明する。推論部60による処理は第1の機能構成例と同様であるため、その説明を省略する。
FIG. 29 is a flowchart for explaining inference processing in the second functional configuration example. In FIG. 29, the same step numbers are given to the same contents as in FIG. 25, and the description thereof is omitted. In the second functional configuration example, an example of adjusting the threshold Th using the
図29において、非線形解析部32は、残差曲線データ4dを指定して調整要求を調整部60に行うことで、調整部60から得た推論結果71に従って、線形解析の残差閾値の変化率n又は1/nで閾値Thを調整し(ステップS3018)、ステップS3011へと戻り上述同様の処理を繰り返す。
In FIG. 29, the
ステップS3018では、具体的には、変化率n(nは2以上の自然数)を用いて、推論結果71が閾値Thを上げることを示す場合、非線形解析部32は、閾値Thをn倍する。一方、下げる場合、非線形解析部32は、閾値Thを1/n倍(変化率の逆数倍)する。他の例として、推論結果71が閾値Thを上げることを示さない場合に閾値Thを1/n倍してもよい。
Specifically, in step S3018, the
図30は、第2の機能構成例における学習処理の第2の例を説明するためのフローチャート図である。図30中、図28と同様の内容には同一ステップ番号を付し、その説明を省略する。学習処理の第2の例では、候補閾値3から基準閾値3refを特定するのではなく、問題データ2ごとに、複数の候補閾値3間のシミュレーション結果5の比較から基準閾値3refを作成する。
FIG. 30 is a flowchart for explaining a second example of learning processing in the second functional configuration example. In FIG. 30, the same step numbers are given to the same contents as in FIG. 28, and the description thereof is omitted. In the second example of the learning process, instead of specifying the reference threshold 3ref from the
図30において、機械学習部40では、学習部50が、複数の候補閾値3を順にシミュレーション部30に与え、シミュレーションを行わせて、候補閾値3ごとの残差曲線データ4dとシミュレーション結果5とを取得する(ステップS1112)。残差曲線データ4dは、線形解析の反復ごとの残差とシミュレーションの実行時間とを含む。
In FIG. 30 , in the
学習部50は、問題データ2ごとに、それぞれの候補閾値3でのシミュレーション結果5に対して、最も候補閾値3が低いときのシミュレーション結果5との結果誤差を計算する(ステップS1123)。結果誤差の算出例として、学習部50は、シミュレーション結果5の各要素ごとに、同一問題で最も候補閾値3が低いときの要素の値との差を算出して平均絶対誤差(MAE:Mean Absolute Error)を算出して、結果誤差を求める。
The
そして、学習部50は、問題データ2ごとに、結果誤差と実行時間とを、候補閾値3ごとに比較した結果に基づいて、基準閾値3refを設定し、基準閾値3refと、候補閾値3との大小関係に基づいて、残差曲線データ4dに対するラベルを決定する(ステップS1145)。基準閾値3refの決定方法の一例として、学習部50は、結果誤差(即ち精度)と実行時間(即ち速度)の両方を参照し、予め定めた条件に最も近い候補閾値3を求める。条件の例として、ユーザ使用を満たす精度の中で最速となる候補閾値3を基準閾値3refとしてもよい。或いは、結果誤差と実行時間との積を最小化するときの候補閾値3を基準閾値3refに適用してもよい。
Then, the
学習部50は、各問題データ2の残差曲線データ4dそれぞれに対して、残差曲線を一定区間ごとに区切って複数の入力データ6aを作成し、作成した複数の入力データ6aのそれぞれにS1146で決定したラベルを付与して、学習データ6gを生成する(ステップS1147)。そして、学習部50は、生成した学習データ6gを用いてNN270を学習する(ステップS1150)。
For each of the
図31は、第2の機能構成例における学習処理の第3の例を説明するためのフローチャート図である。図31中、図30と同様の内容には同一ステップ番号を付し、その説明を省略する。学習処理の第3の例では、ユーザが所望するシミュレーションの精度を考慮して候補閾値3から基準閾値3refを特定する。シミュレーション部30の処理は、図30と同等であるため簡略化し、その説明を省略する。
FIG. 31 is a flowchart for explaining a third example of learning processing in the second functional configuration example. In FIG. 31, the same step numbers are given to the same contents as in FIG. 30, and the description thereof is omitted. In the third example of the learning process, the reference threshold value 3ref is specified from the
図30において、機械学習部40では、ユーザが所望するシミュレーションの精度を結果誤差の基準値に設定する(ステップS1150)。一例としてMAE<0.0001などである。そのため、図30のステップS1145の代わりに、ステップS1146を行う。
In FIG. 30, the
ステップS1146では、学習部50は、問題データ2ごとに、結果誤差がユーザの所望する精度を満たすものの中で、実行時間が最も短いときの候補閾値3を基準閾値3refに設定し、基準閾値3refと、候補閾値3との大小関係に基づいて、残差曲線データに対するラベルを決定する。以下、ステップS1147及びS1150は、図30と同様であるため説明を省略する。
In step S1146, the
上述した第1実施例及び第2実施例における学習環境として、
・NN270
一例として、AlexNetを用いてCNNを構成すればよい。
・AIフレームワーク
TensorFlow及びTensorFlowへのAPIとしてKerasなどを用いればよい。このような学習環境を持つ情報処理装置100において、発明者等が開発した線形解析の閾値Thを動的に調整する手法をシミュ―レーションに適用し、当該手法を適用した結果として得られた様々な情報を、以下に提示する。
As a learning environment in the first and second embodiments described above,
・NN270
As an example, a CNN may be configured using AlexNet.
・AI framework
Keras or the like may be used as TensorFlow and an API to TensorFlow. In the
次に、第2の機能構成例における学習処理の第1の例の学習結果について図32及び図33に示す。図32は、学習処理の第1の例による候補閾値ごとの学習結果を示す図である。この例では、図23で説明した線形解析の残差閾値の範囲にある15個の候補閾値3を用いている。
Next, FIG. 32 and FIG. 33 show learning results of the first example of the learning process in the second functional configuration example. FIG. 32 is a diagram showing learning results for each candidate threshold value according to the first example of the learning process. In this example, 15
図32では、候補閾値3のそれぞれについて、線形残差曲線を収束2回ごとの残差曲線が示されている。また、基準閾値3refより小さい候補閾値3に対してラベル「0」を設定し、それ以外の候補閾値3に対してはラベル「1」を設定する。
In FIG. 32, for each of candidate threshold values 3, residual curves are shown every two times the linear residual curve converges. Also, the label "0" is set for
このようにラベル付けした学習データ6gを用いた場合の学習結果を図33に示す。図33は、図32のラベル付けに基づく学習結果を示す図である。
FIG. 33 shows the learning result when using the
上述した検証より、図33(A)に損失グラフ33aでは、学習時損失値33a-1と検証時損失値33a-2とを示し、図33(B)に示す精度グラフ33bでは、学習時精度値33b-1と検証時精度値33b-2とを示している。損失は、エポックの少ない時期に急速に改善し、検証用のデータにおいても学習時と同様の傾向を示している。また、精度についても、エポックの少ない時期に急速に改善し、検証用のデータにおいても学習時と同様の傾向を示している。適切な学習が行われたと言える。
From the above verification, the
次に、第2の機能構成例における学習処理の第2の例の学習結果について図34及び図35を参照して説明する。図34は、学習処理の第2の例による候補閾値ごとの学習結果を示す図である。この例では、線形解析の残差閾値15個の候補閾値3を用いている。
Next, the learning result of the second example of the learning process in the second functional configuration example will be described with reference to FIGS. 34 and 35. FIG. FIG. 34 is a diagram showing learning results for each candidate threshold value according to the second example of the learning process. In this example, 15
図34では、候補閾値3のそれぞれについて、線形残差曲線を収束2回ごとの残差曲線が示されている。CGとAMG(Algebraic Multigrid)とを用いた構造解析のモデル用いている。また、シミュレーション結果の精度が十分で最速時の候補閾値3より小さい場合にラベル「0」を設定し、それ以外の候補閾値3に対してはラベル「1」を設定する。
In FIG. 34, for each of the candidate threshold values 3, the residual curve is shown every two times the linear residual curve converges. A structural analysis model using CG and AMG (Algebraic Multigrid) is used. Also, if the accuracy of the simulation result is sufficient and is smaller than the
このようにラベル付けした学習データ6gを用いた場合の学習結果を図35に示す。図35は、図34のラベル付けに基づく学習結果を示す図である。
FIG. 35 shows the learning result when using the
上述した検証より、図35(A)に示す損失グラフ35aと、図35(B)に示す精度グラフ35bとを得た。図35(A)に損失グラフ35aでは、学習時損失値35a-1と検証時損失値35a-2とを示し、図35(B)に示す精度グラフ35bでは、学習時精度値35b-1と検証時精度値35b-2とを示している。損失は、エポックの少ない時期に急速に改善し、検証用のデータにおいても学習時と同様の傾向を示している。また、精度についても、エポックの少ない時期に急速に改善し、検証用のデータにおいても学習時と同様の傾向を示している。学習処理の第2の例では、特に、検証時損失値35a-2と検証時精度値35b-2とが、非常に滑らかに推移しており、学習処理の第1の例以上に高精度な学習が行われたと言える。
Through the verification described above, a
更に、第2実施例における学習処理の第1の例と学習処理の第2の例とを比較検証した結果を以下に示す。検証環境は、以下の通りである。
学習部50(AI部)の呼び出し間隔: 非線形ループ2回ずつ
訓練済みモデル:
・第1の例のラベル付け:
線形解析の残差閾値が最速時の候補閾値3より小さいときラベル0を設定し、
それ以外のときラベル1を設定する。
Furthermore, the result of comparing and verifying the first example of the learning process and the second example of the learning process in the second embodiment is shown below. The verification environment is as follows.
Call interval of learning unit 50 (AI unit): 2 nonlinear loops each Trained model:
- Labeling for the first example:
set the
Otherwise, set
・第2の例のラベル付け:
シミュレーション結果の精度が十分であり、かつ、
最速時の候補閾値3より小さいときラベル0を設定し、
それ以外のときラベル1を設定する。
- Labeling for the second example:
The accuracy of the simulation results is sufficient, and
Set
Otherwise, set
線形解析の残差閾値の変化率:2倍又は1/2倍
としたときの結果を説明する。
Rate of change of residual threshold for linear analysis: results when doubled or halved.
図36は、学習データの生成例を説明するための図である。図36では、第2実施例において学習部50が残差曲線データ4d-1、4d-2のそれぞれを定めた区間ごとに区切って、入力データ6aを作成する。
FIG. 36 is a diagram for explaining an example of generating learning data. In FIG. 36, in the second embodiment, the
残差曲線データ4dの候補閾値3が基準閾値3ref以上の場合に区切った全ての入力データ6aにラベル「1」を付与し、それ以外の場合にラベル「0」を付与した例をそれぞれ示している。一例として、1つの残差曲線データ4dに対して12個の学習データ6gが生成されたものとする。
An example is shown in which the label "1" is given to all the divided
学習部50は、1つの残差曲線データ4dに対して、同一ラベルが付与された複数の学習データ6gを用いてNN270を学習する。NN270に対して誤差はフィードバックされ、第2実施例では、1つの残差曲線データ4dから同一ラベルの複数の学習データ6gを得られるため、NN270にラベル「1」又は「0」を精度良く学習させることができる。そのため、推論部60において、閾値Thを最適な値へと適切に変化させ、シミュレーション時間を高速化することができる。
The
シミュレーションの実行時間とシミュレーション結果5の精度とについて検証した結果を以下に示す。
The result of verifying the simulation execution time and the accuracy of the
図37は、実行時間の検証結果を示す図である。図37において、縦軸を時間(秒)で示し、左から
・初期設定に用いる規定値「1.0e-08」でシミュレーションを実行した場合
・第2の例の場合、
・第1の例の場合、
・図23に例示したような実行時間が最速時の閾値でシミュレーションを実行した場合
のそれぞれの実行時間を示している。
FIG. 37 is a diagram showing verification results of the execution time. In FIG. 37, the vertical axis indicates time (seconds), and from the left: When the simulation is executed with the default value “1.0e-08” used for initial setting. In the case of the second example,
・In the case of the first example,
Each execution time is shown when the simulation is executed with the threshold for the fastest execution time as illustrated in FIG. 23 .
初期設定、第2の例、第1の例、そして最速設定の順に実行時間が減少している。最速設定が最も実行時間が短いが、第2の例及び第1の例は、最も実行時間が長い初期設定に対して高速化を実現している。 The execution time decreases in the order of initial setting, second example, first example, and fastest setting. The fastest setting has the shortest execution time, but the second example and the first example achieve speed-up with respect to the initial setting with the longest execution time.
図38は、シミュレーション結果の検証結果を示す図である。図38では、縦軸にシミュレーション結果の誤差を示し、図37同様に、初期設定、第2の例、第1の例、そして最速設定の順に誤差を示している。 FIG. 38 is a diagram showing verification results of simulation results. In FIG. 38, the vertical axis indicates the error of the simulation result, and similarly to FIG. 37, the error is indicated in the order of the initial setting, the second example, the first example, and the fastest setting.
初期設定は、有効数字が平均4桁一致の基準38aに到達している。第2の例では、基準38aを上回る誤差を示すものの基準38aに近い精度を示している。一方、第1の例及び最速設定の精度では、有効数字が平均3桁一致の基準38bを超えているが、略同程度の誤差を示している。 The initial setting has reached the criterion 38a of 4 significant digits match on average. The second example shows an error that exceeds the criterion 38a but an accuracy that is close to the criterion 38a. On the other hand, in the accuracy of the first example and the fastest setting, although the significant digits exceed the standard 38b of coincidence of 3 digits on average, the errors are approximately the same.
上述した検証より、シミュレーション結果5の精度を維持しつつ高速化を試みる観点において、第1の例及び第2の例では、実行速度を改善しつつ精度を保つことを実現しているといえる。
From the above verification, from the viewpoint of trying to speed up while maintaining the accuracy of the
図39は、閾値の変化例を示す図である。図39では、縦軸に線形解析の閾値を示し、横軸にニュートン法のステップ数を示す。本実施例におけるシミュレーションの閾値変化39aと、本実施例を用いない既存のシミュレーションの閾値変化39bとを所定ステップごとに示している。
FIG. 39 is a diagram showing an example of threshold change. In FIG. 39, the vertical axis indicates the threshold value for linear analysis, and the horizontal axis indicates the number of Newton's method steps. A
本実施例におけるシミュレーションとは、第1実施例及び第2実施例において例示した機能構成を有する情報処理装置100によって行われたシミュレーションに相当する。また、ステップとは、ニュートン法に基づく線形ソルバにおけるステップに相当し、所定ステップとは、この例では2ステップである。
The simulation in this embodiment corresponds to the simulation performed by the
図39より、情報処理装置100における閾値変化39aは、閾値Thは、ステップ1で初期値に設定されてからステップ41まで上昇し、その後、動的に変化しながら線形解析が行われていることが分かる。一方、既存のシミュレーションの閾値変化39bは、初期値を維持した状態を示す。
From FIG. 39 , the
図40は、処理時間の経過例を示す図である。図40では、縦軸に実行時間を示し、横軸にニュートン法のステップ数を示す。実行時間は、ニュートン法1ステップに掛かった時間を示している。本実施例における処理時間経過40aと、本実施例を用いない既存の処理時間経過40bとをステップごとに計測した時間を示している。
FIG. 40 is a diagram showing an example of elapsed processing time. In FIG. 40, the vertical axis indicates the execution time, and the horizontal axis indicates the number of Newton's method steps. The execution time indicates the time taken for one step of Newton's method. The
既存の処理時間経過40bは、実行時間が一定の変動範囲で推移を繰り返している。一方、本実施例における処理時間経過40aでは、ステップを反復するごとに実行時間が短縮され、凡そ35ステップ以降では、一定の変動範囲で推移を繰り返している。本実施例における処理時間経過40aの変動範囲は、既存の処理時間経過40bにおける変動範囲より明らかに高速な範囲である。
In the existing
図41は、反復回数の経過例を示す図である。図41では、縦軸に線形解析の反復回数を示し、横軸にニュートン法のステップ数を示す。本実施例のシミュレーションにおける線形解析の反復回数の経過41aと、本実施例を用いない既存のシミュレーションにおける線形解析の反復回数の経過41bとを示している。
FIG. 41 is a diagram showing an example of progress of the number of iterations. In FIG. 41, the vertical axis indicates the number of iterations of the linear analysis, and the horizontal axis indicates the number of Newton's method steps. The
反復回数の経過41bは、ステップ数が増加しても略同様の反復回数で線形解析を行い続け、この例では、60回以下で線形解析が収束することがない。一方、反復回数の経過41aは、減少し続け、一定の反復回数の間で変動しながら推移する。
In the
上述した第2実施例に係る検証は、以下のような言語及びライブラリを用いた例として示している。
・シミュレーション部30
構造解析OSS(Open Source Software)であるFrontISTRを用いる。
・機械学習部40
学習部50及び推論部60のメインプログラムは、多くのアプリケーションに組み込み可能なPython等の汎用スクリプト言語を用いればよい。
The verification according to the second embodiment described above is shown as an example using the following languages and libraries.
・
FrontISTR, which is structural analysis OSS (Open Source Software), is used.
・
The main programs of the
学習部50及び推論部60から呼び出すAI推論(NN270に相当)を行うプログラムには、機械学習用ライブラリであるTensorFlowを用い、TensorFlowを呼び出し容易なKerasのAPIを用いればよい。
A program that performs AI inference (corresponding to NN270) called from the
このように、シミュレーション部30と機械学習部40とではプログラム言語の構造が異なっている。シミュレーション部30と機械学習部40との間でのデータの受け渡しは、既存のディスク13(図1)を介して行うことが可能であるので、第1実施例の実装は必須ではない。しかしながら、図37及び図38で示したように実行速度とシミュレーション結果5の精度とは、トレードオフの関係にある。シミュレーションの精度を維持しつつより高速化する観点において、第1実施例で説明したようなプロセス間通信を実装することがより好ましい。
Thus, the
また、上記言語及びライブラリを用いた第2実施例において、シミュレーションを実行した場合には、図42のような実行ログを得ることができる。図42は、第2実施例における実行ログの例を示す図である。 Also, in the second embodiment using the language and library described above, when a simulation is executed, an execution log such as that shown in FIG. 42 can be obtained. FIG. 42 is a diagram showing an example of an execution log in the second embodiment.
図42に例示される実行ログ4aは、FrontISTRでプログラムされたシミュレーション部30が実行されると出力されるログに相当する。実行ログ4aでは、ログ記述42aにより、NN270に相当するAI処理を実行するプロセッサが呼び出されている。プロセッサは、GPU14の製品名等で示される。ログ記述42bではAIフレームワークが呼び出され、この例ではTensorflowが呼び出されたことが示されている。
The
ログ記述42c及び42dから、残差の閾値Thが略1e-08から略2e-08に変化したことが分かる。第2実施例の適用のない既存のシミュレーションでは、このように閾値Thが変動することはなく、例えば、閾値Thが1e-08であれば、常に1e-08を示すログが記録される。
From the
なお、第1実施例及び第2実施例を実現する情報処理装置100では、
・AI処理を行うプログラム用として、メインプログラムがPythonであれば、
python_main_path=/path/to/ai_main.py
などの設定ファイルが作成され特定の記憶領域に保存される。また、この特定の記憶領域には、
・訓練済みAIモデルが生成されると、推論部60により利用可能なように、一例として、
trained_model_path=/path/to/trained_model.h5
などの設定ファイルが作成され保存される。
Note that in the
・For programs that perform AI processing, if the main program is Python,
python_main_path=/path/to/ai_main.py
A setting file such as is created and saved in a specific storage area. Also, in this particular storage area,
- Once the trained AI model is generated, so that it can be used by the
trained_model_path=/path/to/trained_model.h5
A configuration file such as is created and saved.
上述において、残差曲線は残差推移を表すデータの一例であり、実行時間は、シミュレーションの演算時間の一例であり、NN270は、推論モデルの一例である。
In the above description, the residual curve is an example of data representing residual transition, the execution time is an example of simulation computation time, and the
本発明は、具体的に開示された実施例に限定されるものではなく、特許請求の範囲から逸脱することなく、主々の変形や変更が可能である。 The invention is not limited to the specifically disclosed embodiments, which are capable of major variations and modifications without departing from the scope of the claims.
以上の第1実施例~第2実施例を含む実施形態に関し、更に以下の付記を開示する。
(付記1)
1又は複数のコンピュータに、
線形解析を反復して非線形解析を行う第1の処理を実行させ、
前記第1の処理により複数の実験値で残差閾値ごとに求めた前記線形解析の反復ごとの残差推移と演算時間とに基づいて、推論モデルにより前記線形解析の収束判定に用いる残差閾値を推論させる第2の処理とを実行させ、
前記第1の処理と前記第2の処理との間で行われるデータの受け渡しを、メモリに設定された共有メモリを用いたプロセス間通信により行わせる
ことを特徴とする情報処理プログラム。
(付記2)
前記第1の処理は、
前記共有メモリに前記線形解析の反復ごとの前記残差推移と前記演算時間とを前記共有メモリに記憶して、第1の名前付きパイプにアドレスを設定し、
第2の名前付きパイプから前記第2の処理において書き込まれた前記推論モデルの推論結果を取得し、
前記第2の処理は、
前記共有メモリ内の前記第1の名前付きパイプで指定される前記アドレスから前記残差推移と前記演算時間とを取得し、
前記残差推移と前記演算時間とから定めた基準閾値と該残差推移とから前記推論モデルに前記残差閾値を推論する学習を行わせ、該推論モデルにより出力された前記推論結果を前記第2の名前付きパイプに書き込む
ことを特徴とする付記1記載の情報処理プログラム。
(付記3)
前記第2の処理は、
前記演算時間が最も短いときの前記実験値を前記基準閾値に設定し、
前記残差推移ごとに用いた実験値と前記基準閾値とを比較した結果に応じて、該残差推移にラベル付けして学習データを生成し、
前記学習データを用いて前記推論モデルを行う
ことを特徴とする付記2記載の情報処理プログラム。
(付記4)
前記第2の処理は、
前記演算時間が最も短いときの前記実験値を前記基準閾値に設定し、
前記残差推移ごとに用いた前記実験値と前記基準閾値とを比較した結果に応じて、該残差推移に対するラベルを決定し、
前記残差推移を一定区間ごとに区切って複数の入力データを作成し、作成した複数の入力データのそれぞれに決定した前記ラベルを付与して複数の学習データを生成し、
前記複数の学習データのそれぞれに対して前記推論モデルを行う
ことを特徴とする付記2記載の情報処理プログラム。
(付記5)
前記第2の処理は、
前記非線形解析の問題データごとに、前記演算時間が最も短いときの前記実験値を特定し、特定した該実験値を用いたときの前記第1の処理で得られた第1の結果と、他の実験値を用いたときの該第1の処理で得られた第2の結果それぞれとの結果誤差を計算し、
前記問題データごとに、前記結果誤差と実行時間とを、前記実験値ごとに比較した結果に基づいて、前記基準閾値を設定し、
前記残差推移ごとに用いた前記実験値と前記基準閾値とを比較した結果に応じて、該残差推移に対するラベルを決定し、
前記残差推移を一定区間ごとに区切って複数の入力データを作成し、作成した複数の入力データのそれぞれに決定した前記ラベルを付与して複数の学習データを生成し、
前記複数の学習データのそれぞれに対して前記推論モデルを行う
ことを特徴とする付記2記載の情報処理プログラム。
(付記6)
前記第2の処理は、
前記第1の処理からの呼び出しに応じて、前記第1の処理によって得られた前記残差推移を用いて、訓練済みモデルにより前記残差閾値を推論させた前記推論結果を取得して、前記第1の処理への戻り値として前記第2の名前付きパイプに書き込み、
前記第1の処理は、前記第2の名前付きパイプから前記推論結果を読み出し、読み出した該推論結果と予め定めた変化率とを用いて前記残差閾値を更新する付記3乃至5のいずれか一項に記載の情報処理プログラム。
(付記7)
前記第1の処理は、
前記第1の名前付きパイプに接続し、前記第2の処理からの第1のロック解除を待ち、
前記第1のロック解除の検出に応じて、前記共有メモリに、前記非線形解析により得られた非線形解析データと前記線形解析により得られた線形解析データとを書き込み、
前記共有メモリに、前記非線形解析の繰り返し回数と、前記線形解析の反復回数とを書き込み、
前記第2の名前付きパイプに接続し、前記第2の処理からの第2のロック解除を待ち、
前記第2のロック解除に応じて、前記第2の名前付きパイプから前記推論結果を取得する
ことを特徴とする付記2乃至6のいずれか一項に記載の情報処理プログラム。
(付記8)
前記第2の処理は、
前記第1の名前付きパイプに接続し、該第1の名前付きパイプのロックを解除し、
前記第1の処理からの要求に応じて、前記共有メモリから前記線形解析データと前記非線形解析データとを読み込み、それぞれから前記残差推移と前記演算時間とを取得し、訓練済みの前記推論モデルに前記残差閾値を推論させ、
前記第2の名前付きパイプに接続し、訓練済みの前記推論モデルによる推論結果を該第2の名前付きパイプに書き込んで、該第2の名前付きパイプをロック解除する
ことを特徴とする付記7に記載の情報処理プログラム。
(付記9)
前記第1の処理は、科学計算用の手続き型言語による第1のプログラムを第1のプロセッサが実行することにより行われ、
前記第2の処理は、前記第1のプログラムとは異なるスクリプト言語による第2のプログラムを前記第1のプロセッサが実行することにより行われ、
前記推論モデルは、前記第1のプロセッサとは異なる前記第2のプロセッサが、深層学習言語によるプログラムを実行することにより行われる
ことを特徴とする付記1乃至8のいずれか一項記載の情報処理プログラム。
(付記10)
1又は複数のコンピュータが、
線形解析を反復して非線形解析を行う第1の処理を実行し、
前記第1の処理により複数の実験値で残差閾値ごとに求めた前記線形解析の反復ごとの残差推移と演算時間とに基づいて、推論モデルにより前記線形解析の収束判定に用いる残差閾値を推論させる第2の処理とを実行し、
前記第1の処理と前記第2の処理との間で行われるデータの受け渡しは、メモリに設定された共有メモリを用いたプロセス間通信により行う
ことを特徴とする情報処理方法。
(付記11)
メモリと、
前記メモリに接続された1又は複数のプロセッサとを有し、該1又は複数のコンピュータが、
線形解析を反復して非線形解析を行う第1の処理と、
前記第1の処理により複数の実験値で残差閾値ごとに求めた前記線形解析の反復ごとの残差推移と演算時間とに基づいて、推論モデルにより前記線形解析の収束判定に用いる残差閾値を推論させる第2の処理とを実行し、
前記第1の処理と前記第2の処理との間で行われるデータの受け渡しは、前記メモリに設定された共有メモリを用いたプロセス間通信により行うことを特徴とする情報処理装置。
Further, the following additional remarks are disclosed regarding the embodiments including the above-described first to second examples.
(Appendix 1)
on one or more computers,
Execute a first process of repeating linear analysis to perform nonlinear analysis,
Residual threshold used for determining convergence of the linear analysis by the inference model based on the residual transition and computation time for each iteration of the linear analysis obtained for each residual threshold with a plurality of experimental values in the first process and a second process for inferring
An information processing program, characterized in that data exchange between the first process and the second process is performed by inter-process communication using a shared memory set in a memory.
(Appendix 2)
The first processing is
storing in the shared memory the residual transition and the computation time for each iteration of the linear analysis in the shared memory, and setting an address to a first named pipe;
obtaining an inference result of the inference model written in the second process from a second named pipe;
The second processing is
obtaining the residual transition and the computation time from the address specified by the first named pipe in the shared memory;
causing the inference model to learn to infer the residual threshold from the residual transition and a reference threshold determined from the residual transition and the computation time; 2. The information processing program according to
(Appendix 3)
The second processing is
setting the experimental value when the calculation time is the shortest as the reference threshold;
generating learning data by labeling the residual transition according to the result of comparing the experimental value used for each residual transition with the reference threshold;
The information processing program according to
(Appendix 4)
The second processing is
setting the experimental value when the calculation time is the shortest as the reference threshold;
determining a label for the residual transition according to a result of comparing the experimental value used for each residual transition with the reference threshold;
creating a plurality of input data by dividing the residual transition into certain intervals, assigning the determined label to each of the plurality of created input data to generate a plurality of learning data;
The information processing program according to
(Appendix 5)
The second processing is
The experimental value when the computation time is the shortest is specified for each problem data of the nonlinear analysis, and the first result obtained in the first process when using the specified experimental value; calculating the result error with each of the second results obtained in the first process when using the experimental value of
setting the reference threshold based on the result of comparing the result error and the execution time for each experimental value for each problem data;
determining a label for the residual transition according to a result of comparing the experimental value used for each residual transition with the reference threshold;
creating a plurality of input data by dividing the residual transition into certain intervals, assigning the determined label to each of the plurality of created input data to generate a plurality of learning data;
The information processing program according to
(Appendix 6)
The second processing is
In response to a call from the first process, using the residual transition obtained by the first process, obtaining the inference result of inferring the residual threshold by a trained model, writing to the second named pipe as a return value to the first process;
Any one of
(Appendix 7)
The first processing is
connecting to said first named pipe and waiting for a first unlock from said second process;
writing the nonlinear analysis data obtained by the nonlinear analysis and the linear analysis data obtained by the linear analysis into the shared memory in response to detection of the first unlocking;
writing the number of iterations of the nonlinear analysis and the number of iterations of the linear analysis into the shared memory;
connecting to said second named pipe and waiting for a second unlock from said second process;
7. The information processing program according to any one of
(Appendix 8)
The second processing is
connecting to the first named pipe and unlocking the first named pipe;
reading the linear analysis data and the nonlinear analysis data from the shared memory in response to a request from the first process, obtaining the residual transition and the operation time from each, and obtaining the trained inference model; to infer the residual threshold,
Appendix 7, connecting to the second named pipe, writing inference results from the trained inference model to the second named pipe, and unlocking the second named pipe. The information processing program described in .
(Appendix 9)
The first process is performed by a first processor executing a first program in a procedural language for scientific computing,
The second process is performed by the first processor executing a second program in a script language different from the first program,
9. The information processing according to any one of
(Appendix 10)
one or more computers
performing a first process of repeating a linear analysis to perform a nonlinear analysis;
Residual threshold used for determining convergence of the linear analysis by the inference model based on the residual transition and computation time for each iteration of the linear analysis obtained for each residual threshold with a plurality of experimental values in the first process and a second process for inferring
An information processing method, wherein data is transferred between the first process and the second process by inter-process communication using a shared memory set in a memory.
(Appendix 11)
memory;
and one or more processors connected to the memory, the one or more computers comprising:
a first process of repeating linear analysis to perform nonlinear analysis;
Residual threshold used for determining convergence of the linear analysis by the inference model based on the residual transition and computation time for each iteration of the linear analysis obtained for each residual threshold with a plurality of experimental values in the first process and a second process for inferring
An information processing apparatus, wherein data is transferred between the first process and the second process by inter-process communication using a shared memory set in the memory.
2 問題データ
3 候補閾値
3ref 基準閾値
4a 実行ログ
4d 残差曲線データ
5 シミュレーション結果
6a 入力データ
6g 学習データ
11 CPU
12 メインメモリ
12a 共有メモリ
12m-1 CM領域
12m-2 ML領域
12p 名前付きパイプ領域
12v OS仮想メモリ
13 ディスク
14g GPU
14m GPUメモリ
15 入力装置
16 表示装置
17 通信I/F
18 ドライブ装置
19 記憶媒体
30 シミュレーション部
32 非線形解析部
34 線形解析部
40 機械学習部
50 学習部
60 推論部
230 高性能アプリケーション
232 高性能アプリケーション
204d シミュレーションデータ
100 情報処理装置
2
12
18
Claims (10)
線形解析を反復して非線形解析を行う第1の処理を実行させ、
前記第1の処理により複数の実験値で残差閾値ごとに求めた前記線形解析の反復ごとの残差推移と演算時間とに基づいて、NNにより前記線形解析の収束判定に用いる残差閾値を推論させる第2の処理とを実行させ、
前記第1の処理と前記第2の処理との間で行われるデータの受け渡しを、メモリに設定された共有メモリを用いたプロセス間通信により行わせる
ことを特徴とする情報処理プログラム。 on one or more computers,
Execute a first process of repeating linear analysis to perform nonlinear analysis,
Based on the residual transition and the computation time for each iteration of the linear analysis obtained for each residual threshold with a plurality of experimental values in the first process, the NN determines the residual threshold used to determine the convergence of the linear analysis. Execute a second process for inferring,
An information processing program, characterized in that data exchange between the first process and the second process is performed by inter-process communication using a shared memory set in a memory.
前記線形解析の反復ごとの前記残差推移と前記演算時間とを前記共有メモリに記憶して、第1の名前付きパイプにアドレスを設定し、
第2の名前付きパイプから前記第2の処理において書き込まれた前記NNの推論結果を取得し、
前記第2の処理は、
前記共有メモリ内の前記第1の名前付きパイプで指定される前記アドレスから前記残差推移と前記演算時間とを取得し、
前記残差推移と前記演算時間とから定めた基準閾値と該残差推移とから前記NNに前記残差閾値を推論する学習を行わせ、該NNにより出力された前記推論結果を前記第2の名前付きパイプに書き込む
ことを特徴とする請求項1記載の情報処理プログラム。 The first processing is
storing the residual transition and the computation time for each iteration of the linear analysis in the shared memory and setting an address to a first named pipe;
obtaining the inference result of the NN written in the second process from a second named pipe;
The second processing is
obtaining the residual transition and the computation time from the address specified by the first named pipe in the shared memory;
making the NN learn to infer the residual threshold from the residual transition and a reference threshold determined from the residual transition and the computation time; 2. The information processing program according to claim 1, writing to a named pipe.
前記演算時間が最も短いときの前記実験値を前記基準閾値に設定し、
前記残差推移ごとに用いた実験値と前記基準閾値とを比較した結果に応じて、該残差推移にラベル付けして学習データを生成し、
前記学習データを用いて前記NNの学習を行う
ことを特徴とする請求項2記載の情報処理プログラム。 The second processing is
setting the experimental value when the calculation time is the shortest as the reference threshold;
generating learning data by labeling the residual transition according to the result of comparing the experimental value used for each residual transition with the reference threshold;
3. The information processing program according to claim 2, wherein learning of said neural network is performed using said learning data.
前記演算時間が最も短いときの前記実験値を前記基準閾値に設定し、
前記残差推移ごとに用いた前記実験値と前記基準閾値とを比較した結果に応じて、該残差推移に対するラベルを決定し、
前記残差推移を一定区間ごとに区切って複数の入力データを作成し、作成した複数の入力データのそれぞれに決定した前記ラベルを付与して複数の学習データを生成し、
前記複数の学習データを用いて前記NNの学習を行う
ことを特徴とする請求項2記載の情報処理プログラム。 The second processing is
setting the experimental value when the calculation time is the shortest as the reference threshold;
determining a label for the residual transition according to a result of comparing the experimental value used for each residual transition with the reference threshold;
creating a plurality of input data by dividing the residual transition into certain intervals, assigning the determined label to each of the plurality of created input data to generate a plurality of learning data;
3. The information processing program according to claim 2, wherein learning of said neural network is performed using said plurality of learning data.
前記非線形解析の問題データごとに、前記演算時間が最も短いときの前記実験値を特定し、特定した該実験値を用いたときの前記第1の処理で得られた第1の結果と、他の実験値を用いたときの該第1の処理で得られた第2の結果それぞれとの結果誤差を計算し、
前記問題データごとに、前記結果誤差と実行時間とを、前記実験値ごとに比較した結果に基づいて、前記基準閾値を設定し、
前記残差推移ごとに用いた前記実験値と前記基準閾値とを比較した結果に応じて、該残差推移に対するラベルを決定し、
前記残差推移を一定区間ごとに区切って複数の入力データを作成し、作成した複数の入力データのそれぞれに決定した前記ラベルを付与して複数の学習データを生成し、
前記複数の学習データを用いて前記NNの学習を行う
ことを特徴とする請求項2記載の情報処理プログラム。 The second processing is
The experimental value when the computation time is the shortest is specified for each problem data of the nonlinear analysis, and the first result obtained in the first process when using the specified experimental value; calculating the result error with each of the second results obtained in the first process when using the experimental value of
setting the reference threshold based on the result of comparing the result error and the execution time for each experimental value for each problem data;
determining a label for the residual transition according to a result of comparing the experimental value used for each residual transition with the reference threshold;
creating a plurality of input data by dividing the residual transition into certain intervals, assigning the determined label to each of the plurality of created input data to generate a plurality of learning data;
3. The information processing program according to claim 2, wherein learning of said neural network is performed using said plurality of learning data.
前記第1の処理からの呼び出しに応じて、前記第1の処理によって得られた前記残差推移を用いて、訓練済みの前記NNにより前記残差閾値を推論させた前記推論結果を取得して、前記第1の処理への戻り値として前記第2の名前付きパイプに書き込み、
前記第1の処理は、前記第2の名前付きパイプから前記推論結果を読み出し、読み出した該推論結果と予め定めた変化率とを用いて前記残差閾値を更新する請求項3乃至5のいずれか一項に記載の情報処理プログラム。 The second processing is
Acquiring the inference result of inferring the residual threshold by the trained NN using the residual transition obtained by the first process in response to a call from the first process. , writing to said second named pipe as a return value to said first process;
6. The first process reads the inference result from the second named pipe, and uses the read inference result and a predetermined rate of change to update the residual threshold. 1. The information processing program according to 1.
前記第1の名前付きパイプに接続し、前記第2の処理からの第1のロック解除を待ち、
前記第1のロック解除の検出に応じて、前記共有メモリに、前記非線形解析により得られた非線形解析データと前記線形解析により得られた線形解析データとを書き込み、
前記共有メモリに、前記非線形解析の繰り返し回数と、前記線形解析の反復回数とを書き込み、
前記第2の名前付きパイプに接続し、前記第2の処理からの第2のロック解除を待ち、
前記第2のロック解除に応じて、前記第2の名前付きパイプから前記推論結果を取得する
ことを特徴とする請求項2乃至6のいずれか一項に記載の情報処理プログラム。 The first processing is
connecting to said first named pipe and waiting for a first unlock from said second process;
writing the nonlinear analysis data obtained by the nonlinear analysis and the linear analysis data obtained by the linear analysis into the shared memory in response to detection of the first unlocking;
writing the number of iterations of the nonlinear analysis and the number of iterations of the linear analysis into the shared memory;
connecting to said second named pipe and waiting for a second unlock from said second process;
7. The information processing program according to any one of claims 2 to 6, wherein the inference result is obtained from the second named pipe in response to the second unlocking.
前記第1の名前付きパイプに接続し、該第1の名前付きパイプのロックを解除し、
前記第1の処理からの要求に応じて、前記共有メモリから前記線形解析データと前記非線形解析データとを読み込み、それぞれから前記残差推移と前記演算時間とを取得し、訓練済みの前記NNに前記残差閾値を推論させ、
前記第2の名前付きパイプに接続し、訓練済みの前記NNによる推論結果を該第2の名前付きパイプに書き込んで、該第2の名前付きパイプをロック解除する
ことを特徴とする請求項7に記載の情報処理プログラム。 The second processing is
connecting to the first named pipe and unlocking the first named pipe;
In response to a request from the first process, read the linear analysis data and the nonlinear analysis data from the shared memory, acquire the residual transition and the operation time from each, and load the trained NN inferring the residual threshold;
8. Connecting to said second named pipe, writing inference results by said trained neural network to said second named pipe, and unlocking said second named pipe. The information processing program described in .
線形解析を反復して非線形解析を行う第1の処理を実行し、
前記第1の処理により複数の実験値で残差閾値ごとに求めた前記線形解析の反復ごとの残差推移と演算時間とに基づいて、NNにより前記線形解析の収束判定に用いる残差閾値を推論させる第2の処理とを実行し、
前記第1の処理と前記第2の処理との間で行われるデータの受け渡しは、メモリに設定された共有メモリを用いたプロセス間通信により行う
ことを特徴とする情報処理方法。 one or more computers
performing a first process of repeating a linear analysis to perform a nonlinear analysis;
Based on the residual transition and the computation time for each iteration of the linear analysis obtained for each residual threshold with a plurality of experimental values in the first process, the NN determines the residual threshold used to determine the convergence of the linear analysis. performing a second process for inferring,
An information processing method, wherein data is transferred between the first process and the second process by inter-process communication using a shared memory set in a memory.
前記メモリに接続された1又は複数のプロセッサとを有し、該1又は複数のコンピュータが、
線形解析を反復して非線形解析を行う第1の処理と、
前記第1の処理により複数の実験値で残差閾値ごとに求めた前記線形解析の反復ごとの残差推移と演算時間とに基づいて、NNにより前記線形解析の収束判定に用いる残差閾値を推論させる第2の処理とを実行し、
前記第1の処理と前記第2の処理との間で行われるデータの受け渡しは、前記メモリに設定された共有メモリを用いたプロセス間通信により行うことを特徴とする情報処理装置。 memory;
and one or more processors connected to the memory, the one or more computers comprising:
a first process of repeating linear analysis to perform nonlinear analysis;
Based on the residual transition and the computation time for each iteration of the linear analysis obtained for each residual threshold with a plurality of experimental values in the first process, the NN determines the residual threshold used to determine the convergence of the linear analysis. performing a second process for inferring,
An information processing apparatus, wherein data is transferred between the first process and the second process by inter-process communication using a shared memory set in the memory.
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019134863A JP7318383B2 (en) | 2019-07-22 | 2019-07-22 | Information processing program, information processing method, and information processing apparatus |
US16/928,049 US11625517B2 (en) | 2019-07-22 | 2020-07-14 | Information processing method, and information processing apparatus |
EP20185931.1A EP3779735A1 (en) | 2019-07-22 | 2020-07-15 | Information processing program, information processing method, and information processing apparatus |
CN202010698013.6A CN112288124A (en) | 2019-07-22 | 2020-07-20 | Information processing program, information processing method, and information processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019134863A JP7318383B2 (en) | 2019-07-22 | 2019-07-22 | Information processing program, information processing method, and information processing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021018683A JP2021018683A (en) | 2021-02-15 |
JP7318383B2 true JP7318383B2 (en) | 2023-08-01 |
Family
ID=71620288
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019134863A Active JP7318383B2 (en) | 2019-07-22 | 2019-07-22 | Information processing program, information processing method, and information processing apparatus |
Country Status (4)
Country | Link |
---|---|
US (1) | US11625517B2 (en) |
EP (1) | EP3779735A1 (en) |
JP (1) | JP7318383B2 (en) |
CN (1) | CN112288124A (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11201779B1 (en) | 2020-09-11 | 2021-12-14 | Cerner Innovation, Inc. | Generation of synthetic alerts and unified dashboard for viewing multiple layers of data center simultaneously |
US11809790B2 (en) * | 2020-09-22 | 2023-11-07 | Beijing Voyager Technology Co., Ltd. | Architecture for distributed system simulation timing alignment |
CN114970044B (en) * | 2022-06-20 | 2023-05-19 | 华北电力大学 | Rolling bearing fault diagnosis method and system based on threshold convolutional neural network |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003162517A (en) | 2001-11-27 | 2003-06-06 | Semiconductor Leading Edge Technologies Inc | Analysis method for nonlinear equation, analysis apparatus therefor, program and recording medium |
JP5816387B1 (en) | 2015-04-30 | 2015-11-18 | 徹 山里 | Nonlinear optimal solution search system |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000339179A (en) | 1999-05-27 | 2000-12-08 | Oki Electric Ind Co Ltd | Inter-process communication system in computer system |
JP2007287055A (en) * | 2006-04-19 | 2007-11-01 | Sharp Corp | Analysis apparatus, analysis program, and recording medium recorded with analysis program |
JP6413817B2 (en) | 2015-02-09 | 2018-10-31 | 富士通株式会社 | Conversation management system, conversation management method, and conversation management program |
US10303825B2 (en) * | 2015-12-28 | 2019-05-28 | Dassault Systemes Simulia Corp. | Convergence estimation of non-linear PDE and linear solvers |
US11106997B2 (en) * | 2017-09-29 | 2021-08-31 | Facebook, Inc. | Content delivery based on corrective modeling techniques |
US20190188611A1 (en) * | 2017-12-14 | 2019-06-20 | Business Objects Software Limited | Multi-step time series forecasting with residual learning |
-
2019
- 2019-07-22 JP JP2019134863A patent/JP7318383B2/en active Active
-
2020
- 2020-07-14 US US16/928,049 patent/US11625517B2/en active Active
- 2020-07-15 EP EP20185931.1A patent/EP3779735A1/en active Pending
- 2020-07-20 CN CN202010698013.6A patent/CN112288124A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003162517A (en) | 2001-11-27 | 2003-06-06 | Semiconductor Leading Edge Technologies Inc | Analysis method for nonlinear equation, analysis apparatus therefor, program and recording medium |
JP5816387B1 (en) | 2015-04-30 | 2015-11-18 | 徹 山里 | Nonlinear optimal solution search system |
Non-Patent Citations (1)
Title |
---|
WANG, Tingyu ほか,Inexact Krylov iterations and relaxation strategies with fast-multipole boundary element method,arXiv[online],2016年10月01日,[retrieved on 2023.01.13], Retrieved from the Internet: <URL: https://arxiv.org/pdf/1506.05957v2.pdf> |
Also Published As
Publication number | Publication date |
---|---|
EP3779735A1 (en) | 2021-02-17 |
CN112288124A (en) | 2021-01-29 |
US20210027004A1 (en) | 2021-01-28 |
US11625517B2 (en) | 2023-04-11 |
JP2021018683A (en) | 2021-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7318383B2 (en) | Information processing program, information processing method, and information processing apparatus | |
TWI806922B (en) | Method and apparatus for quantizing artificial neural network, and method of quantizing floating-point neural network | |
Tappenden et al. | Inexact coordinate descent: complexity and preconditioning | |
KR20190113928A (en) | Device placement optimization through reinforcement learning | |
Sill et al. | c060: Extended inference with lasso and elastic-net regularized Cox and generalized linear models | |
US9740480B1 (en) | Apparatus and methodologies for code refactoring | |
Nobile et al. | cuTauLeaping: A GPU-powered tau-leaping stochastic simulator for massive parallel analyses of biological systems | |
CN110663049A (en) | Neural network optimizer search | |
WO2020050886A1 (en) | Compiler-level general matrix multiplication configuration optimization | |
US9280322B2 (en) | Generating source code | |
Paduraru et al. | An Automatic Test Data Generation Tool using Machine Learning. | |
WO2023088309A1 (en) | Method for rewriting narrative text, device, apparatus, and medium | |
CN113554178A (en) | Optimizing gradient boost feature selection | |
EP4298556A1 (en) | Granular neural network architecture search over low-level primitives | |
KR20210073242A (en) | Method and apparatus for optimizing model and accelerator system including apparatus for optimizing model | |
JP2016139336A (en) | Prediction device, prediction method, and prediction program | |
Koesterke et al. | Optimizing the PCIT algorithm on stampede's Xeon and Xeon Phi processors for faster discovery of biological networks | |
KR102559605B1 (en) | Method and apparatus for function optimization | |
Sørensen | Auto‐tuning of level 1 and level 2 BLAS for GPUs | |
KR102604462B1 (en) | Method for drug design and device using the same | |
Gonzalez Pepe et al. | Numerical stability of DeepGOPlus inference | |
Wang et al. | A learning algorithm for Bayesian networks and its efficient implementation on GPUs | |
Zhou et al. | Fast and highly scalable Bayesian MDP on a GPU platform | |
JP7224263B2 (en) | MODEL GENERATION METHOD, MODEL GENERATION DEVICE AND PROGRAM | |
KR102583943B1 (en) | A neural network apparatus and neural network learning method for performing continuous learning using a correlation analysis algorithm between tasks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220407 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20230118 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230124 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230213 |
|
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: 20230620 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230703 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7318383 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |