[go: up one dir, main page]

WO2010047174A1 - ソース・コード処理方法、システム、及びプログラム - Google Patents

ソース・コード処理方法、システム、及びプログラム Download PDF

Info

Publication number
WO2010047174A1
WO2010047174A1 PCT/JP2009/064698 JP2009064698W WO2010047174A1 WO 2010047174 A1 WO2010047174 A1 WO 2010047174A1 JP 2009064698 W JP2009064698 W JP 2009064698W WO 2010047174 A1 WO2010047174 A1 WO 2010047174A1
Authority
WO
WIPO (PCT)
Prior art keywords
source code
processing time
processing
divided
processors
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.)
Ceased
Application number
PCT/JP2009/064698
Other languages
English (en)
French (fr)
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.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Priority to KR1020117009462A priority Critical patent/KR101522444B1/ko
Priority to EP09821874A priority patent/EP2352087A4/en
Priority to CN200980142515.2A priority patent/CN102197376B/zh
Priority to JP2010534746A priority patent/JP5209059B2/ja
Publication of WO2010047174A1 publication Critical patent/WO2010047174A1/ja
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/45Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/45Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions
    • G06F8/456Parallelism detection

Definitions

  • the present invention relates to a technique for speeding up program execution in a multiprocessor system.
  • multiprocessor systems having a plurality of processors have been used in fields such as scientific and technical calculations and simulations.
  • an application program creates multiple processes and assigns the processes to individual processors. For example, these processors proceed with processing while communicating with each other using a shared memory space.
  • simulation software that has been especially actively developed includes simulation software for mechatronics plants such as robots, automobiles, and airplanes. Thanks to the development of electronic components and software technology, most of the control is electronically performed in robots, automobiles, airplanes, etc. using wire connection or wireless LAN that is stretched like nerves.
  • HILS Hard In-the-Loop Simulation
  • ECU electronice control unit
  • full vehicle HILS the environment for testing the electronic control unit (ECU) of the entire automobile is called full vehicle HILS.
  • ECU electronice control unit
  • a real ECU is connected to a dedicated hardware device that emulates an engine, a transmission mechanism, and the like in a laboratory, and a test is performed according to a predetermined scenario.
  • the output from the ECU is input to a monitoring computer and further displayed on a display, and a tester checks whether there is an abnormal operation while looking at the display.
  • HILS requires a dedicated hardware device, and it must be physically wired between it and the real ECU, so preparation is difficult.
  • the test after replacing with another ECU also takes time since it must be physically reconnected.
  • real time is required for the test. Therefore, testing many scenarios takes a huge amount of time.
  • a hardware device for HILS emulation is generally very expensive.
  • SILS Software In the Loop Simulation
  • MATLAB (R) / Simulink (R) which is a simulation modeling system available from CYBERNET SYSTEMS CO., LTD.
  • R MATLAB
  • Simulink (R) a simulation modeling system available from CYBERNET SYSTEMS CO., LTD.
  • function blocks A, B, ..., J are arranged on the screen by a graphical interface as shown in Fig. 1, and the processing is performed as indicated by arrows.
  • a simulation program can be created by specifying the flow.
  • CP here refers to a critical path.
  • the block diagram shown in FIG. 1 is converted into a task graph shown in FIG.
  • the task graph of FIG. 2 has four vertical columns, and the processing of each column is assigned to four individual CPUs in parallel, and is substantially compared to when processing by one CPU. Double speed processing can be achieved.
  • the path B ⁇ D ⁇ F ⁇ H ⁇ J is a critical path, and the entire processing time cannot be shortened beyond the CPU time for processing this critical path.
  • Japanese Patent Laid-Open No. 6-83608 discloses that a critical path analysis unit finds a part that is a bottleneck of program execution in a parallel computer.
  • Japanese Patent Laid-Open No. 7-21240 relates to a logic circuit layout design, a critical path extracting device for extracting a critical path in order to shorten the critical path and minimize the number of nets crossing the cut line; Merges blocks from the merge partner of each block determined by the merge partner selection device and the merge partner selection device that determine the merge partner of each block from the cut line creation device that creates the cut line, the degree of connection of each block, and critical path information And a pair-wise device that performs pair exchange so that the number of nets crossing the cut line is minimized.
  • JP-A-8-180100 discloses that an efficient solution is obtained at high speed by generating an efficient neighborhood and combining it with an approximate solution method for a job shop scheduling problem involving machine assignment.
  • JP-A-6-83608 and JP-A-8-180100 merely disclose an outline of task scheduling.
  • Japanese Patent Laid-Open No. 7-21240 describes a technique for shortening a critical path in the layout design of a logical circuit. This is a critical path in a physical layout, and a logical critical path of software. It is not applicable to the processing.
  • JP-A-6-83608 Japanese Patent Laid-Open No. 7-21240 JP-A-8-180100
  • an object of the present invention is to provide a technique for speeding up program execution by parallelization in a multiprocessor system.
  • the above object is achieved by appropriately cutting the critical path of the program to be accelerated, dividing it as a separate process, and assigning it to individual processors. This makes it possible to output an optimum code for speculative execution of simulation.
  • the processing program of the present invention reads the source code of a program that is made up of a plurality of processing blocks and wants to increase the speed, tests all possible cuts of the critical path, and determines the results of the processing blocks that have been cut. Find the cut with the shortest processing time for the flow.
  • a phase in which the processing program is compiled and the execution time and other values of each processing block are measured in advance is performed.
  • the value measured at this time includes the cost of messaging when processing crosses over different processors, the processing required for speculative execution, the cost of rollback when speculation fails, and further to each block Measurement data such as the degree of input prediction (ie, speculation success probability) is also included.
  • the processing of cuts that can be performed on critical paths is applied recursively to the path resulting from the cut. Then, even if further cuts are made, the cut is stopped at a stage where the overall processing time becomes longer if the communication time between processors is taken into consideration. Thereby, a group of a plurality of processing blocks is obtained.
  • a group of processing blocks is referred to as a block chunk.
  • the individual block chunks generated in this way is equal to or less than the number of processors in the multiprocessor system, the individual block chunks are compiled as they are and each is assigned to an individual processor in the execution environment. Assigned.
  • the processing program of the present invention attempts to combine block chunks so that the number of block chunks is equal to the number of processors. At this time, it is preferable to select a combination that minimizes the maximum processing time for the critical path among the resulting combined block chunks.
  • the resulting block chunk is compiled and assigned to each individual processor in the execution environment. In this way, one processor is assigned to every block chunk, so that optimum parallel processing is performed.
  • a plurality of CPU1 304a, CPU2 304b, CPU3 304c,... CPUn 304n are connected to the host bus 302. Further connected to the host bus 502 is a main memory 306 for arithmetic processing of CPU1, 304a, CPU2, 304b, CPU3, 304c,.
  • a keyboard 310, a mouse 312, a display 314 and a hard disk drive 316 are connected to the I / O bus 308.
  • the I / O bus 308 is connected to the host bus 302 via the I / O bridge 318.
  • the keyboard 310 and the mouse 312 are used by an operator to input commands and click menus.
  • the display 314 is used to display a menu for operating a program according to the present invention, which will be described later, using a GUI as necessary.
  • CPU1 304a, CPU2 304b, CPU3 304c,..., CPUn 304n are, for example, Intel (R) Xeon (R), and the operating system is Windows (trademark) Server 2003.
  • the operating system is stored on the hard disk drive 316 and is read from the hard disk drive 316 into the main memory 306 when the computer system is started.
  • the hardware of the computer system that can be used for carrying out the present invention is not limited to IBM (R) System X, and any hardware can be used as long as it can run the simulation program of the present invention.
  • a computer system can be used.
  • the operating system is not limited to Windows (R), and any operating system such as Linux (R) or Mac OS (R) can be used.
  • a computer system such as IBM (R) System P whose operating system is AIX (trademark) based on POWER (trademark) 6 may be used.
  • the hard disk drive 316 further includes a MATLAB® / Simulink®, C compiler or C ++ compiler, a module for cutting a critical path according to the present invention, a code generation module for CPU allocation, and a processing block.
  • a MATLAB® / Simulink® C compiler or C ++ compiler
  • a module for cutting a critical path according to the present invention a code generation module for CPU allocation, and a processing block.
  • a processing block are stored in the main memory 306 in response to an operator's keyboard or mouse operation.
  • the usable simulation modeling tools are not limited to MATLAB (R) / Simulink (R), and any simulation modeling tools such as open source Scilab / Scicos can be used.
  • FIG. 4 is a functional block diagram according to the embodiment of the present invention. Each block basically corresponds to a module stored in the hard disk drive 316.
  • the simulation modeling tool 402 may be any existing tool such as MATLAB® / Simulink®, Scilab / Scicos.
  • the simulation modeling tool 402 basically, an operator arranges function blocks in a GUI on the display 314, describes necessary attributes such as mathematical formulas, and blocks the function blocks in association with each other as necessary. It has a function that makes it possible to describe a diagram.
  • the simulation modeling tool 402 further has a function of outputting C source code describing a function equivalent to the described block diagram. In addition to C, C ++, Fortran, etc. can be used.
  • the simulation modeling tool can be installed in another personal computer, and the generated source code can be downloaded to the hard disk drive 316 via a network or the like. .
  • Source code 404 thus output is stored in the hard disk drive 316.
  • Source code 404 is compiled by compiler 406 and the resulting executable program is passed to test module 408.
  • the test module 408 has a function for performing an execution test and a function for performing a speculative test.
  • the execution test the average processing time, inter-processor communication time, and speculation success probability of each block as shown in FIG. 1 are measured according to a predetermined scenario. In order to measure the average time, preferably the same scenario is executed multiple times.
  • the measurement result 410 is stored in the hard disk drive 316 for later use.
  • Speculation test speculatively executes the resulting executable program according to another predetermined scenario.
  • the processing time for speculation preparation that is, the time for processing to save the predicted input value and the processing time for confirming speculation success / failure in case the speculation fails and rolls back
  • the processing time to check whether it matches the expected data and the rollback processing time that is, the speculation failed, that is, the predicted input and the actual value are different
  • the time required for post-processing such as stopping the processing performed based on an incorrect input or erasing data is measured.
  • Such a value is also stored in the hard disk drive 316 as the measurement result 410 for later use.
  • the speculation success probability can actually be calculated without actually executing speculation.
  • the process is executed before the input that should come originally, so the input is predicted and the process is executed. Therefore, the probability that the speculation is successful is equal to the probability that the prediction for the input is correct.
  • the prediction algorithm can be predicted from only the actual input data without actually performing speculative execution (that is, without executing block processing based on the predicted input data).
  • Success probability can be calculated. That is, simply by recording the input for each block in the “execution test” and calculating the prediction success rate of the input prediction algorithm from the input data series, the speculation success probability can be obtained.
  • the “Critical Path Cut” module 412 has a function of processing the source code 404 in units of blocks, finding a critical path, putting a cut, and finding a cut that has an optimal execution time. At this time, information of the measurement result 410 is used. Module 412 also recursively applies the critical path cut function to obtain sub-block chunks as shown in FIG. The block chunk information 414 thus generated is stored on the hard disk drive 316 for later use.
  • the critical path cut function will be described in detail later with reference to a flowchart.
  • the “CPU allocation code generation” module 416 uses the block chunk information 414 and the measurement result 410 to generate codes 418a, 418b,. If the number of block chunks is less than or equal to the number of CPU1 to CPUn, the code of each block chunk is assigned to CPU1 to CPUn as it is.
  • the block chunks are arranged so that the number of block chunks is equal to the number of CPUs 1 to CPUn.
  • the coupling at this time is preferably chosen optimally so that the expected execution time of the resulting critical path is minimized.
  • codes 418a, 418b,..., 418m to be assigned to CPU1 to CPUn and dependency information 420 are generated.
  • the reason why the dependency relationship information 420 is necessary is as follows. That is, as shown in FIG. 10, when the original processing flow is divided by the critical path cut function, the dependency between the original blocks may be broken. In order to compensate for this, the module 416, for example, which code among the codes 418a, 418b,... 418m assigned to the CPU1 to CPUn returns a variable used in which other code, etc.
  • the dependency relationship information 420 is also provided. In practice, the dependency relationship information 420 is created by the “Critical Path Cut” module 412 at the time of the cut, so that the “CPU allocation code generation” module 416 uses it.
  • the codes 418a, 418b,..., 418m generated in this way are individually compiled as executable programs by the compiler 422, and are individually assigned to be executed in parallel on the corresponding CPU1 to CPUn in the execution environment 424. It is done.
  • the dependency relationship information 420 is arranged in a common memory area of the main memory 306 so that it can be commonly referred to by the CPUs 1 to CPUn, and when the CPUs 1 to CPUn execute the codes 418a, 418b,. If necessary, it is used to refer to information on a code being executed on another CPU.
  • FIG. 5 shows the overall processing flow of this embodiment. It should be understood that this is a flow showing a work procedure and does not necessarily correspond to a computer processing flow.
  • step 502 a developer or worker uses a simulation modeling tool 402 such as MATLAB® / Simulink®, and a block diagram of a specific simulation target is shown in FIG. Create on the system or on another computer.
  • a simulation modeling tool 402 such as MATLAB® / Simulink®
  • step 504 the developer or worker generates source code 404 corresponding to the created block diagram using the function of the simulation modeling tool 402 and stores it in the hard disk drive 316.
  • step 506 the developer or worker compiles the source code 404 using the compiler 406.
  • the compiled executable program is temporarily stored in the hard disk drive 316 (not shown).
  • step 508 the developer or the worker performs an execution test using the test module 408 using the compiled execution program.
  • the measurement data of the average processing time of the block, the communication time between processors, and the execution time of the speculative success probability obtained as a result are stored in the hard disk drive 316 as the measurement result 410 in step 510.
  • step 512 the developer or worker performs a speculative test in the test module 408 using the compiled execution program.
  • the measurement data of the speculative preparation processing time, speculative success / failure confirmation processing time, and rollback processing time obtained as a result is stored in the hard disk drive 316 as the measurement result 410 in step 514.
  • step 516 the processing of the computer is started in response to the operation of the developer or worker. That is, basically, steps 516 to 524 automatically proceed by computer processing.
  • step 516 the source code 404 is processed by the “cut critical path” module 412.
  • a critical path in the entire processing flow described in the source code 404 is found by an algorithm, and is optimally cut in processing time.
  • the process of cutting the critical path is performed recursively. At this time, the measurement result 410 is used.
  • the data structure stored at this time may be any data structure that is computer readable and can express both the contents of the source code and the connection relationship (link), such as XML.
  • the “CPU allocation code generation” module 416 uses the information of the block chunk 414, the “CPU allocation code generation” module 416 generates a code to be individually allocated to the CPU1 to CPUn. That is, if the number of block chunks is smaller than the number of CPUs 1 to CPUn, they are assigned to CPU1 to CPUn one by one as they are. On the other hand, if the number of block chunks is larger than the number of CPU1 to CPUn, the block chunks are combined so as to be the shortest in terms of execution time so as to be equal to the number of CPU1 to CPUn. At this time, the measurement result 410 is used.
  • step 522 the code generated by the module 416 is compiled by the compiler 422.
  • step 524 the code is individually assigned to the corresponding processors CPU1 to CPUn and executed.
  • step 602 a process of finding the optimum cut of the critical path is performed.
  • the optimum cut is, reference is made to FIG.
  • FIG. 8 shows a processing flow composed of blocks A to I.
  • the B-C-D-E-F is identified as a critical path by the algorithm that finds the critical path, in step 602, a possible path along B-C-D-E-F is possible.
  • the cuts c1, c2, c3, and c4 are tried sequentially by the “cut critical path” module 412. For example, to try the cut c3, the critical path is cut at c3, and the cut flow is logically moved to the side as shown in FIG. Then, two flows will be juxtaposed. Therefore, cut c3 is evaluated.
  • Evaluating the cut c3 is to evaluate the longer value T c by comparing the expected execution times of the two juxtaposed flows, assuming that the speculative success probability is 100%. However, generally, since the speculative success probability is lower than 100%, Tc is evaluated in consideration of the speculative success probability as will be described with reference to FIG. Such a cut with the shortest Tc is called an optimum cut.
  • the expected execution time of each block is measured in advance by an execution test shown in step 508 of FIG. 5 and stored in the hard disk drive 316 as a measurement result 410. Note that such measurement results 410 are used in calculating the expected execution time for a given flow.
  • MSCxy Message transmission cost from block X to block Y when block X and block Y are cut.
  • MRCxy Message reception cost from block X to block Y when block X and block Y are cut.
  • SCxy speculative cost from block X to block Y.
  • SCCxy Speculation check cost from block X to block Y.
  • RBCxy Rollback cost when speculation from block X to block Y fails.
  • the cost between these blocks is also measured in advance by the execution test shown in step 508 and the speculative test shown in step 512 in FIG. 5 and stored in the hard disk drive 316 as the measurement result 410.
  • T cs
  • represents the execution time of block D.
  • the “cut critical path” module 412 determines whether or not an optimum cut exists.
  • the existence of the optimum cut means that the entire expected processing time is shortened as a result of the cut. Cutting in any case does not necessarily reduce processing time. That is, in view of the transmission cost, the reception cost, and the speculative cost described above, the processing time may not be shortened even if it is cut. In such a case, it is determined in step 604 that there is no optimum cut, and in step 606, information on the block chunk currently being evaluated is preferably stored in the hard disk drive 316.
  • step 604 if it is determined in step 604 that the optimum cut exists, the “cut critical path” module 412 moves the cut block in step 608. This is a process as shown in FIG.
  • step 610 the process of the flowchart of FIG. 6 is recursively called for the entire set of paths that have been cut.
  • the blocks A, B, C, D, E, F, G, H, and I the blocks A, B, C, D, and E are applied.
  • F and blocks G, H, and I where the processing of the flowchart of FIG. 6 is recursively called.
  • step 702 processing for finding a critical path is performed.
  • the process itself for finding the critical path for the process flow is well known in the art, For example, the PERT method described in http://www.kogures.com/hitoshi/webtext/pt-pert/index.html can be used.
  • step 706 it is determined whether or not C is empty. If not, the process proceeds to step 708, and cut c is extracted from C.
  • step 710 the expected execution time of cut c is calculated and substituted for t c .
  • the calculation of the execution time here includes the case of speculative execution described with reference to FIG.
  • steps 708, 710, 712 and 714 are executed, the result of c min is returned to step 602 in FIG.
  • the determination at step 604 in FIG. 6 becomes negative.
  • FIG. 10 schematically shows the result of such processing.
  • the processing flow of the block shown on the left side of FIG. 10 is cut at a plurality of locations by the recursive procedure of the processing shown in the flowchart of FIG. 6, and a plurality of subdivided block chunks are converted as shown on the right side of FIG. can get.
  • step 1104 If it is determined in step 1104 that p ⁇ b, this means that the number of processors is insufficient to individually allocate block chunks as they are, so in step 1108, the two block chunks are combined, Processing is performed to reduce the number of block chunks by one.
  • Joining two block chunks may result in a longer critical path and longer expected processing time at the joined block chunk.
  • an optimal combination is found that minimizes the expected processing time of the result of combining the two block chunks.
  • FIG. 14 schematically shows such processing.
  • step 1104 becomes negative. Now, there are as many processors as there are individual block chunks assigned, so in step 1106, the resulting individual block chunks stored at that time are assigned to individual processors, and the process End.
  • FIG. 12 is a flowchart showing the process of step 1108 of FIG. 11 in more detail.
  • S 1 current set of block chunks
  • t min
  • u min
  • means an appropriate constant sufficiently larger than the number actually assumed in this situation.
  • step 1204 it is determined whether S 1 is empty. If so, the process is completed, and the process returns to step 1108 in the flowchart of FIG. If S 1 is not empty, at step 1206, one block chunk s 1 is retrieved from S 1 .
  • S 2 is determined is whether empty or not, and if so, returns to step 1204. If S 2 is not empty, at step 1212 one block chunk s 2 is retrieved from S 2 .
  • step 1214 the execution time when s 2 is combined under s 1 is calculated using the measurement result 410 of each block shown in FIG. 4 and substituted into T s1s2 .
  • the case where s 2 s 1 is omitted.
  • the original upstream / downstream relationship can be determined, the original upstream / downstream relationship may be combined.
  • step 1216 it is determined whether T s1s2 is equal to T min . If so, at step 1218, the expected cost when s 2 is combined under s 1 is calculated and assigned to u s1s2 .
  • the cost refers to the execution time of each block, the cost of sending and receiving messages between blocks across different processors, the speculative cost, the speculative check cost, and the rollback cost in the event of speculative failure. This is an expected value of the total CPU consumption time calculated by weighting with probability.
  • step 1216 the process proceeds to step 1224, where it is determined whether T s1s2 ⁇ T min . If so, step 1222 is executed before returning to step 1210. Otherwise, the process returns from step 1224 to step 1210.
  • FIG. 13 shows an example of combining block chunks.
  • t bc2 bc3
  • + MRCac + MRCif u bc2 bc3
  • t bc1 bc4 p 1 p 2 (
  • u bc1 bc4
  • FIG. 14 shows that when there are six block chunks bc1, bc2, bc3, bc4, bc5, bc6, and there are only five CPUs, in order to reduce the block chunk by one, “CPU allocation code”
  • FIG. 10 illustrates the process when the “Generate” module 416 attempts to combine two block chunks.
  • the “CPU allocation code generation” module 416 calculates the longest execution time t s1s2 for all possible block chunk combinations, and consequently selects the block chunk combination that exhibits the shortest t s1s2 .
  • the code for each CPU generated in this way is stored in the hard disk drive 316 once it is compiled by the compiler 422 and converted into executable code.
  • FIG. 15 is a schematic diagram for explaining such a dependency relationship.
  • the code consisting of block A and block C is Code 1
  • the code consisting of block B and block D is Code 2
  • the code consisting of block F, block H and block J is Code 3
  • the code consisting of I is Code IV4.
  • Such information is generated together with the “CPU allocation code generation” module 416 when each CPU allocation code is generated.
  • Dependency information can be included in individual CPU allocation code and notified to the compiler 422, but is preferably allocated by the CPU1 to CPUn by placing it directly on the shared memory of the execution environment 424. Dependency information can be referenced when executing the specified code.
  • the compiled executable program for each CPU is sequentially read into the main memory 306 by the execution environment 424, and the execution environment 424 Allocate processes created for possible programs to individual processors.
  • the simulation program divided into a plurality of executable programs is executed in parallel by the individual processors.
  • the process of assigning and parallelizing to a plurality of CPUs based on the program source code generated using the simulation modeling tool has been described.
  • the present invention is not limited to such a simulation program.
  • the present invention is not limited to source code, and can be applied to any source code as long as a processing block unit can be identified and its flow is described.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

 マルチプロセッサ・システムにおいて、並列化により、プログラムの実行を高速化する技法を提供するために、高速化したいプログラムのクリティカル・パスを適切にカットして、別プロセスとして分けて、個別のプロセッサに割り当てるようにする。 本発明の処理プログラムは、複数の処理ブロックからなる高速化したいプログラムのソース・コードを読み込んで、クリティカル・パスの可能なカットを全てテストして、結果のカットされたの処理ブロックの流れの処理時間が一番短くなるカットを見出す。これによって、複数の処理ブロックの群が得られる。こうして分割生成された個々のブロック・チャンクはコンパイルされて、実行環境で個別のプロセッサに各々割り当てられる。

Description

ソース・コード処理方法、システム、及びプログラム
 この発明は、マルチプロセッサ・システムにおいて、プログラムの実行を高速化する技法に関する。
 近年、科学技術計算、シミュレーションなどの分野で、複数のプロセッサをもつ、いわゆるマルチプロセッサ・システムが使用されている。そのようなシステムでは、アプリケーション・プログラムは、複数のプロセスを生成して、個別のプロセッサに、プロセスを割り当てる。それらのプロセッサは、例えば、共有のメモリ空間を利用して互いに通信しながら、処理を進める。
 最近になって特に盛んに開発されるようになってきたシミュレーションの分野として、ロボット、自動車、飛行機などのメトカトロニクスのプラントのシミュレーション用ソフトウェアがある。電子部品とソフトウェア技術に発展の恩恵により、ロボット、自動車、飛行機などでは、神経のように張り巡らされたワイヤ結線や無線LANなどを利用して、大部分の制御が電子的に行われる。
 それは、本来的には機械的装置であるのに、大量の制御ソフトウェアを内蔵することを意味する。そのため、製品の開発に当たっては、制御プログラムの開発とそのテストに、長い時間と、膨大な費用と、多数の人員を費やす必要が出てきた。
 このようなテストにために従来行われている技法として、HILS(Hardware In the Loop Simulation)がある。特に、自動車全体の電子制御ユニット(ECU)をテストする環境は、フルビークルHILSと呼ばれる。フルビークルHILSにおいては、実験室内で、本物のECUが、エンジン、トランスミッション機構などをエミュレーションする専用のハードウェア装置に接続され、所定のシナリオに従って、テストが行われる。ECUからの出力は、監視用のコンピュータに入力され、さらにはディスプレイに表示されて、テスト担当者がディスプレイを眺めながら、異常動作がないかどうか、チェックする。
 しかし、HILSは、専用のハードウェア装置を使い、それと本物のECUの間を物理的に配線しなくてはならないので、準備が大変である。また、別のECUに取り替えてのテストも、物理的に接続し直さなくてはならないので、手間がかかる。さらに、本物のECUを用いたテストであるため、テストに実時間を要する。従って、多くのシナリオをテストすると、膨大な時間がかかる。また、HILSのエミュレーション用のハードウェア装置は、一般に、非常に高価である。
 そこで近年、高価なエミュレーション用ハードウェア装置を使うことなく、ソフトウェアで構成する手法が提案されている。この手法は、SILS(Software In the Loop Simulation)と呼ばれ、ECUに搭載されるマイクロコンピュータ、入出力回路、制御のシナリオ、エンジンやトランスミッションなどのプラントを全て、ソフトウェア・シミュレータで構成する技法である。これによれば、ECUのハードウェアが存在しなくても、テストを実行可能である。
 このようなSILSの構築を支援するシステムとして例えば、CYBERNET SYSTEMS CO.,LTD.から入手可能なシミュレーション・モデリング・システムである、MATLAB(R)/Simulink(R)がある。MATLAB(R)/Simulink(R)を使用すると、図1に示すように、画面上にグラフィカル・インターフェースによって、機能ブロックA,B,...,Jを配置し、矢印のようにその処理の流れを指定することによって、シミュレーション・プログラムを作成することができる。
 こうして、MATLAB(R)/Simulink(R)上で、機能ブロックA,B,...,Jなどのブロック線図が作成されると、Real-Time Workshop(R)の機能により、等価な機能のC言語のソース・コードに変換することができる。このC言語のソース・コードをコンパイルすることにより、別のコンピュータ・システムで、SILSとして、シミュレーションを実行することができる。
 特に、別のコンピュータ・システムが、マルチプロセッサ・システムである場合、可能限り、処理を分割して、個別のプロセッサに、別々のプロセスを割り当てて並列処理する方が、処理速度の向上に有利である。
 このため従来より、CPスケジューリング手法が知られている。ここでいうCPとは、クリティカル・パスのことである。CPスケジューリング手法を利用すると、図1に示すブロック線図が、図2に示すタスク・グラフに変換される。見て取れるように、図2のタスク・グラフは、縦四列であり、各々の列の処理を個別の4つのCPUに並列的に割り当てて、1つのCPUで処理したときに比べて、実質的に2倍の速度の処理を達成できる。
 しかし、図2で、B→D→F→H→Jというパスがクリティカル・パスであって、このクリティカル・パスを処理するCPUの時間以上に、全体の処理時間を短縮できない。
 特開平6-83608号公報は、並列計算機におけるプログラム実行のボトルネックとなっている箇所を、クリティカル・パス解析部によって見つけることを開示する。
 特開平7-21240号公報は、論理回路のレイアウト設計に関し、クリティカル・パスを短くすると同時にカットラインを横切るネットの数を最小にするために、クリティカル・パスを抽出するクリティカル・パス抽出装置と、カットラインを作成するカットライン作成装置と各ブロックの結合度とクリティカル・パス情報から各ブロックのマージ相手を決定するマージ相手選択装置とマージ相手選択装置で求めた各ブロックのマージ相手からブロックのマージを行うマージ装置と、カットラインを横切るネットの数が最小になるようにペア交換を行うペアワイズ装置から構成されたシステムを開示する。
 特開平8-180100号公報は、機械の割り当てを伴うジョブショップ・スケジューリング問題に対して、効率的な近傍を生成し、近似解法と組合わせることにより、最適解を高速に求めることを開示する。
 特開平6-83608号公報及び特開平8-180100号公報は、タスク・スケジューリングの概要を開示するにすぎない。
 また、特開平7-21240号公報は、論理回路のレイアウト設計において、クリティカル・パスを短くする技法について説明するが、これは物理的レイアウトにおけるクリティカル・パスであり、ソフトウェアの論理的なクリティカル・パスの処理に適用できるものではない。
特開平6-83608号公報 特開平7-21240号公報 特開平8-180100号公報
 従って、この発明の目的は、マルチプロセッサ・システムにおいて、並列化により、プログラムの実行を高速化する技法を提供することにある。
 上記目的は、高速化したいプログラムのクリティカル・パスを適切にカットして、別プロセスとして分けて、個別のプロセッサに割り当てるようにすることによって、達成される。これによって、シミュレーションの投機実行のために最適なコードを出力することが可能となる。
 すなわち、本発明の処理プログラムは、複数の処理ブロックからなる、高速化したいプログラムのソース・コードを読み込んで、クリティカル・パスの可能なカットを全てテストして、結果のカットされたの処理ブロックの流れの処理時間が一番短くなるカットを見出す。
 このような処理時間の見積もりを可能ならしめるために、予め、処理プログラムをコンパイルして、各処理ブロックの実行時間その他の値を計測しておくフェーズを行っておく。このとき計測される値には、処理が異なるプロセッサにまたがった際のメッセージングのコストや、投機実行のために必要な処理や、投機が失敗した際のロールバックのコスト、更には各ブロックへの入力の予測がどの程度当たるのか(すなわち、投機成功確率)といった計測データも含まれる。
 クリティカル・パスの可能なカットの処理は、カットした結果のパスに対して、再帰的に適用される。そうして、これ以上カットしても、プロセッサ間の通信時間などを加味すると却って全体の処理時間が長くなってしまうような段階で、カットを停止する。これによって、複数の処理ブロックの群が得られる。特に、この明細書の説明では、各処理ブロックの群を、ブロック・チャンク(block chunk)と呼ぶことにする。
 こうして分割生成されたブロック・チャンクの数が、マルチプロセッサ・システムのプロセッサの数と同等またはそれ以下であるなら、個々のブロック・チャンクは、そのままコンパイルされて、実行環境で、個別のプロセッサに各々、割り当てられる。
 しかし、もしブロック・チャンクの数が、プロセッサの数よりも多いと、本発明の処理プログラムは、ブロック・チャンクの数がプロセッサの数に等しくなるように、ブロック・チャンクの結合を試みる。このとき、好適には、結果の結合されたブロック・チャンクのうちのクリティカル・パスに係る処理時間の最大値が一番小さくなるような結合が選ばれる。
 この結果のブロック・チャンクは、コンパイルされて、実行環境で、個別のプロセッサに各々、割り当てられる。こうして、全てのブロック・チャンク1つに、1つのプロセッサがアサインされるので、最適な並列処理が行われる。
 以上のように、この発明によれば、マルチプロセッサ環境で、クリティカル・パスの長さと、プロセッサ割り当ての両方につき改善された、高速なプログラムの実行が可能となる。また、シミュレーションの投機実行のために最適なコードを出力することができる。
シミュレーション・モデリング・ツールのブロック線図の例を示す図である。 CPスケジューリング手法の例を示す図である。 本発明を実施するためのハードウェアのブロック図である。 本発明の一実施例の機能ブロック図である。 本発明の一実施例の処理の流れを示す図である。 クリティカル・パスをカットする処理のフローチャートである。 クリティカル・パスをカットする処理のフローチャートである。 クリティカル・パスをカットする処理の例の模式図である。 投機を含む場合の期待される実行時間を示す図である。 ブロック・チャンク形成処理の例の模式図である。 CPU割当て用コード生成処理のフローチャートである。 CPU割当て用コード生成処理のフローチャートである。 ブロック・チャンク結合処理の例の模式図である。 ブロック・チャンク結合処理の例の模式図である。 ブロックの間の依存関係を説明するための図である。
 以下、図面を参照して、本発明の一実施例の構成及び処理を説明する。以下の記述では、特に断わらない限り、図面に亘って、同一の要素は同一の符号で参照されるものとする。なお、ここで説明する構成と処理は、一実施例として説明するものであり、本発明の技術的範囲をこの実施例に限定して解釈する意図はないことを理解されたい。
 次に、図3を参照して、本発明を実施するために使用されるコンピュータのハードウェアについて説明する。図5において、ホスト・バス302には、複数のCPU1 304a、CPU2 304b、CPU3 304c、・・・CPUn 304nが接続されている。ホスト・バス502にはさらに、CPU1 304a、CPU2 304b、CPU3 304c、・・・CPUn 304nの演算処理のためのメイン・メモリ306が接続されている。
 一方、I/Oバス308には、キーボード310、マウス312、ディスプレイ314及びハードティスク・ドライブ316が接続されている。I/Oバス308は、I/Oブリッジ318を介して、ホスト・バス302に接続されている。キーボード310及びマウス312は、オペレータが、コマンドを打ち込んだり、メニューをクリックするなどして、操作するために使用される。ディスプレイ314は、必要に応じて、後述する本発明に係るプログラムをGUIで操作するためのメニューを表示するために使用される。
 この目的のために使用される好適なコンピュータ・システムのハードウェアとして、IBM(R)System Xがある。その際、CPU1 304a、CPU2 304b、CPU3 304c、・・・CPUn 304nは、例えば、インテル(R)Xeon(R)であり、オペレーティング・システムは、Windows(商標)Server 2003である。オペレーティング・システムは、ハードティスク・ドライブ316に格納され、コンピュータ・システムの起動時に、ハードティスク・ドライブ316からメイン・メモリ306に読み込まれる。
 なお、本発明を実施するために使用可能なコンピュータ・システムのハードウェアは、IBM(R)System Xに限定されず、本発明のシミュレーション・プログラムを走らせることができるものであれば、任意のコンピュータ・システムを使用することができる。オペレーティング・システムも、Windows(R)に限定されず、Linux(R)、Mac OS(R)など、任意のオペレーティング・システムを使用することができる。さらに、シミュレーション・プログラムを高速で動作させるために、POWER(商標)6ベースで、オペレーティング・システムがAIX(商標)のIBM(R)System Pなどのコンピュータ・システムを使用してもよい。
 ハードティスク・ドライブ316にはさらに、MATLAB(R)/Simulink(R)、Cコンパイラまたは、C++コンパイラ、本発明に係るクリティカル・パスをカットすためのモジュール、CPU割り当て用コード生成モジュール、処理ブロックの期待される実行時間を測定するためのモジュールなどが格納されており、オペレータのキーボードやマウス操作に応答して、メイン・メモリ306にロードされて実行される。
 尚、使用可能なシミュレーション・モデリング・ツールは、MATLAB(R)/Simulink(R)に限定されず、オープンソースのScilab/Scicosなど任意のシミュレーション・モデリング・ツールを使用することが可能である。
 あるいは、場合によっては、シミュレーション・モデリング・ツールを使わず、直接、C、C++などでシミュレーション・システムのソース・コードを書くことも可能であり、その場合にも、本発明は適用可能である。
 図4は、本発明の実施例に係る機能ブロック図である。各々のブロックは、基本的に、ハードティスク・ドライブ316に格納されているモジュールに対応する。
 図4において、シミュレーション・モデリング・ツール402は、MATLAB(R)/Simulink(R)、Scilab/Scicosなどの既存の任意のツールでよい。シミュレーション・モデリング・ツール402は、基本的には、オペレータが、ディスプレイ314上でGUI的に機能ブロックを配置し、数式など必要な属性を記述し、必要に応じて、機能ブロック間を関連付けてブロック線図を記述することを可能ならしめるような機能をもつ。シミュレーション・モデリング・ツール402はさらに、記述されたブロック線図に等価な機能を記述するCのソース・コードを出力する機能をもつ。C以外にも、C++、Fortranなどを使用することができる。
 なお、シミュレーション・モデリング・ツールは、別のパーソナル・コンピュータに導入して、そこで生成されたソース・コードを、ネットワークなどを経由して、ハードティスク・ドライブ316にダウンロードするようにすることもできる。
 こうして出力されたソース・コード404は、ハードティスク・ドライブ316に保存される。ソース・コード404は、コンパイラ406でコンパイルされ、結果の実行可能プログラムは、テスト・モジュール408に渡される。
 テスト・モジュール408は、実行テストを行う機能と、投機テストを行う機能を有する。実行テストでは、所定のシナリオにより、図1に示すような各ブロックの平均処理時間、プロセッサ間通信時間、及び投機成功確率が測定される。平均時間を測定するために、好適には同一のシナリオが、複数回実行される。その測定結果410は、後で使用するために、ハードティスク・ドライブ316に保存される。
 投機テストでは、別の所定のシナリオにより、結果の実行可能プログラムを投機実行させる。そのシナリオを繰り返すことにより、投機準備の処理時間すなわち、投機が失敗してロールバックする場合に備えて、予測した入力値を保存したりする処理のための時間と、投機成否確認の処理時間すなわち、実際のデータが来たときにそれが予測していたデータと一致するかを確認する処理の時間と、ロールバック処理時間すなわち、投機が失敗した、つまり予測した入力と実際の値が異なっていたことが分かったときに、間違った入力に基づいて行われた処理を止めたり、データの消去などの後処理に要する時間が計測される。そのような値もまた、その測定結果410として、後で使用するために、ハードティスク・ドライブ316に保存される。
 なお、投機成功確率は、実は実際に投機実行を行わなくても算出することができる。投機実行では、本来来るべき入力が来る前に処理が実行されるので、その入力を予測して処理が実行される。従って、投機が成功する確率は、入力に対する予測が的中する確率と等しくなる。その入力を予測するアルゴリズムが定まっていれば、実際に投機実行をしなくても(すなわち、予測した入力データに基づくブロックの処理を実行しなくとも)実際の入力データのみから、予測アルゴリズムの予測成功確率を算出することができる。すなわち、単に「実行テスト」において、各ブロックに対する入力を記録しておき、その入力データ系列から、入力予測アルゴリズムの予測成功率を算出することで、投機成功確率を求めることができる。一方、投機実行をしたとき、あるいは投機実行が失敗したときにどの程度の時間がかかるかは、実際に投機実行をしてみないと分からない。そのため、それらの情報を得るために投機テストが行なわれる。ただし、投機実行の実装が定まれば、投機準備や投機の成否確認、投機失敗時のロールバックに要する処理時間は、入力データ量に比例した処理時間となることが予想される。従って、「投機テスト」においては、全てのブロックを投機実行しなくてもよく、いくつかの、入力データ量の異なるブロックを投機実行してみることで、入力データ量と投機関連処理時間の関係が得られ、それに基づいて全てのケースのコストを算出することができる。
 「クリティカル・パスのカット」モジュール412は、ソース・コード404を原則的にブロック単位で処理して、クリティカル・パスを見出し、カットを入れて、最適な実行時間になるカットを見出す機能をもつ。この際、測定結果410の情報が使用される。モジュール412はさらに、クリティカル・パスのカット機能を再帰的に適用して、図10に示すような、小分けされたブロック・チャンクを得る。そうして生成されたブロック・チャンクの情報414は、後で使用するために、ハードティスク・ドライブ316に保存される。クリティカル・パスのカット機能は、後でフローチャートを参照して、詳細に説明する。
 「CPU割当て用コード生成」モジュール416は、ブロック・チャンクの情報414と、測定結果410とを用いて、CPU1~CPUnに割当てるコード418a、418b、・・・、418mを生成する。もしブロック・チャンクの数が、CPU1~CPUnの数より少ないか等しいと、各ブロック・チャンクのコードは、そのままCPU1~CPUnに割当てられる。
 しかし、もしブロック・チャンクの数が、CPU1~CPUnの数より多いと、図14に模式的に示すように、ブロック・チャンクの数がCPU1~CPUnの数と等しくなるように、ブロック・チャンク同士が結合される。但し、このときの結合は、好適には、結果のクリティカル・パスの期待される実行時間が最も少なくなるように、最適に選ばれる。CPU割当て用コード生成機能も、後でフローチャートを参照して、詳細に説明する。
 この結果生成されるのは、CPU1~CPUnに割当てるコード418a、418b、・・・、418mと、依存関係の情報420である。依存関係の情報420が必要である理由は、次のとおりである。すなわち、図10に示すように、もともとの処理のフローが、クリティカル・パスのカット機能によって分断されると、もともとのブロック間の依存関係が切れてしまうことがある。これを補うために、モジュール416は、例えば、CPU1~CPUnに割当てるコード418a、418b、・・・、418mのうち、どのコードが、他のどのコードで使われている変数をリターンするか、などいう依存関係の情報420も提供する。実際上、依存関係の情報420は、「クリティカル・パスのカット」モジュール412によって、カット時に作成されるので、「CPU割当て用コード生成」モジュール416は、それを利用することになる。
 こうして生成されたコード418a、418b、・・・、418mは、コンパイラ422で個別に実行可能プログラムとしてコンパイルされ、実行環境424では、対応するCPU1~CPUn上で並列実行されるように、個別に割り当てられる。なお、依存関係の情報420は、CPU1~CPUnによって共通に参照可能に、メイン・メモリ306の共通メモリ領域に配置され、CPU1~CPUnがコード418a、418b、・・・、418mを実行する際に、必要に応じて、他CPU上で実行されているコードの情報を参照するために使用される。
 図5は、この実施例の全体の処理の流れを示す。これは作業手順を示す流れであり、個々には必ずしもコンピュータの処理のフローとは対応しないことを理解されたい。
 図5で、ステップ502では、開発者または作業者が、MATLAB(R)/Simulink(R)などのシミュレーション・モデリング・ツール402を使って、特定のシミュレーション対象のブロック線図を、図3に示すシステム、または別のコンピュータ上で、作成する。
 ステップ504では、開発者または作業者が、作成したブロック線図に対応するソース・コード404を、シミュレーション・モデリング・ツール402の機能を使って生成し、ハードティスク・ドライブ316に保存する。
 ステップ506では、開発者または作業者が、コンパイラ406を使って、ソース・コード404をコンパイルする。コンパイルされた実行可能プログラムは、図示しないが、一旦、ハードティスク・ドライブ316に保存される。
 ステップ508では、開発者または作業者が、コンパイルされた実行プログラムを使用して、テスト・モジュール408で、実行テストを行う。この結果得られたブロックの平均処理時間、プロセッサ間通信時間、及び投機成功確率の実行時間の計測データは、ステップ510で、計測結果410として、ハードティスク・ドライブ316に保存される。
 ステップ512では、開発者または作業者が、コンパイルされた実行プログラムを使用して、テスト・モジュール408で、投機テストを行う。この結果得られた投機準備の処理時間、投機成否確認の処理時間、及びロールバック処理時間の計測データは、ステップ514で、計測結果410として、ハードティスク・ドライブ316に保存される。
 ステップ516では、開発者または作業者の操作に応答して、コンピュータの処理が開始される。すなわち、基本的に、ステップ516からステップ524までは、コンピュータの処理によって自動的に進行する。
 ステップ516では、「クリティカル・パスのカット」モジュール412によって、ソース・コード404が処理される。具体的な処理は後述するが、ソース・コード404に記述されている全体の処理フローにおけるクリティカル・パスをアルゴリズムにより発見し、それを処理時間的に最適にカットし、カットした後の処理フローにおいて、クリティカル・パスをカットするという処理を再帰的に行う。この際に、測定結果410が用いられる。
 この結果、図10に示すような複数のブロック・チャンクが得られるので、ステップ518で、それらに関する情報が、ブロック・チャンク414として、ハードティスク・ドライブ316に保存される。なお、このとき保存されるデータ構造であるが、XMLなど、コンピュータ可読で、ソースコードの内容と連結関係(リンク)の両方を表現可能な任意のデータ構造を用いることができる。
 ステップ520では、ブロック・チャンク414の情報を用いて、「CPU割当て用コード生成」モジュール416が、CPU1~CPUnに個別に割当てるためのコードを生成する。すなわち、もしブロック・チャンクの数がCPU1~CPUnの個数よりも少なければ、そのまま1つずつCPU1~CPUnに割当てる。一方、CPU1~CPUnの個数よりも、ブロック・チャンクの数が多ければ、CPU1~CPUnの個数と等しくなるように、ブロック・チャンクが、実行時間的に最短になるように結合される。この際に、測定結果410が用いられる。
 ステップ522では、モジュール416によって生成されたコードが、コンパイラ422によってコンパイルされ、ステップ524で、個々に、対応するプロセッサCPU1~CPUnに割当てられて、各々実行される。
 次に、図6と図7のフローチャートを参照して、図5のステップ516に対応する、クリティカル・パスのカットの処理を説明する。ステップ602では、クリティカル・パスの最適カットを見つける、という処理が行われる。ここで最適カットが何かということを説明するために、図8を参照する。
 図8では、ブロックA~Iからなる処理のフローが示されている。ここで、クリティカル・パスを見つけるアルゴリズムによって、B-C-D-E-Fがクリティカル・パスであると同定されたとすると、ステップ602では、B-C-D-E-Fに沿った可能なカットc1, c2, c3, c4を、「クリティカル・パスのカット」モジュール412が順次試すことになる。例えば、カットc3を試すとは、c3のところでクリティカル・パスをカットし、図8に示すように、カットされたフローを、論理的に、脇に移動される。すると、2つのフローが並置されることになる。そこでカットc3を評価する。カットc3を評価するとは、もし投機成功確率が100%であると仮定すると、並置された2つのフローの期待される実行時間を比較して、長い方の値Tcを評価することである。しかし、一般的には、投機成功確率は、100%より低いので、図9で説明するように、投機成功確率を考慮に入れて、Tcが評価される。このようなTcが一番短くなるようなカットを、最適カットと呼ぶことにする。
 最適カットを見つけるためのより詳しい処理(サブルーチン)は、後で図7のフローチャートを参照して説明する。
 なお、各ブロックの期待される実行時間は、図5のステップ508に示す実行テストで予め計測され、計測結果410としてハードディスク・ドライブ316に保存されている。そのような計測結果410が、所与のフローの期待される実行時間を計算する際に使用されることに留意されたい。
 実際上、実行時間を見積もるためには、単純にフローに沿ってブロックの期待される実行時間を実行するだけでは済まない。そのことを図9を参照して説明する。
 ここで、次のような変数を定義する。ここで、コストとは、時間とみなしてよい。
  MSCxy : ブロックXとブロックYがカットされているときの、ブロックXからブロックYについてのメッセージ送信コスト。
  MRCxy : ブロックXとブロックYがカットされているときの、ブロックXからブロックYについてのメッセージ受信コスト。
  SCxy : ブロックXからブロックYについての投機コスト。
  SCCxy : ブロックXからブロックYについての投機チェックコスト。
  RBCxy : ブロックXからブロックYについての投機が失敗した場合のロールバック・コスト。
 これらのブロック間のコストも、図5のステップ508に示す実行テスト及びステップ512で示す投機テストで予め計測され、計測結果410としてハードディスク・ドライブ316に保存されている。
 すると、クリティカル・パスB-C-D-E-FのCとDの間にカットcを入れるということは、結果の期待される実行時間を、図9に示すように、投機が成功した場合と、投機が失敗した場合との期待値で見積もる必要がある。
 投機が成功した場合は、カットした結果の2つのフローの長い方の実行時間が結果の期待される時間となって、それは、
Tcs = |D|+|E|+|F|+SCcd+MRCif+MRCcd+SCCcd
 ここで、例えば|D|は、ブロックDの実行時間をあらわす。
 一方、投機が失敗した場合は、B-Cと、D-E-Fが直列実行されるので、期待される時間は、
Tcf = |B|+|C|+|D|+|E|+|F|+MRCac+MSCcd+MRCcd+RBCcd+MRCif
 ところで、このような投機の成功確率pcは、図5のステップ508に示す実行テストで予め計測され、計測結果410としてハードディスク・ドライブ316に保存されている。これを用いて、結果の期待される実行時間は、
Tc = pcTcs + (1-pc)Tcfと計算される。
 図6のフローチャートに戻って、ステップ602の処理の結果をもって、ステップ604では、「クリティカル・パスのカット」モジュール412が、最適カットが存在するかどうかを判断する。最適カットが存在するとは、カットした結果、全体の期待される処理時間が短縮されることを意味する。どんな場合でもカットすると処理時間が短縮されるとは限らない。すなわち、上記した送信コスト、受信コスト、及び投機コストに鑑みると、カットしても処理時間の短縮が図れない場合がある。そのような場合、ステップ604で最適カットが存在しないと判断して、ステップ606で、現在評価しているブロック・チャンクの情報が、好適にはハードディスク・ドライブ316に保存される。
 一方、ステップ604で最適カットが存在すると判断されると、「クリティカル・パスのカット」モジュール412は、ステップ608で、カットされたブロックを移動する。これは、図8に示すような処理である。
 ステップ610では、カットされてできたパスの集合全体に対して、図6のフローチャートの処理が再帰呼び出しされる。図8のブロックで説明すると、先ずブロックA、B、C、D、E、F、G、H、Iについて図6のフローチャートの処理が適用された結果、ブロックA、B、C、D、E、Fと、ブロックG、H、Iに分けられ、そこで、図6のフローチャートの処理が再帰呼び出しされる。
 次に、図7のフローチャートを参照して、図6のステップ602の処理を更に詳しく説明する。ステップ702では、クリティカル・パスを見つける処理が行われる。処理フローに対してクリティカル・パスを見つける処理自体は従来周知であり、
例えば、http://www.kogures.com/hitoshi/webtext/pt-pert/index.htmlに記述されているPERTの方法などを使用することができる。
 ステップ704では、tmin = クリティカル・パスに沿っての期待される時間、
cmin = null、C = クリティカル・パスの可能なカットの集合とセットされる。
 ステップ706では、Cが空かどうかが判断され、そうでなければ、ステップ708に進んで、Cからカットcが取り出される。
 ステップ710では、カットcの期待される実行時間が計算されて、それが、tcに代入される。ここでの実行時間の計算は、図9に関連して説明した、投機実行の場合も含む。
 ステップ712では、tc < tminであるかどうかが判断され、もしそうなら、ステップ714で、tmin = tc、cmin = cとセットされる。
 このように、Cの全てのカットについて、ステップ708、710、712及び714が実行され、結果のcminが、図6のステップ602に返される。このとき、Cのどのようなカットも、tmin = クリティカル・パスに沿っての期待される時間よりも処理時間を短縮させない場合がある。そのような場合、ステップ712での判断は肯定的にならないので、ステップ714は実行されず、よって、cmin = nullのままである。すると、図6のステップ604の判断が否定的になる。
 このような処理の結果を模式的に示したのが、図10である。図10の左側に示すブロックの処理の流れが、図6のフローチャートに示す処理の再帰的手続きによって複数箇所でカットされ、図10の右側に示すように、細分化された複数のブロック・チャンクが得られる。
 次に、図11と図12のフローチャートを参照して、図5のステップ520に対応する、CPU割当てコード生成の処理を説明する。これは、図4の「CPU割当てコード生成」モジュール416によって実行される。
 ステップ1102では、p = プロセッサ(CPU)の数、b = ブロック・チャンクの数とセットされる。
 ステップ1104では、p < bかどうかが判断される。それが否定的、すなわち p >= bであるなら、そのままでブロック・チャンクを個々に割り当てるだけの数のプロセッサがあるので、ステップ1106で、適宜個々のブロック・チャンクを、個々のプロセッサに割り当てて、処理は終わる。
 ステップ1104で、p < bと判断されたなら、そのままでブロック・チャンクを個々に割り当てるにはプロセッサの数が不足することを意味するので、ステップ1108で、2つのブロック・チャンクを結合して、ブロック・チャンクの数を1つ減らす処理が行われる。
 2つのブロック・チャンクを結合するということは、その結合したブロック・チャンクのところで、クリティカル・パスが長くなって期待される処理時間が長くなる場合がある。そこでステップ1108では、2つのブロック・チャンクを結合した結果の期待される処理時間が最短になるような最適な組み合わせが見出される。そのような処理を模式的に示すのが、図14である。
 ステップ1110では、bが1減らされて、ステップ1104の判断に戻る。こうして、p = bになるまで、ステップ1108とステップ1110が繰り返される。
 p = bになると、ステップ1104が否定的になる。するといまや、そのままでブロック・チャンクを個々に割り当てるだけの数のプロセッサがあるので、ステップ1106で、その時点で保存されている結果の個々のブロック・チャンクを、個々のプロセッサに割り当てて、処理は終わる。
 なお、何個かのCPUを他の処理のために留保したい場合には、b < pとなるまでさらに、ブロック・チャンクの数を減らすことがある。
 図12は、図11のステップ1108の処理をより詳細に示すフローチャートである。図12において、ステップ1202では、S1 = 現在のブロック・チャンクの集合、tmin = ∞、umin = ∞、b1 = b2 = nullと置かれる。ここで、∞というのは、この状況で、実際的に想定される数よりも十分大きい適当な定数という意味である。
 ステップ1204では、S1が空かどうかが判断され、もしそうなら処理が完了して、図11のフローチャートのステップ1108に戻る。S1が空でないなら、ステップ1206で、S1から1つのブロック・チャンクs1が取り出される。
 ステップ1208では、S2 = 現在のブロック・チャンクの集合とセットされる。ステップ1210では、S2が空かどうかが判断され、もしそうなら、ステップ1204に戻る。S2が空でないなら、ステップ1212で、S2から1つのブロック・チャンクs2が取り出される。
 ステップ1214では、s2がs1の下に結合されたときの実行時間が、図4に示す各ブロックの計測結果410を使用して、計算され、Ts1s2に代入される。ここで、s2 = s1となる場合は省かれる。また、どのブロック・チャンクも、オリジナルのブロックのフローの一部であるから、任意の2つのブロック・チャンクの間で、どちらがもともと上流であったかが決定できる場合がある。そこで、好適には、ステップ1214では、オリジナルの上下流関係が判定できるなら、その上下流関係を維持するように、結合させるようにしてもよい。
 ステップ1216では、Ts1s2がTminと等しいかどうかが判断される。もしそうなら、ステップ1218で、s2がs1の下に結合されたときの期待されるコストが計算され、us1s2に代入される。ここでコストとは、各ブロックの実行時間、異なるプロセッサにまたがるブロック間のメッセージ送受信コスト、投機コスト、投機チェックコスト、投機失敗時のロールバックコストに、可能な投機の成否の組み合わせ毎に投機成功確率で重み付けして算出する、全CPU消費時間の期待値である。
 次に、ステップ1220では、us1s2 < uminであるかどうかが判断され、もしそうなら、ステップ1222で、
Tmin = Ts1s2、b1 = s1、b2 = s2、uminには、s2がs1の下に結合されたときの期待されるコストが代入される。ステップ1222からは、ステップ1210の判断に戻る。
 一方、ステップ1216で、Ts1s2がTminと等しくないなら、ステップ1224に進み、そこで、Ts1s2 < Tminかどうかが判断される。もしそうならステップ1222が実行されてからステップ1210の判断に戻る。そうでないなら、ステップ1224から直ちにステップ1210の判断に戻る。
 図13は、ブロック・チャンクの結合の例を示す。この例では、図示されているようにブロック・チャンクbc1, bc2, bc3, bc4の4つがあるとする。するとこれからは、オリジナルのフローの上下流に拘らないなら、12通りの結合がありえるが、その全てを網羅して説明するのは冗長なので、代表的に、左下に示す、bc3がbc2の下に結合される場合と、右下に示すbc4がbc1の下に結合される場合について説明する。
 先ず、bc3がbc2の下に結合される場合だと、期待される実行時間tbc2 bc3と、期待されるコストubc2 bc3はそれぞれ、次のように計算される。
tbc2 bc3 = |B|+|C|+|D|+|E|+|F|+MRCac+MRCif
ubc2 bc3 = |A|+|B|+|C|+|D|+|E|+|F|+|G|+|H|+|I|
               +MRCac+MRCif+MSCac+MSCif
 一方、bc4がbc1の下に結合される場合だと、期待される実行時間tbc1 bc4と、期待されるコストubc1 bc4はそれぞれ、次のように計算される。
tbc1 bc4 = p1p2(|D|+|E|+|F|+ SCcd + SCif + MRcd + SCCcd + MRCif + SCCif)+         p1(1-p2)(|A|+|G|+|H|+|I|+|F|+MSAac+MSCif+MRCif+SCCif+RBCif)+
         (1-p1)(|B|+|C|+|D|+|E|+|F| + MRCac +
         MSCcd + MRCcd + SCCcd + RBCcd + MRCif)
ubc1 bc4 = |A|+|B|+|C|+|D|+|E|+|F|+|G|+|H|+|I|+
         p1p2(SCcd + SCif + MRcd + SCCcd + MRCif + SCCif)+
         p1(1-p2)(MSAac+MSCif+MRCif+SCCif+RBCif)+
         (1-p1)(MRCac + MSCcd + MRCcd + SCCcd + RBCcd + MRCif)
 ここで、p1及びp2は、図示されている経路での投機の成功確率である。
 上記の個々の値はすべて、計測結果410から取得される。
 図14は、ブロック・チャンクがbc1, bc2, bc3, bc4, bc5,bc6の6個あって、一方、CPUが5個しかない場合に、ブロック・チャンクを1つ減らすために、「CPU割当てコード生成」モジュール416が、2つのブロック・チャンクの結合を試みる場合の処理を示す図である。
 図14の左下の場合では、bc4の下にbc6が結合されて、結果的に、bc3が全体の最長の実行時間ts1s2を与える。
 図14の右下の場合では、bc1の下にbc5が結合されて、結果的に、bc1が全体の最長の実行時間ts1s2を与える。
 「CPU割当てコード生成」モジュール416は、可能な全てのブロック・チャンクの組み合わせに最長の実行時間ts1s2を計算して、結果的に最短のts1s2を示すブロック・チャンクの結合を選ぶ。
 このようにして生成されたCPU毎のコードは、各々、コンパイラ422によってコンパイルされ実行可能コードに変換されると、一旦ハードディスク・ドライブ316に保存される。
 ところで、もともと繋がっていたブロックのフローにカットを入れると、カットされた結果の各々のブロックの間の依存関係が切れてしまうことがあるので、そのような情報を補う必要がでてくる。図15は、そのような依存関係を説明するための模式図である。
 図15において、ブロックA及びブロックCからなるコードをCode 1、ブロックB及びブロックDからなるコードをCode 2、ブロックF、ブロックH及びブロックJからなるコードをCode 3、ブロックE、ブロックG及びブロックIからなるコードをCode 4とする。
 Code 1、Code 2、Code 3、Code 4の中身は、図15に図示するとおりである。すると、Code 3の引数が、それぞれ、Code 1、Code 2、のCode 4の最初の返り値を使用していることが見てとれる。
 そのことは例えば、下記のように記述される。
1st output of Code 1 -> 1st argument of Code 3
1st output of Code 2 -> 2nd argument of Code 3
1st output of Code 3 -> 3rd argument of Code 3
 このような情報は、「CPU割当てコード生成」モジュール416が、個々のCPU割当て用コードを生成するときに、併せて生成する。
 依存関係の情報は、個々のCPU割当て用コードに含めて、コンパイラ422に通知することもできるが、好適には、直接実行環境424の共有メモリ上に配置するなどして、CPU1~CPUnが割当てられたコードを実行するときに、依存関係の情報を参照できるようにする。
 こうしておいて、オペレータの操作により、シミュレーション動作が開始されると、コンパイルされた各CPU用の実行可能プログラムが順次、実行環境424によってメイン・メモリ306に読み込まれ、実行環境424は、個々の実行可能プログラムに関して生成されたプロセスを、個別のプロセッサに割り当てる。こうして、複数の実行可能プログラムに分割されたシミュレーション・プログラムは、個々のプロセッサによって並列的に実行される。
 以上の実施例では、シミュレーション・モデリング・ツールを用いて生成したプログラム・ソース・コードに基づき、複数のCPUに割り当てて並列化する処理について説明したが、本発明は、そのようなシミュレーション・プログラムのソース・コードに限定されず、処理ブロック単位が同定でき、また、その流れが記述されているなら、任意のソース・コードに適用可能である。
404・・・ソース・コード
406、422・・・コンパイラ
412・・・「クリティカル・パスのカット」モジュール
416・・・「CPU割当て用コード生成」モジュール
418・・・CPU用コード
420・・・依存関係情報

Claims (27)

  1.  コンピュータの処理によって、マルチプロセッサ・システムで並列実行可能とするためのソース・コードを生成する方法であって、
     プログラムのソース・コードを入力するステップと、
     前記コンピュータの処理によって、前記プログラムのソース・コードの処理のクリティカル・パスを見つけるステップと、
     前記クリティカル・パスをカットして、前記マルチプロセッサ・システムの個々のプロセッサ毎に対応して前記ソース・コードを分割するステップを有する、
     ソース・コード処理方法。
  2.  前記ソース・コードをコンパイルして実行し、前記ソース・コードの処理ブロック単位の処理時間を計測して記録するステップをさらに有し、
     前記ソース・コードを分割するステップは、前記記録された処理時間を用いて、分割されたソース・コードのうちの期待される処理時間が最大のものの期待される処理時間が、少なくとも元のソース・コードの処理時間より短くなるように分割を行う、請求項1の方法。
  3.  処理が異なるプロセッサにまたがった際のメッセージングのコスト、投機実行のために必要な処理、、投機が失敗した際のロールバックのコスト、及び各ブロックへの入力の予測がどの程度当たるのかという投機成功確率のデータを更に計測して記録するステップを有する、請求項2の方法。
  4.  前記ソース・コードを分割するステップは、前記記録された処理時間を用いて、分割されたソース・コードのうちの期待される処理時間が最大のものの期待される処理時間が最小になるように分割を行う、請求項2の方法。
  5.  前記分割されたソース・コードの間の変数及び引数の依存関係の情報を含む情報を出力するステップをさらに有する、請求項1の方法。
  6.  前記マルチプロセッサ・システムのプロセッサの個数と、前記分割されたソース・コードの個数を比較し、前記分割されたソース・コードの個数がプロセッサの個数よりも多いことに応答して、前記分割されたソース・コードの個数がプロセッサの個数と等しいかそれ以下になるように、前記分割されたソース・コードを結合するステップをさらに有する、請求項2の方法。
  7.  前記分割されたソース・コードを結合するステップは、前記記録された処理時間を用いて、結合されたソース・コードのうちの期待される処理時間が最大のものの期待される処理時間が最小になるように結合を行う、請求項6の方法。
  8.  前記ソース・コードは、シミュレーション・モデリング・ツールの機能により生成されたものであり、前記ソース・コードの処理ブロック単位は、シミュレーション・モデリング・ツール上のブロック線図のブロックに対応する、請求項1の方法。
  9.  コンピュータの処理によって、マルチプロセッサ・システムで並列実行可能とするための複数のソース・コードを生成するシステムであって、
     プログラムのソース・コードを保存する記録手段と、
     前記コンピュータの処理によって、前記プログラムのソース・コードを読み取って、該ソース・コードの処理のクリティカル・パスを見つける手段と、
     前記クリティカル・パスをカットして、前記マルチプロセッサ・システムの個々のプロセッサ毎に対応して前記ソース・コードを分割する手段を有する、
     ソース・コード処理システム。
  10.  前記ソース・コードをコンパイルして実行し、前記ソース・コードの処理ブロック単位の処理時間を計測して記録する手段をさらに有し、
     前記ソース・コードを分割する手段は、前記記録された処理時間を用いて、分割されたソース・コードのうちの期待される処理時間が最大のものの期待される処理時間が、少なくとも元のソース・コードの処理時間より短くなるように分割を行う、請求項9のシステム。
  11.  前記処理時間を計測して記録する手段は、処理が異なるプロセッサにまたがった際のメッセージングのコスト、投機実行のために必要な処理、投機が失敗した際のロールバックのコスト、及び各ブロックへの入力の予測がどの程度当たるのかという投機成功確率のデータを更に計測して記録する、請求項10のシステム。
  12.  前記ソース・コードを分割するシステムは、前記記録された処理時間を用いて、分割されたソース・コードのうちの期待される処理時間が最大のものの期待される処理時間が最小になるように分割を行う、請求項10のシステム。
  13.  前記分割されたソース・コードの間の変数及び引数の依存関係の情報を含む情報を出力する手段をさらに有する、請求項9のシステム。
  14.  前記マルチプロセッサ・システムのプロセッサの個数と、前記分割されたソース・コードの個数を比較し、前記分割されたソース・コードの個数がプロセッサの個数よりも多いことに応答して、前記分割されたソース・コードの個数がプロセッサの個数と等しいかそれ以下になるように、前記分割されたソース・コードを結合する手段をさらに有する、請求項10のシステム。
  15.  前記分割されたソース・コードを結合する手段は、前記記録された処理時間を用いて、結合されたソース・コードのうちの期待される処理時間が最大のものの期待される処理時間が最小になるように結合を行う、請求項14のシステム。
  16.  前記ソース・コードは、シミュレーション・モデリング・ツールの機能により生成されたものであり、前記ソース・コードの処理ブロック単位は、シミュレーション・モデリング・ツール上のブロック線図のブロックに対応する、請求項9のシステム。
  17.  マルチプロセッサ・システムにより並列実行可能な複数のプログラムを実行するコンピュータ・システムであって、
     プログラムのソース・コードを保存する記録手段と、
     前記コンピュータの処理によって、前記プログラムのソース・コードを読み取って、該ソース・コードの処理のクリティカル・パスを見つける手段と、
     前記クリティカル・パスをカットして、前記マルチプロセッサ・システムの個々のプロセッサ毎に対応して前記ソース・コードを分割する手段と、
     前記分割されたソース・コードをコンパイルする手段と、
     前記コンパイルされた実行可能プログラムを、前記マルチプロセッサ・システムの個別のプロセッサに割り当てる手段を有する、
     コンピュータ・システム。
  18.  前記ソース・コードをコンパイルして実行し、前記ソース・コードの処理ブロック単位の処理時間を計測して記録する手段をさらに有し、
     前記ソース・コードを分割する手段は、前記記録された処理時間を用いて、分割されたソース・コードのうちの期待される処理時間が最大のものの期待される処理時間が、少なくとも元のソース・コードの処理時間より短くなるように分割を行う、請求項17のコンピュータ・システム。
  19.  前記処理時間を計測して記録する手段は、処理が異なるプロセッサにまたがった際のメッセージングのコスト、投機実行のために必要な処理、投機が失敗した際のロールバックのコスト、及び各ブロックへの入力の予測がどの程度当たるのかという投機成功確率のデータを更に計測して記録する、請求項18のコンピュータ・システム。
  20.  前記ソース・コードを分割するシステムは、前記記録された処理時間を用いて、分割されたソース・コードのうちの期待される処理時間が最大のものの期待される処理時間が最小になるように分割を行う、請求項18のコンピュータ・システム。
  21.  前記分割されたソース・コードの間の変数及び引数の依存関係の情報を含む情報を出力する手段と、
     該依存関係の情報を、前記マルチプロセッサ・システムの個別のプロセッサが参照可能となるようにロードする手段、
     をさらに有する、請求項17のコンピュータ・システム。
  22.  前記マルチプロセッサ・システムのプロセッサの個数と、前記分割されたソース・コードの個数を比較し、前記分割されたソース・コードの個数がプロセッサの個数よりも多いことに応答して、前記分割されたソース・コードの個数がプロセッサの個数と等しいかそれ以下になるように、前記分割されたソース・コードを結合する手段をさらに有する、請求項17のコンピュータ・システム。
  23.  コンピュータの処理によって、マルチプロセッサ・システムで並列実行可能とするためのソース・コードを生成するプログラムであって、
     前記コンピュータに、
     プログラムのソース・コードを入力するステップと、
     前記コンピュータの処理によって、前記プログラムのソース・コードの処理のクリティカル・パスを見つけるステップと、
     前記クリティカル・パスをカットして、前記マルチプロセッサ・システムの個々のプロセッサ毎に対応して前記ソース・コードを分割するステップを実行させる、
     プログラム。
  24.  前記ソース・コードをコンパイルして実行し、前記ソース・コードの処理ブロック単位の処理時間を計測して記録するステップをさらに有し、
     前記ソース・コードを分割するステップは、前記記録された処理時間を用いて、分割されたソース・コードのうちの期待される処理時間が最大のものの期待される処理時間が、少なくとも元のソース・コードの処理時間より短くなるように分割を行う、請求項23のプログラム。
  25.  処理が異なるプロセッサにまたがった際のメッセージングのコスト、投機実行のために必要な処理、、投機が失敗した際のロールバックのコスト、及び各ブロックへの入力の予測がどの程度当たるのかという投機成功確率のデータを更に計測して記録するステップを有する、請求項24のプログラム。
  26.  前記ソース・コードを分割するステップは、前記記録された処理時間を用いて、分割されたソース・コードのうちの期待される処理時間が最大のものの期待される処理時間が最小になるように分割を行う、請求項24のプログラム。
  27.  前記マルチプロセッサ・システムのプロセッサの個数と、前記分割されたソース・コードの個数を比較し、前記分割されたソース・コードの個数がプロセッサの個数よりも多いことに応答して、前記分割されたソース・コードの個数がプロセッサの個数と等しいかそれ以下になるように、前記分割されたソース・コードを結合するステップをさらに有する、請求項24のプログラム。
PCT/JP2009/064698 2008-10-24 2009-08-24 ソース・コード処理方法、システム、及びプログラム Ceased WO2010047174A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
KR1020117009462A KR101522444B1 (ko) 2008-10-24 2009-08-24 소스 코드 처리 방법, 시스템, 및 프로그램
EP09821874A EP2352087A4 (en) 2008-10-24 2009-08-24 PROCESS, SYSTEM AND PROGRAM FOR SOURCE COD PROCESSING
CN200980142515.2A CN102197376B (zh) 2008-10-24 2009-08-24 源代码处理方法、系统及程序
JP2010534746A JP5209059B2 (ja) 2008-10-24 2009-08-24 ソース・コード処理方法、システム、及びプログラム

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2008274686 2008-10-24
JP2008-274686 2008-10-24

Publications (1)

Publication Number Publication Date
WO2010047174A1 true WO2010047174A1 (ja) 2010-04-29

Family

ID=42118628

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2009/064698 Ceased WO2010047174A1 (ja) 2008-10-24 2009-08-24 ソース・コード処理方法、システム、及びプログラム

Country Status (6)

Country Link
US (2) US8407679B2 (ja)
EP (1) EP2352087A4 (ja)
JP (1) JP5209059B2 (ja)
KR (1) KR101522444B1 (ja)
CN (1) CN102197376B (ja)
WO (1) WO2010047174A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013020580A (ja) * 2011-07-14 2013-01-31 Internatl Business Mach Corp <Ibm> 並列化方法、システム、及びプログラム
JP2013164657A (ja) * 2012-02-09 2013-08-22 Internatl Business Mach Corp <Ibm> 並列化方法、システム、及びプログラム
WO2014115613A1 (ja) * 2013-01-23 2014-07-31 学校法人 早稲田大学 並列性の抽出方法及びプログラムの作成方法
JP2016192153A (ja) * 2015-03-31 2016-11-10 株式会社デンソー 並列化コンパイル方法、並列化コンパイラ、及び車載装置

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9053239B2 (en) * 2003-08-07 2015-06-09 International Business Machines Corporation Systems and methods for synchronizing software execution across data processing systems and platforms
JP4988789B2 (ja) * 2009-05-19 2012-08-01 インターナショナル・ビジネス・マシーンズ・コーポレーション シミュレーション・システム、方法及びプログラム
US8863128B2 (en) * 2010-09-30 2014-10-14 Autodesk, Inc System and method for optimizing the evaluation of task dependency graphs
US9256401B2 (en) 2011-05-31 2016-02-09 Microsoft Technology Licensing, Llc Editor visualization of symbolic relationships
US8789018B2 (en) 2011-05-31 2014-07-22 Microsoft Corporation Statically derived symbolic references for dynamic languages
US8752035B2 (en) * 2011-05-31 2014-06-10 Microsoft Corporation Transforming dynamic source code based on semantic analysis
US9477585B2 (en) * 2012-11-09 2016-10-25 Coherent Logix, Incorporated Real time analysis and control for a multiprocessor system
US8954939B2 (en) 2012-12-31 2015-02-10 Microsoft Corporation Extending a development environment
KR101883475B1 (ko) 2013-02-28 2018-07-31 한화지상방산 주식회사 소형통합제어장치
US9552195B2 (en) * 2013-03-08 2017-01-24 Facebook, Inc. Enlarging control regions to optimize script code compilation
US10592278B2 (en) 2013-03-15 2020-03-17 Facebook, Inc. Defer heavy operations while scrolling
US10326448B2 (en) 2013-11-15 2019-06-18 Scientific Concepts International Corporation Code partitioning for the array of devices
US9294097B1 (en) 2013-11-15 2016-03-22 Scientific Concepts International Corporation Device array topology configuration and source code partitioning for device arrays
US9698791B2 (en) 2013-11-15 2017-07-04 Scientific Concepts International Corporation Programmable forwarding plane
CN104678775A (zh) * 2013-11-27 2015-06-03 联创汽车电子有限公司 Hils系统及其同步纠偏方法
JP6803173B2 (ja) * 2015-08-24 2020-12-23 エスエーエス アイピー, インコーポレーテッドSAS IP, Inc. 時間ドメイン分解過渡シミュレーションのためのプロセッサ実行システム及び方法
US10289469B2 (en) * 2016-10-28 2019-05-14 Nvidia Corporation Reliability enhancement utilizing speculative execution systems and methods
JP2018124605A (ja) * 2017-01-30 2018-08-09 オムロン株式会社 画像処理システム、情報処理装置、情報処理方法、および、情報処理プログラム
CN112400162B (zh) * 2018-07-19 2024-06-21 日立安斯泰莫株式会社 模拟装置及其方法、以及ecu装置
KR102763162B1 (ko) 2018-11-08 2025-02-07 삼성전자주식회사 인공 신경망의 연산 처리 그래프를 관리하는 시스템 및 이를 이용한 연산 처리 그래프를 관리하는 방법
JP6890738B2 (ja) * 2019-02-26 2021-06-18 三菱電機株式会社 情報処理装置、情報処理方法及び情報処理プログラム
US11645219B2 (en) * 2021-02-02 2023-05-09 American Megatrends International, Llc Method for generating a hybrid BMC system and hybrid BMC system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0380337A (ja) * 1989-04-28 1991-04-05 Hitachi Ltd 並列化装置
JPH0683608A (ja) 1992-09-04 1994-03-25 Fujitsu Ltd プログラム解析支援装置
JPH0721240A (ja) 1993-06-23 1995-01-24 Nec Corp タイミング考慮配置装置
JPH08180100A (ja) 1994-12-27 1996-07-12 Fujitsu Ltd スケジューリング方法および装置
JP2002149416A (ja) * 2000-10-30 2002-05-24 Internatl Business Mach Corp <Ibm> プログラムの最適化方法及びこれを用いたコンパイラ
JP2007048052A (ja) * 2005-08-10 2007-02-22 Internatl Business Mach Corp <Ibm> コンパイラ、制御方法、およびコンパイラ・プログラム
JP2008515051A (ja) * 2004-09-28 2008-05-08 インテル コーポレイション 依存性チェーン処理のためのシステム、方法及び装置
JP2009129179A (ja) * 2007-11-22 2009-06-11 Toshiba Corp プログラム並列化支援装置およびプログラム並列化支援方法

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5325525A (en) * 1991-04-04 1994-06-28 Hewlett-Packard Company Method of automatically controlling the allocation of resources of a parallel processor computer system by calculating a minimum execution time of a task and scheduling subtasks against resources to execute the task in the minimum time
US5774728A (en) * 1995-12-27 1998-06-30 International Business Machines Corporation Method and system for compiling sections of a computer program for multiple execution environments
JP2000207223A (ja) * 1999-01-12 2000-07-28 Matsushita Electric Ind Co Ltd 並列処理向けのプログラム処理方法および装置、並びに並列処理向けのプログラム処理を実行するプログラムを記録した記録媒体および並列処理向けの命令列を記録した記録媒体
JP3870112B2 (ja) * 2002-03-13 2007-01-17 インターナショナル・ビジネス・マシーンズ・コーポレーション コンパイル方法、コンパイル装置、及びコンパイル用プログラム
US20050144602A1 (en) * 2003-12-12 2005-06-30 Tin-Fook Ngai Methods and apparatus to compile programs to use speculative parallel threads
US20060123401A1 (en) * 2004-12-02 2006-06-08 International Business Machines Corporation Method and system for exploiting parallelism on a heterogeneous multiprocessor computer system
US7627864B2 (en) * 2005-06-27 2009-12-01 Intel Corporation Mechanism to optimize speculative parallel threading
JP2008059304A (ja) * 2006-08-31 2008-03-13 Sony Corp 通信装置および方法、並びにプログラム
WO2008072334A1 (ja) * 2006-12-14 2008-06-19 Fujitsu Limited コンパイル方法及びコンパイラ
CN101611380A (zh) * 2007-01-30 2009-12-23 尼玛实验室公司 推测性吞吐量计算
JP5148674B2 (ja) * 2010-09-27 2013-02-20 株式会社東芝 プログラム並列化装置およびプログラム

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0380337A (ja) * 1989-04-28 1991-04-05 Hitachi Ltd 並列化装置
JPH0683608A (ja) 1992-09-04 1994-03-25 Fujitsu Ltd プログラム解析支援装置
JPH0721240A (ja) 1993-06-23 1995-01-24 Nec Corp タイミング考慮配置装置
JPH08180100A (ja) 1994-12-27 1996-07-12 Fujitsu Ltd スケジューリング方法および装置
JP2002149416A (ja) * 2000-10-30 2002-05-24 Internatl Business Mach Corp <Ibm> プログラムの最適化方法及びこれを用いたコンパイラ
JP2008515051A (ja) * 2004-09-28 2008-05-08 インテル コーポレイション 依存性チェーン処理のためのシステム、方法及び装置
JP2007048052A (ja) * 2005-08-10 2007-02-22 Internatl Business Mach Corp <Ibm> コンパイラ、制御方法、およびコンパイラ・プログラム
JP2009129179A (ja) * 2007-11-22 2009-06-11 Toshiba Corp プログラム並列化支援装置およびプログラム並列化支援方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2352087A4

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013020580A (ja) * 2011-07-14 2013-01-31 Internatl Business Mach Corp <Ibm> 並列化方法、システム、及びプログラム
JP2013164657A (ja) * 2012-02-09 2013-08-22 Internatl Business Mach Corp <Ibm> 並列化方法、システム、及びプログラム
WO2014115613A1 (ja) * 2013-01-23 2014-07-31 学校法人 早稲田大学 並列性の抽出方法及びプログラムの作成方法
JP2014160453A (ja) * 2013-01-23 2014-09-04 Waseda Univ 並列性の抽出方法及びプログラムの作成方法
JP2016192153A (ja) * 2015-03-31 2016-11-10 株式会社デンソー 並列化コンパイル方法、並列化コンパイラ、及び車載装置

Also Published As

Publication number Publication date
KR20110071097A (ko) 2011-06-28
JPWO2010047174A1 (ja) 2012-03-22
US8407679B2 (en) 2013-03-26
KR101522444B1 (ko) 2015-05-21
EP2352087A1 (en) 2011-08-03
CN102197376A (zh) 2011-09-21
US20100106949A1 (en) 2010-04-29
US8595712B2 (en) 2013-11-26
US20130139131A1 (en) 2013-05-30
EP2352087A4 (en) 2012-08-08
JP5209059B2 (ja) 2013-06-12
CN102197376B (zh) 2014-01-15

Similar Documents

Publication Publication Date Title
JP5209059B2 (ja) ソース・コード処理方法、システム、及びプログラム
JP4629768B2 (ja) 並列化処理方法、システム、及びプログラム
JP4931978B2 (ja) 並列化処理方法、システム、及びプログラム
US8677334B2 (en) Parallelization method, system and program
Burtscher et al. Perfexpert: An easy-to-use performance diagnosis tool for hpc applications
JP4988789B2 (ja) シミュレーション・システム、方法及びプログラム
JP5651251B2 (ja) シミュレーション実行方法、プログラム及びシステム
US8990767B2 (en) Parallelization method, system and program
JP5479942B2 (ja) 並列化方法、システム、及びプログラム
US8868381B2 (en) Control system design simulation using switched linearization
US9218317B2 (en) Parallelization method, system, and program
Cheng et al. PipeThreader: Software-Defined Pipelining for Efficient DNN Execution
WO2006022204A1 (ja) ソースプログラムの分析装置および方法
KR102512704B1 (ko) 매트릭스 연산 방법 및 그 장치
Tang et al. Pipe-DBT: enhancing dynamic binary translation simulators to support pipeline-level simulation
Swaminathan An Experimental Study of Parallelism in Different Python Frameworks
JP4997144B2 (ja) マルチタスク処理装置およびその方法
Bakhtin Automation of Debugging Parallel Programs in the DVM System
Stoyenko et al. Predictability and Techniques for Schedulability Analysis
JP2022011264A (ja) ソフトウェア開発支援装置及びソフトウェア開発支援方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200980142515.2

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09821874

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2010534746

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20117009462

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2009821874

Country of ref document: EP