ScilabTEC2011 Keynote

download ScilabTEC2011 Keynote

of 26

Transcript of ScilabTEC2011 Keynote

  • 7/25/2019 ScilabTEC2011 Keynote

    1/26

    Scilab for Mathematical Education and

    High Performance Computing

    Tetsuya SAKURAI

    University of Tsukuba

  • 7/25/2019 ScilabTEC2011 Keynote

    2/26

    Contents

    ! Scilab for Math Education

    " Promoting the use of ICT in classroom

    - Interactive white board, slate PC, projector, internet

    " Math education with computer

    " Hands-on with graphs

    " Lecture in high school

    " Touch interface for inputting Math expressions

    ! Scilab for High Performance Computing (HPC)

    " Multicore and distributed computing platforms

    " Developing high performance applications

    " Examples

    "

    Scilab for application design

    ! Conclusions

    2

  • 7/25/2019 ScilabTEC2011 Keynote

    3/26

    Scilab

    for

    Math Education

    3

  • 7/25/2019 ScilabTEC2011 Keynote

    4/26

    Promoting the use of ICT in Classroom

    ! Promotion by MEXT (Ministry of Education, Culture, Sports, Science

    and Technology of Japan):

    "

    assists improvements of ICT environment in school

    - Interactive white board, PC, Internet, etc.

    " pursues to utilize ICT in classrooms

    " encourages to develop and to provide course materials

    4

    http://www.mext.go.jp/

    Good computer tools for education are required.

  • 7/25/2019 ScilabTEC2011 Keynote

    5/26

    Math Education with Computer

    ! Computers provide various hands-onlearning and teaching opportunities

    in Math education

    " Computers help students to understand various Math concepts

    " The skills for search, curation, analysis, etc., are useful not only for Math

    " Such experiences lead to skills for real-world problem solving using a

    computer

    ! Animation of graphs

    " effective to visualize Math concepts

    5

    Graphs are static on a blackboard Graphs are dynamic on a screen

  • 7/25/2019 ScilabTEC2011 Keynote

    6/26

    Programming Tools

    !

    "

    "

    "

    6

    We need an alternative programming tool

  • 7/25/2019 ScilabTEC2011 Keynote

    7/26

    Programming Tools

    7

    Scilab

    BASIC

  • 7/25/2019 ScilabTEC2011 Keynote

    8/26

    Programming Tools

    !

    "

    "

    "

    "

    "

    8

  • 7/25/2019 ScilabTEC2011 Keynote

    9/26

    Hands-on with Graphs

    Draw a graph of x2 124 x+ 1.

    9

    Interval [-1, 1]

    Interval [-20, 160]

    Many students draw a graph

    with the interval [-1, 1].

    "The graph seems linear

    . . . something wrong with the program"

  • 7/25/2019 ScilabTEC2011 Keynote

    10/26

    Hands-on with Graphs

    Draw a graph of data.

    10

    Linear plot

    Double logarithmic plot

    Logarithmic plot gives rich information from the given data.

  • 7/25/2019 ScilabTEC2011 Keynote

    11/26

    Hands-on with Graphs

    x = linspace(0,10,100);

    for t=1:3

    y = x^2 - 4*t*x + 4*t^2 + t - 3;

    plot2d(x,y,t,rect=[0,-4,10,10]);

    end

    y = (1/2)*x - 3;

    plot2d(x,y,5);

    11

    Find the common tangent line of

    with t= 1, 2, 3.

  • 7/25/2019 ScilabTEC2011 Keynote

    12/26

    Scilab for Hands-on Tools

    ! Scilab is easy to make Math education tools with GUI

    12

  • 7/25/2019 ScilabTEC2011 Keynote

    13/26

    Using Scilab as Backend Computing/Graphing Engine

    Input Math Expressions Display Graph Output

    Control Parameters

    Display Numerical Results

    13

    MathGUIde (frontend tool) calls Scilab as a computing/graphing engine

    via Java interface

    MathGUIde

  • 7/25/2019 ScilabTEC2011 Keynote

    14/26

    Students can predict a next event

    by teacher's action

    14

  • 7/25/2019 ScilabTEC2011 Keynote

    15/26

    Example: Lecture in High School

    ! Example of the use of a graphing tool at high school math class

    Senior High School at Sakado, University of Tsukuba

    15

  • 7/25/2019 ScilabTEC2011 Keynote

    16/26

    Input Interface for Math Expressions

    Input Field

    Hold Touch

    sin

    x +!

    Multi-touch provides a good userbility

    for inputting Math expressions

    16

  • 7/25/2019 ScilabTEC2011 Keynote

    17/26

    Input Interface for Math Expressions

    17

  • 7/25/2019 ScilabTEC2011 Keynote

    18/26

    Scilab

    for

    High Performance Computing (HPC)

    18

  • 7/25/2019 ScilabTEC2011 Keynote

    19/26

    Multicore and Distributed Computing Platforms

    ! Multicore:

    Clock frequency of CPU hit a peak around 2004.

    -- Paradigm to increase a CPU performance had changed.

    19

    We can not enjoy the automatic performance improvements

    by clock speed.

    Single-core Multi-core

  • 7/25/2019 ScilabTEC2011 Keynote

    20/26

    Multicore and Distributed Computing Platforms

    ! Distributed computing:

    We need to develop high performance applications with over tens

    of thousands of nodes for large-scale simulations.

    20

    http://www.top500.org/

    current future status

    #CPUs 68,544 over 80,000

    #cores

    548,352

    over 640,000

    performance 8.17 Peta FLOPs over 10 Peta

    K computer: next generation supercomputer in Japan

  • 7/25/2019 ScilabTEC2011 Keynote

    21/26

    Developing High Performance Applications

    ! Process for developing a high performance application

    " Phase 1:Application design

    "

    Phase 2: Performance evaluation

    " Phase 3:Tackle target problems

    21

    Phase 1:

    > Use a supercomputer with

    middle size problems

    > Implement parallel codes

    > Find appropriate parameters

    > Evaluate a performance

    > Use a supercomputer with

    large size problems

    > Tackle target problems

    > Solve real problems and

    obtain physical results

    > Try for grand challenge

    > Use a workstation or a

    small cluster with small

    size problems

    > Find appropriate

    algorithms and solvers> Design an application

    Phase 2: Phase 3:

  • 7/25/2019 ScilabTEC2011 Keynote

    22/26

    !

    Systems of linear equations

    Sumiyoshi, et.al. (1988)

    A.K.Mann (1997)

    Test problem: matrix size = 85,680 (750MB)

    GCR method without

    preconditioning

    Number of iterations

    Residual

    GCR method with an

    effective preconditioner

    Number of iterations

    Residual

    stagnated

    22

  • 7/25/2019 ScilabTEC2011 Keynote

    23/26

    ! Quantum dot simulation

    23

    Asakura, et.al. (2010)

    Polynomial eigenvalue problems

    Hwang, et.al. (2004)

    n=32,401,863

    (5.4 GB)

    n=1,532,255

    (258 MB)

    Number of iterations

    R

    esidual

    BiCGSTAB method without preconditioning

    When the matrix size exceeds tenmillion, the BiCGSTAB method

    without preconditioning does not

    converge.

    Even in Phase 1, we need to treatrelatively large-scale problems.

    Software: C++/PETSc,Fortran90/OpenMP, . . .

    Hardware: AMD 48cores + 256GB

    of memory,

    Xeon 8cores + 48GB

    of memory + Tesla, . . .

    Contour integral based eigensolver

    (Nonlinear SS method)

    n=186,543

    (30 MB)

    systems of linear equations

  • 7/25/2019 ScilabTEC2011 Keynote

    24/26

    8 32 128 512 2048

    2500

    1000

    500

    100

    secComputational time on CRAY XT4

    number of cores

    Test problem:

    Accelerator design* *R. Lee (2007)Matrix size = 1,100,242 (linear part)

    Language: Fortran90/MPI

    Linear solver: sparse direct solver

    http://www.linearcollider.org/cms/

    SS method

    Lanczos method

    ! Contour integral based eigensolver (SS method*)

    "

    A target subspace is

    constructed by a filter

    using contour integral

    " The filter is derived by

    solving systems of linear

    equations, simultaneously

    coarse grained parallelism

    Example of Phase 2 (Accelerator Design)*Sakurai, et.al. (2003),

    Ikegami, et.al. (2010)

    Input:random vectors

    Solve systems of linearequations, simultaneously

    Output:target eigenvectors

    24

  • 7/25/2019 ScilabTEC2011 Keynote

    25/26

    Scilab for Application Design

    ! Scilab is useful in Phase 1

    " Check matrix properties

    "

    Compare various algorithms

    " Try new ideas

    " Find good parameters

    " . . .

    ! Memory limit is the major restriction

    " Even in Phase 1, we need to treat relatively large-scale problems

    "

    Scilab for distributed computing is required

    ! We expect a toolbox for distributed computing which supports

    "

    Management of distributed data

    "

    Matrix-vector product, inner product, etc." Krylov subspace methods, QR decomposition, Sparse LU factorization, etc.

    " Interface to libraries such as PETSc or Trilinos, etc.

    (ex. Python + Trilinos)

    25

  • 7/25/2019 ScilabTEC2011 Keynote

    26/26

    Conclusions

    ! Scilab for Math education

    " Now digital equipments are ready in classroom

    "

    Scilab can be used for hands-on Math education

    " Scilab is also useful as a backend computing/graphing engine

    ! Scilab for High Performance Computing

    " Scilab is useful in a process of HPC application design

    " Memory limit restricts scalability

    " Distributed computing is required

    " New features of Scilab 6-- new memory handling, thread safe, optimize for multicore,

    Scilab gateway, etc.

    26