160 likes | 262 Views
Computing Simulation in Orders Based Transparent Parallelizing. Pavlenko Vitaliy Danilovich , Odessa National Polytechnic University Burdeinyi Viktor Viktorovych , I.I. Mechnikov Odessa National University.
E N D
Computing Simulation in Orders Based Transparent Parallelizing PavlenkoVitaliyDanilovich,Odessa National Polytechnic UniversityBurdeinyi Viktor Viktorovych,I.I. Mechnikov Odessa National University
Computing Simulation in Orders Based Transparent Parallelizing, ICIM-2008, September 15-19 2008 Purpose of research • There’s huge amount of problems that cannot be solved on single processor fast enough • Clusters are often used because of their comparatively low price and high scalability • Cluster computing libraries usually offer user only low-level operations for sending and receiving messages
Computing Simulation in Orders Based Transparent Parallelizing, ICIM-2008, September 15-19 2008 Requirements to the technology • High level of technology (to make development and debugging faster and easier) • Transparency of parallel architecture • Efficiency of the technology – low overhead, low processors idle time • High speed and low labor intensiveness of parallel applications development
Computing Simulation in Orders Based Transparent Parallelizing, ICIM-2008, September 15-19 2008 First principle Nested procedures Input parameters Output parameters Main procedure Separate processors
Computing Simulation in Orders Based Transparent Parallelizing, ICIM-2008, September 15-19 2008 Second principle Data requests
Computing Simulation in Orders Based Transparent Parallelizing, ICIM-2008, September 15-19 2008 Implementing the principles How to declare selected procedures? • Procedures are declared in external file • Procedures are marked in source with special comments • Procedures are annoted (C#, Java) How to get values before they are used? • Data getting logic is added by preprocessor • Data getting logic is added by bytecode analyzer (.NET, Java) • Classes encapsulate access to data they contain, and data presence check logic is located in methods of such classes
Computing Simulation in Orders Based Transparent Parallelizing, ICIM-2008, September 15-19 2008 Algorithms Value getting algorithm: • Request data from server. • If there is no value of the server, suspend the current thread and notify the scheduler about a new free processor. Repeat data request after getting a notification from the scheduler. Order execution algorithm: • Get ID of procedure to execute from server • Get values of input and input/output parameters or corresponding IDs from server • Execute the procedure. • Send values of output and input/output parameters to server. If these values are not executed yet, send corresponding IDs to server • Notify the scheduler about a new free processor Algorithm of making an order: • Send procedure ID to server. • Send values of input and input/output parameters or corresponding IDs to server. • Get IDs for output and input/output parameters from server. • Bind the IDs with corresponding variables.
Computing Simulation in Orders Based Transparent Parallelizing, ICIM-2008, September 15-19 2008 States of an order • Some computer of cluster gets the order. • Order tries to get not computed data. • Needed data has been computed. • Number of concurrently executed orders is less than number of processors of computer, so we can continue execution of that order. • Order execution has been successfully completed. • Order execution threw an exception. • Other method that had to compute data for current one has thrown an exception.
Computing Simulation in Orders Based Transparent Parallelizing, ICIM-2008, September 15-19 2008 Execution time estimation • During development and optimization • Profiling and asymptotic analysis • In the case of parallel computing: large time of test run, no common time scale, communication should be taken into consideration
Computing Simulation in Orders Based Transparent Parallelizing, ICIM-2008, September 15-19 2008 Computing emulation, 1st step • Asymptotically tight bound for block execution time is known • No orders are made inside blocks and do data getting is performed inside blocks. • Result of block execution is not used either directly or indirectly in further compare operations • There is fast alternative implementation that does not break further execution Matrix b; ExecutionRuntime.startBlock(Math.pow(a.getN(),3)); if (ExecutionRuntime.executeBlocks()) b = a.mulBy(a); else b = new Matrix(a.getN()); ExecutionRuntime.endBlock();
Computing Simulation in Orders Based Transparent Parallelizing, ICIM-2008, September 15-19 2008 Computing emulation, 2nd step
Computing Simulation in Orders Based Transparent Parallelizing, ICIM-2008, September 15-19 2008 Computing emulation, 3rd step
Computing Simulation in Orders Based Transparent Parallelizing, ICIM-2008, September 15-19 2008 Computing emulation, 4th step
Computing Simulation in Orders Based Transparent Parallelizing, ICIM-2008, September 15-19 2008 Sample problem • Algorithm: • Find averages of distributions of features for each class and build covariation matrixes • For each non-empty set of features: • Build quadratic decision rule and calculate its values using provided values of features of objects of both classes • Find maximal probability of right recognition for this rule • Save the result as the best one on the first iteration or compare it with current best result on any other iteration • Parallelizing: • Unite all possible sets of features into groups and create a procedure that performs analyzes a group of sets. Implement classes for all types that can be passed as parameters according to the requirements of the framework. Make the results of groups processing to be compared only after all groups are analyzed. • Declare main procedure and group analyze procedure according to the requirements of the framework.
Computing Simulation in Orders Based Transparent Parallelizing, ICIM-2008, September 15-19 2008 Results of experiment ValueP=N*T (N – number of computers, T – execution time)grows by not more than 1.13% when using 2, 3 or 5 computers instead of one, and by not more than 3.25% when using 10 computers instead of one
Computing Simulation in Orders Based Transparent Parallelizing, ICIM-2008, September 15-19 2008 Conclusion • A new parallel applications development technology, based on transparent replacement of methods calls with their execution on other computers of cluster, is proposed. Offered technology has been implemented as a framework on Java programming language. • The framework has been tested by solving the problem of determination of diagnostic value of formed features diagnostics. • Efficiency of the technology has been proven by solving a sample problem on a cluster of 10 computers; the valueP=N*T (N – number of computers, T – problem solving time) has grown up by not more than 3.25% comparatively to the case of one computer.