High-Performance Computing and OpenSolaris Silveira Neto Sun Campus Ambassador Federal University of Ceará ParGO - Paralellism, Graphs, and Combinatorial Optimization Research Group
Agenda Why programs should run faster? How programs can run faster? High Performance Computing Motivating Computer Models Approachs OpenSolaris What is, Advantages and Tools.
Aplication Area Share stats fromTop500.org Application area share for November/2007
Computational fluid dynamics
Finite Element Analysis
Serial Computation problem instructions CPU
Serial Computation Single computer, single CPU. Problem broken into discrete series of instructions. One instruction per time. instructions CPU
Parallel Computing problem CPU CPU CPU parts instructions
Parallel Computing Simultaneous use of multiple compute resources to solve a computational problem. Compute resources can include Single computer with multiple processors Multiple computers connected by a network or both
Flynn's Taxonomy Instruction or Data Single or Multiple SISD S ingle  I nstruction,  S ingle  D ata SIMD S ingle  I nstruction,  M ultiple  D ata MISD M ultiple  I nstruction,  S ingle  D ata MIMD M ultiple  I nstruction,  M ultiple  D ata
SISD Single Instruction, Single Data LOAD A LOAD B C = A+B STORE C CPU
SIMD Single Instruction, Multiple Data LOAD A[0] LOAD B[0] C[0] = A[0]+B[0] STORE C[0] LOAD A[1] LOAD B[1] C[1] = A[1]+B[1] STORE C[1] LOAD A[n] LOAD B[n] C[n] = A[n]+B[n] STORE C[n] CPU 1 CPU 2 CPU n
MISD Multiple Instruction, Single Data LOAD A[0] C[0] = A[0] *1 STORE C[0] LOAD A[1] C[1] = A[1] *2 STORE C[1] LOAD A[n] C[n] = A[n] *n STORE C[n] CPU 1 CPU 2 CPU n
MIMD Multiple Instruction, Multiple Data LOAD A[0] C[0] = A[0] *1 STORE C[0] X=sqrt(2) C[1] = A[1] *X method(C[1]); something(); W = C[n]**X C[n] =  1/W CPU 1 CPU 2 CPU n
Parallel Programming Models Shared Memory Threads Message Passing Data Parallel Hybrid
Threads Model Memory CPU CPU CPU CPU
Threads Model
Message Passing Model Memory CPU Memory CPU Memory CPU Memory CPU x=10
Hybrid Model x=10 Memory CPU Memory CPU Memory CPU CPU Memory CPU CPU
Amdahl's Law fraction of code that can be parallelized
Amdahl's Law parallel fraction number of processors serial fraction
Integration CPU CPU a b c
Pi calculation Madhava of Sangamagrama (1350-1425) CPU CPU
MPI Message Passing Interface A computer specification An implementation that allows many computers to communicate with one another. It is used in computer clusters.
MPI Simplest Example $ mpicc hello.c -o hello $ mpirun -np 5 hi
MPI_Send
MPI_Recv
OpenMP Open Multi-Processing Multi-platform shared memory multiprocessing programming in C/C++ and Fortran on many architectures Available on GCC 4.2 C/C++/Fortran
Creating a OpenMP Thread $ gcc -openmp hello.c -o hello $ ./hello
Creating multiples OpenMP Threads
Pthreads POSIX Threads POSIX standard for threads Defines an API for creating and manipulating threads
Pthreads g++ -o threads threads.cpp -lpthread ./threads
Java Threads java.lang.Thread java.util.concurrent
What is OpenSolaris? Open development effort based on the source code for the Solaris Operating System. Collection of source bases (consolidations) and projects.
Opensolaris ZFS Dtrace Containers HPC Tools opensolaris.org/os/community/hpcdev/ Dtrace for Open MPI
Sun HPC ClusterTools Comprehensive set of capabilities for parallel computing. Integrated toolkit that allows developers to create and tune MPI applications that run on high performance clusters and SMPs. sun.com/clustertools
Academy, industry and market
References Introduction to Parallel Computing, Blaise Barney, Livermore Computing, 2007.  https://computing.llnl.gov/tutorials/parallel_comp Flynn, M., Some Computer Organizations and Their Effectiveness, IEEE Trans. Comput., Vol. C-21, pp. 948, 1972. Top500 Supercomputer sites, Application Area share for 11/2007,  http://www.top500.org/charts/list/30/apparea Wikipedia's article on Finite Element Analysis,  http://en.wikipedia.org/wiki/Finite_element_analysis Wikipedia's article on Computational Fluid Dynamics,  http://en.wikipedia.org/wiki/Computational_fluid_dynamics Slides An Introduction to OpenSolaris, Peter Karlson. Wikipedia's article on OpenMP,  http://en.wikipedia.org/wiki/Openmp
References Wikipedia's article on MPI,  http://en.wikipedia.org/wiki/Message_Passing_Interface Wikipedia's article on PThreads,  http://en.wikipedia.org/wiki/Pthreads Wikipedia's article on Madhave of Sangamagrama,  http://en.wikipedia.org/wiki/Madhava_of_Sangamagrama Distributed Systems Programming, Heriot-Watt University  http://www.macs.hw.ac.uk/~hamish/DSP/topic29.html
Thank you! José Maria Silveira Neto Sun Campus Ambassador [email_address] http://silveiraneto.net “ open” artwork and icons by chandan:  http://blogs.sun.com/chandan

High-Performance Computing and OpenSolaris

  • 1.
    High-Performance Computing andOpenSolaris Silveira Neto Sun Campus Ambassador Federal University of Ceará ParGO - Paralellism, Graphs, and Combinatorial Optimization Research Group
  • 2.
    Agenda Why programsshould run faster? How programs can run faster? High Performance Computing Motivating Computer Models Approachs OpenSolaris What is, Advantages and Tools.
  • 3.
    Aplication Area Sharestats fromTop500.org Application area share for November/2007
  • 4.
  • 5.
  • 6.
  • 7.
    Serial Computation Singlecomputer, single CPU. Problem broken into discrete series of instructions. One instruction per time. instructions CPU
  • 8.
    Parallel Computing problemCPU CPU CPU parts instructions
  • 9.
    Parallel Computing Simultaneoususe of multiple compute resources to solve a computational problem. Compute resources can include Single computer with multiple processors Multiple computers connected by a network or both
  • 10.
    Flynn's Taxonomy Instructionor Data Single or Multiple SISD S ingle I nstruction, S ingle D ata SIMD S ingle I nstruction, M ultiple D ata MISD M ultiple I nstruction, S ingle D ata MIMD M ultiple I nstruction, M ultiple D ata
  • 11.
    SISD Single Instruction,Single Data LOAD A LOAD B C = A+B STORE C CPU
  • 12.
    SIMD Single Instruction,Multiple Data LOAD A[0] LOAD B[0] C[0] = A[0]+B[0] STORE C[0] LOAD A[1] LOAD B[1] C[1] = A[1]+B[1] STORE C[1] LOAD A[n] LOAD B[n] C[n] = A[n]+B[n] STORE C[n] CPU 1 CPU 2 CPU n
  • 13.
    MISD Multiple Instruction,Single Data LOAD A[0] C[0] = A[0] *1 STORE C[0] LOAD A[1] C[1] = A[1] *2 STORE C[1] LOAD A[n] C[n] = A[n] *n STORE C[n] CPU 1 CPU 2 CPU n
  • 14.
    MIMD Multiple Instruction,Multiple Data LOAD A[0] C[0] = A[0] *1 STORE C[0] X=sqrt(2) C[1] = A[1] *X method(C[1]); something(); W = C[n]**X C[n] = 1/W CPU 1 CPU 2 CPU n
  • 15.
    Parallel Programming ModelsShared Memory Threads Message Passing Data Parallel Hybrid
  • 16.
    Threads Model MemoryCPU CPU CPU CPU
  • 17.
  • 18.
    Message Passing ModelMemory CPU Memory CPU Memory CPU Memory CPU x=10
  • 19.
    Hybrid Model x=10Memory CPU Memory CPU Memory CPU CPU Memory CPU CPU
  • 20.
    Amdahl's Law fractionof code that can be parallelized
  • 21.
    Amdahl's Law parallelfraction number of processors serial fraction
  • 22.
  • 23.
    Pi calculation Madhavaof Sangamagrama (1350-1425) CPU CPU
  • 24.
    MPI Message PassingInterface A computer specification An implementation that allows many computers to communicate with one another. It is used in computer clusters.
  • 25.
    MPI Simplest Example$ mpicc hello.c -o hello $ mpirun -np 5 hi
  • 26.
  • 27.
  • 28.
    OpenMP Open Multi-ProcessingMulti-platform shared memory multiprocessing programming in C/C++ and Fortran on many architectures Available on GCC 4.2 C/C++/Fortran
  • 29.
    Creating a OpenMPThread $ gcc -openmp hello.c -o hello $ ./hello
  • 30.
  • 31.
    Pthreads POSIX ThreadsPOSIX standard for threads Defines an API for creating and manipulating threads
  • 32.
    Pthreads g++ -othreads threads.cpp -lpthread ./threads
  • 33.
    Java Threads java.lang.Threadjava.util.concurrent
  • 34.
    What is OpenSolaris?Open development effort based on the source code for the Solaris Operating System. Collection of source bases (consolidations) and projects.
  • 35.
    Opensolaris ZFS DtraceContainers HPC Tools opensolaris.org/os/community/hpcdev/ Dtrace for Open MPI
  • 36.
    Sun HPC ClusterToolsComprehensive set of capabilities for parallel computing. Integrated toolkit that allows developers to create and tune MPI applications that run on high performance clusters and SMPs. sun.com/clustertools
  • 37.
  • 38.
    References Introduction toParallel Computing, Blaise Barney, Livermore Computing, 2007. https://computing.llnl.gov/tutorials/parallel_comp Flynn, M., Some Computer Organizations and Their Effectiveness, IEEE Trans. Comput., Vol. C-21, pp. 948, 1972. Top500 Supercomputer sites, Application Area share for 11/2007, http://www.top500.org/charts/list/30/apparea Wikipedia's article on Finite Element Analysis, http://en.wikipedia.org/wiki/Finite_element_analysis Wikipedia's article on Computational Fluid Dynamics, http://en.wikipedia.org/wiki/Computational_fluid_dynamics Slides An Introduction to OpenSolaris, Peter Karlson. Wikipedia's article on OpenMP, http://en.wikipedia.org/wiki/Openmp
  • 39.
    References Wikipedia's articleon MPI, http://en.wikipedia.org/wiki/Message_Passing_Interface Wikipedia's article on PThreads, http://en.wikipedia.org/wiki/Pthreads Wikipedia's article on Madhave of Sangamagrama, http://en.wikipedia.org/wiki/Madhava_of_Sangamagrama Distributed Systems Programming, Heriot-Watt University http://www.macs.hw.ac.uk/~hamish/DSP/topic29.html
  • 40.
    Thank you! JoséMaria Silveira Neto Sun Campus Ambassador [email_address] http://silveiraneto.net “ open” artwork and icons by chandan: http://blogs.sun.com/chandan