outline
play

Outline International Conference on Computational Methods (ICCM - PDF document

Outline International Conference on Computational Methods (ICCM 2007) April 4-6, 2007, Hiroshima, Japan The SILC matrix computation framework Easy-to-use interface for matrix computation libraries Numerical Simulations in the


  1. Outline International Conference on Computational Methods (ICCM 2007) April 4-6, 2007, Hiroshima, Japan • The SILC matrix computation framework – Easy-to-use interface for matrix computation libraries Numerical Simulations in the • Proposal of two application modes for SILC SILC Matrix Computation Framework • Two applications in numerical simulations – Cloth simulation in C – MPS-based simulation in Java Tamito KAJIYAMA (JST / University of Tokyo, Japan) • Experimental results Akira NUKADA (JST / University of Tokyo, Japan) Reiji SUDA (University of Tokyo / JST, Japan) • Concluding remarks Hidehiko HASEGAWA (University of Tsukuba, Japan) Akira NISHIDA (Chuo University / JST, Japan) Overview of the SILC framework Example: Using SILC in C Solve the initial value • S imple I nterface for L ibrary C ollections si l c_envel ope_t A, C, x; si l c_envel ope_t A, C, x; problem of 1D diffusion – Independent of libraries, environments & languages / * create matrices A , C and vector x 0 * / equation below using the / * create matrices A , C and vector x 0 * / Crank-Nicolson method: – Easy to use SI LC_PUT( " A" , &A) ; SI LC_PUT SI LC_PUT( " A" , &A) ; SI LC_PUT ∂ ϕ ∂ ϕ 2 • Three steps to use libraries = t ≥ ≤ x ≤ π ( 0 , 0 ) SI LC_PUT( " C" , &C) ; SI LC_PUT SI LC_PUT SI LC_PUT( " C" , &C) ; ∂ t ∂ x 2 SI LC_PUT( " x" , &x) ; / * x 0 * / SI LC_PUT ϕ = x t = ≤ x ≤ π – Depositing data (matrices, vectors, etc.) to a server sin ( 0 , 0 ) SI LC_PUT( " x" , &x) ; / * x 0 * / SI LC_PUT f or ( k = 1; k <= n_st eps; k++) ϕ = t > x = 0 ( 0 , 0 ) f or ( k = 1; k <= n_st eps; k++) – Making requests for computation by means of ϕ = t > x = π { 0 ( 0 , ) { mathematical expressions SI LC_EXEC SI LC_E XEC( " b = C * x" ) ; SI LC_EXEC SI LC_E XEC( " b = C * x" ) ; – Fetching the results of computation if necessary XEC( “ x = A ∖ ∖ b" ) ; SI LC_E SI LC_EXEC XEC( “ x = A ∖ ∖ b" ) ; SI LC_E SI LC_EXEC 1 SI LC_G SI LC_G ET( &x, " x" ) ; / * x k * / ET 0.8 Depositing data SI LC_G SI LC_G ET ET( &x, " x" ) ; / * x k * / 0.6 0.4 "x = A \ b" / * output solution x k at time t k * / 0.2 User program / * output solution x k at time t k * / 0 SILC server (client) 0 1.0 } } 2.0 3.0 Time (in seconds) Fetching results x 4.0 Matrix computation libraries 5.0 Functionalities of SILC Main characteristics of SILC • Data structures for matrix computations • Independence from programming languages – User programs for SILC in your favorite languages – Matrices (dense, band, sparse), vectors, etc. • Independence from libraries and environments • Math operators, functions, and subscript – Using alternative libraries and environments requires – 2-norm of vector x : sqr t ( x' * x) no modification in user programs – 5 × 5 submatrix of A : A[ 1: 5, 1: 5] – Flexible combinations of client & server environments • No loops and conditional branching User program (client) SILC server Sequential Sequential – These are realized with the languages you Sequential Shared-memory parallel (OpenMP) use to write user programs for SILC Sequential Distributed parallel (MPI) Distributed parallel (MPI) Distributed parallel (MPI) 1

  2. Proposal of two application modes Limited application mode • Limited application mode Use SILC only in the most time-consuming, Use SILC only in the most time-consuming, – Use SILC only in the most time-consuming, computationally intensive part of a program computationally intensive part of a program computationally intensive part of a program • Comprehensive application mode • Pros – Move all relevant data to a SILC server, and – Easy to apply (especially to existing user programs) implement overall simulations using SILC's • Cons mathematical expressions – Smaller data size due to a limited amount of main memory in client environments Abbreviations: – Frequent data communications (larger overheads) • LTD for the limited application mode • CMP for the comprehensive application mode Application #1 Original code For each time step: • Time-dependent simulation of cloth motion 1. Calculate force f and its derivatives ∂ f / ∂ x and 1. Calculate force f and its derivatives ∂ f / ∂ x and – Mass-spring model ∂ f / ∂ v (Jacobian matrices). ∂ f / ∂ v (Jacobian matrices). – Implicit Euler method 2. Solve a linear system A ∆ v = b , where – Solving a sparse linear 2. Solve a linear system A ∆ v = b , where ∂ ∂ system is necessary ⎧ ⎫ f f = − Δ − Δ A ⎨ M t 2 t ⎬ ∂ ∂ for each time step ⎩ ⎭ x v ⎧ ∂ ⎫ • Original code f = + Δ Δ ⎨ t ⎬ t b f v ⎩ 0 ∂ 0 ⎭ x – Sequential program in C – Linear solver: CG method 3. Update particle motion. 3. Update particle motion. = + Δ v v v – Visualization: OpenGL 0 = + Δ t x x v 0 New code in the LTD mode Comprehensive application mode Original code using Lis* New code using SILC Move all relevant data to a SILC server, Move all relevant data to a SILC server, LI S_M ATRI X A; LI S_VECTO R b, dv; si l c_envel ope_t A, b, dv; and implement overall simulations using LI S_M ATRI X A; LI S_VECTO R b, dv; si l c_envel ope_t A, b, dv; and implement overall simulations using SILC's mathematical expressions f or ( k = 1; k <= n_st eps; k++) f or ( k = 1; k <= n_st eps; k++) SILC's mathematical expressions f or ( k = 1; k <= n_st eps; k++) f or ( k = 1; k <= n_st eps; k++) { { { { / * 1. Calculate f , ∂ f / ∂ x and ∂ f / ∂ v * / / * 1. Calculate f , ∂ f / ∂ x and ∂ f / ∂ v * / / * 1. Calculate f , ∂ f / ∂ x and ∂ f / ∂ v * / / * 1. Calculate f , ∂ f / ∂ x and ∂ f / ∂ v * / ⋮ ⋮ ⋮ ⋮ / * 2. Solve A ∆ v = b * / / * 2. Solve A ∆ v = b * / • Pros / * 2. Solve A ∆ v = b * / / * 2. Solve A ∆ v = b * / l ve( A, b, dv, / * ∆ v * / l i s_ i s_so sol ve l ve( A, b, dv, / * ∆ v * / SI LC I LC_P _PUT UT( " A" , &A) ; l i s_ i s_so sol ve SI LC I LC_P _PUT UT( " A" , &A) ; – User programs are free from massive data l i s_par am s, SI LC I LC_P _PUT UT( " b" , &b) ; l i s_par am s, SI LC I LC_P _PUT UT( " b" , &b) ; EXEC( " dv = A ∖ ∖ b" ) ; l i s_opt i ons, SI L SI LC_ C_EX EXEC( " dv = A ∖ ∖ b" ) ; l i s_opt i ons, SI LC_ SI L C_EX – Reduced data communications (smaller overheads) ET( &dv, " dv" ) ; / * ∆ v * / l i s_st at us) ; SI L SI LC_ C_G G E ET( &dv, " dv" ) ; / * ∆ v * / l i s_st at us) ; SI LC_ SI L C_G G E • Cons / * 3. Update particle motion * / / * 3. Update particle motion * / / * 3. Update particle motion * / / * 3. Update particle motion * / ⋮ ⋮ ⋮ ⋮ – Existing user programs may require a major rewrite } } } } * An iterative solvers library written in C. 2

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend