Your Own Interactive
Computing Platform
2017/10/16 at TKU
Yung-Yu Chen
https://www.linkedin.com/in/yungyuc/
Computing for Everything
❖ Solve problems that can only be solved by computers.
❖ Save resources, shorten cycles, better this world.
❖ Let machines repeat it.
DeepMind AI Reduces Google Data Centre Cooling Bill by 40%
❖ https://deepmind.com/blog/deepmind-ai-reduces-
google-data-centre-cooling-bill-40/
Black Hole Simulation
https://go.nasa.gov/2xhd5xD
Supersonic Jet in Cross Flow
density contours
Optical Proximity Correction
Optical proximity correction for semiconductor manufacturing

https://commons.wikimedia.org/wiki/File:Optical_proximity_correction_structures.svg
Your interactive computing
Python as Your Computing Platform
❖ Interactive analysis and visualization.
❖ Data preparation and processing.
❖ Workflow automation.
❖ Distributed processing and parallel computing.
Interactive
❖ http://jupyter.org: run Python everywhere and code it
through browser.
❖ https://notebooks.azure.com: Azure sets it up for you
already
❖ https://matplotlib.org: de facto 2D plotting library
❖ https://www.vtk.org: versatile 3D visualization toolbox
❖ https://www.paraview.org: if you only want a
frontend
Data Manipulation
❖ http://pandas.pydata.org: de facto tool for data
analytics
❖ Comma-Separated Value: “csv” standard module.
❖ http://www.pytables.org: HDF5 hierarchical data
access.
❖ http://unidata.github.io/netcdf4-python/: netCDF, yet
another data storage based on HDF5.
Workflow Automation
❖ Offload routine to computers.
❖ https://docs.python.org/3/library/argparse.html:
standard command-line argument processing
❖ https://github.com/saltstack/salt: cloud-oriented
automation for management and configuration
❖ AWS, GCE, Azure all offer SDK for Python.
❖ Lead to system admin and/or devop.
Concurrency
❖ https://docs.python.org/3/library/asyncio.html
❖ support native asynchronous constructs
❖ https://docs.python.org/3/library/multiprocessing.html
❖ parallel computing and distributed processing using multiple
processes
❖ http://zeromq.org/bindings:python
❖ socket communication
❖ http://pythonhosted.org/mpi4py/
❖ use MPI in Python
Interact
How to Learn
❖ Download Anaconda and set it up: https://
www.anaconda.com/download
❖ Share your notebooks at Anaconda Cloud: https://
anaconda.org
❖ Free for public projects
WWI. source: https://www.youtube.com/watch?v=K0Wp7Y3Tbiw
HPC (high-performance computing) is hard.

Physics is harder.

Don’t rely on the Schlieffen Plan.
Optimization
❖ Memory access is expensive.
❖ Branching may be expensive too.
❖ Think like a machine: see through high-level source
code all the way to assembly.
❖ If you don’t write your own compiler, learn C++.
“There are only two hard things in Computer Science:
cache invalidation and naming things.”
Phil Karlton
HPC Architecture
❖ Scientific computing takes tremendous computing
power. We are interested in big problems.
❖ Some may be divided to smaller, self-contained sub-
problems, e.g., data analytics.
❖ Some are unavoidably big. A reasonably big problem
may use thousands of CPU cores for days.
❖ Accelerators like GPGPU sometimes speed up, but at a
cost of complicated code.
Python for Building Platform
❖ It's impossible to get it right the first time.
❖ Architecture design takes many iterations.
❖ Python allows quick prototyping.
❖ There is almost always a package for you.
❖ Python is either the best or the second best language for
anything.
NumPy
❖ N-dimensional array (ndarray).
❖ ndarray is typed and offers very fast speed. Oftentimes
faster than naive C code.
❖ Efficient data storage and flexible access to memory.
❖ Linear algebra (MKL is supported), FFT, etc.
❖ SciPy: application-specific toolbox.
Python Is Designed for C/C++
❖ Everything may be replaced by C/C++.
❖ Python is a C library for a dynamically-typed runtime.
❖ Python is slow, but using Python makes the whole HPC system faster.
❖ Performance hotspots.
❖ High-level abstraction in low-level code.
❖ Plain C: Python C API or Cython.
❖ C++: pybind11 (C++11) or boost.python (pre-C++11).
❖ Fortran: f2py (part of numpy).
Two Types of Platform
❖ Top-down: lay out everything in Python and replace hotspots
using C/C++
❖ Pro: Fast development. Reach results early.
❖ Con: Python dynamicity weakens robustness.
❖ Bottom-up: lay out core parts in C++ and glue in Python
❖ Pro: Highly robust (if coded right.)
❖ Con: Hard to get it right and take long time to code.
❖ Equally high-performance. Python scripts work as input files.
Beyond the Concepts: Real Work
❖ What problems do you want to solve?
❖ Software skills:
❖ Coding and HPC: Python, C, C++.
❖ Testing.
❖ Version control.
❖ Operation and automation, including building system.
❖ Debugging.
❖ Documenting.

More Related Content

PPTX
From Python to smartphones: neural nets @ Saint-Gobain, François Sausset
PDF
Lustre Best Practices
ODP
Concurrent vsparallel
PDF
How to rewrite the OS using C by strong type
PDF
Building a high-performance, scalable ML & NLP platform with Python, Sheer El...
PPTX
Pulumi. Modern Infrastructure as Code.
PDF
Dataframes Showdown (miniConf 2022)
PDF
Deep Learning with GPUs in Production - AI By the Bay
From Python to smartphones: neural nets @ Saint-Gobain, François Sausset
Lustre Best Practices
Concurrent vsparallel
How to rewrite the OS using C by strong type
Building a high-performance, scalable ML & NLP platform with Python, Sheer El...
Pulumi. Modern Infrastructure as Code.
Dataframes Showdown (miniConf 2022)
Deep Learning with GPUs in Production - AI By the Bay

What's hot (13)

PDF
Infrastructure-as-Code with Pulumi - Better than all the others (like Ansible)?
PDF
BASTA 2020 VS Code Data Visualisation
PDF
"Computer, end program": Virtualization and the Cloud
PPTX
Hiphop - PHP
PDF
Post-K: Building the Arm HPC Ecosystem
PDF
Infrastructure as "Code" with Pulumi
PDF
How to Measure Latency
PDF
Ceph Day London 2014 - Ceph at IBM
PDF
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
PDF
Programming Languages & Tools for Higher Performance & Productivity
PDF
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
PPTX
Map and Reduce
PDF
AddisDev Meetup ii: Golang and Flow-based Programming
Infrastructure-as-Code with Pulumi - Better than all the others (like Ansible)?
BASTA 2020 VS Code Data Visualisation
"Computer, end program": Virtualization and the Cloud
Hiphop - PHP
Post-K: Building the Arm HPC Ecosystem
Infrastructure as "Code" with Pulumi
How to Measure Latency
Ceph Day London 2014 - Ceph at IBM
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Programming Languages & Tools for Higher Performance & Productivity
Infrastructure as (real) Code – Manage your K8s resources with Pulumi
Map and Reduce
AddisDev Meetup ii: Golang and Flow-based Programming
Ad

Similar to Your interactive computing (20)

PDF
Engineer Engineering Software
PDF
On the necessity and inapplicability of python
PDF
On the Necessity and Inapplicability of Python
PDF
Exploring and Using the Python Ecosystem
PPTX
Role of python in hpc
PDF
Harmonic Stack for Speed
PDF
Introduction to Python Syntax and Semantics
PDF
London level39
PDF
Python for Science and Engineering: a presentation to A*STAR and the Singapor...
PDF
The Joy of SciPy
PDF
(Ebook) High Performance Python by Micha Gorelick, Ian Ozsvald
PPTX
Muhammad Sarfaraz(Presentation) Final.pptx
PDF
High Performance Python 2nd Edition Micha Gorelick Ian Ozsvald
PDF
Travis Oliphant "Python for Speed, Scale, and Science"
PDF
PyData Texas 2015 Keynote
PDF
High Performance Python 2nd Edition Micha Gorelick
PPT
Euro python2011 High Performance Python
PDF
Samsung SDS OpeniT - The possibility of Python
PDF
High Performance Python Practical Performant Programming for Humans 2nd Editi...
PPTX
Python for IoT CoE.pptx KDOJWIHJNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Engineer Engineering Software
On the necessity and inapplicability of python
On the Necessity and Inapplicability of Python
Exploring and Using the Python Ecosystem
Role of python in hpc
Harmonic Stack for Speed
Introduction to Python Syntax and Semantics
London level39
Python for Science and Engineering: a presentation to A*STAR and the Singapor...
The Joy of SciPy
(Ebook) High Performance Python by Micha Gorelick, Ian Ozsvald
Muhammad Sarfaraz(Presentation) Final.pptx
High Performance Python 2nd Edition Micha Gorelick Ian Ozsvald
Travis Oliphant "Python for Speed, Scale, and Science"
PyData Texas 2015 Keynote
High Performance Python 2nd Edition Micha Gorelick
Euro python2011 High Performance Python
Samsung SDS OpeniT - The possibility of Python
High Performance Python Practical Performant Programming for Humans 2nd Editi...
Python for IoT CoE.pptx KDOJWIHJNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Ad

More from Yung-Yu Chen (7)

PDF
Write Python for Speed
PDF
SimpleArray between Python and C++
PDF
Write code and find a job
PDF
Notes about moving from python to c++ py contw 2020
PDF
Take advantage of C++ from Python
PDF
Start Wrap Episode 11: A New Rope
PDF
Craftsmanship in Computational Work
Write Python for Speed
SimpleArray between Python and C++
Write code and find a job
Notes about moving from python to c++ py contw 2020
Take advantage of C++ from Python
Start Wrap Episode 11: A New Rope
Craftsmanship in Computational Work

Recently uploaded (20)

PDF
software engineering for computer science
PDF
7th Introduction to Waves waves waves .pdf
PPTX
DiffErent Techniques of Analysis (Qualitative & Quantitative).pptx
DOCX
atomic physics ookikkkkkkkkkkkkkkkkkkkkd
PPTX
Chapter 7 HUMAN HEALTH AND DISEASE, NCERT
PPTX
2.1.-Plant-and-Animal-REPRODUCTION.pptx nd its funutions
PDF
CITOQUINAS EN ORTODONCIA BIOLOGIA DEL MOVIMIENTO
PDF
CoSEE-Cat:AComprehensiveSolarEnergeticElectronevent Catalogueobtainedfromcomb...
PPTX
Epithelial Tissues and Glands.pptx slide show
PDF
Pentose Phosphate Pathway by Rishikanta Usham, Dhanamanjuri University
PDF
Wetlands and Malaria Transmission: Exploring the Relationship in West Africa...
PPTX
Personality for guidance related to theories
PPTX
8-STAGES-OF-DEVELOPMENT_20241012_170012_0000.pptx
PPTX
Types of Microscope.pptx for students who wants to study detailing about mic...
PDF
Sujay Rao Mandavilli Variable logic FINAL FINAL FINAL FINAL FINAL.pdf
PPT
the_building_blocks_of_matter_-_atoms.ppt
PPTX
Morphology of Bacteria & Structure of Bacterial Cell
PDF
Coronary artery disease.post mi and post
PPT
Fundamentals of Forensic DNA Typing .ppt
PPTX
history of Pharmacology-1.pptx .
software engineering for computer science
7th Introduction to Waves waves waves .pdf
DiffErent Techniques of Analysis (Qualitative & Quantitative).pptx
atomic physics ookikkkkkkkkkkkkkkkkkkkkd
Chapter 7 HUMAN HEALTH AND DISEASE, NCERT
2.1.-Plant-and-Animal-REPRODUCTION.pptx nd its funutions
CITOQUINAS EN ORTODONCIA BIOLOGIA DEL MOVIMIENTO
CoSEE-Cat:AComprehensiveSolarEnergeticElectronevent Catalogueobtainedfromcomb...
Epithelial Tissues and Glands.pptx slide show
Pentose Phosphate Pathway by Rishikanta Usham, Dhanamanjuri University
Wetlands and Malaria Transmission: Exploring the Relationship in West Africa...
Personality for guidance related to theories
8-STAGES-OF-DEVELOPMENT_20241012_170012_0000.pptx
Types of Microscope.pptx for students who wants to study detailing about mic...
Sujay Rao Mandavilli Variable logic FINAL FINAL FINAL FINAL FINAL.pdf
the_building_blocks_of_matter_-_atoms.ppt
Morphology of Bacteria & Structure of Bacterial Cell
Coronary artery disease.post mi and post
Fundamentals of Forensic DNA Typing .ppt
history of Pharmacology-1.pptx .

Your interactive computing

  • 1. Your Own Interactive Computing Platform 2017/10/16 at TKU Yung-Yu Chen https://www.linkedin.com/in/yungyuc/
  • 2. Computing for Everything ❖ Solve problems that can only be solved by computers. ❖ Save resources, shorten cycles, better this world. ❖ Let machines repeat it.
  • 3. DeepMind AI Reduces Google Data Centre Cooling Bill by 40% ❖ https://deepmind.com/blog/deepmind-ai-reduces- google-data-centre-cooling-bill-40/
  • 5. Supersonic Jet in Cross Flow density contours
  • 6. Optical Proximity Correction Optical proximity correction for semiconductor manufacturing
 https://commons.wikimedia.org/wiki/File:Optical_proximity_correction_structures.svg
  • 8. Python as Your Computing Platform ❖ Interactive analysis and visualization. ❖ Data preparation and processing. ❖ Workflow automation. ❖ Distributed processing and parallel computing.
  • 9. Interactive ❖ http://jupyter.org: run Python everywhere and code it through browser. ❖ https://notebooks.azure.com: Azure sets it up for you already ❖ https://matplotlib.org: de facto 2D plotting library ❖ https://www.vtk.org: versatile 3D visualization toolbox ❖ https://www.paraview.org: if you only want a frontend
  • 10. Data Manipulation ❖ http://pandas.pydata.org: de facto tool for data analytics ❖ Comma-Separated Value: “csv” standard module. ❖ http://www.pytables.org: HDF5 hierarchical data access. ❖ http://unidata.github.io/netcdf4-python/: netCDF, yet another data storage based on HDF5.
  • 11. Workflow Automation ❖ Offload routine to computers. ❖ https://docs.python.org/3/library/argparse.html: standard command-line argument processing ❖ https://github.com/saltstack/salt: cloud-oriented automation for management and configuration ❖ AWS, GCE, Azure all offer SDK for Python. ❖ Lead to system admin and/or devop.
  • 12. Concurrency ❖ https://docs.python.org/3/library/asyncio.html ❖ support native asynchronous constructs ❖ https://docs.python.org/3/library/multiprocessing.html ❖ parallel computing and distributed processing using multiple processes ❖ http://zeromq.org/bindings:python ❖ socket communication ❖ http://pythonhosted.org/mpi4py/ ❖ use MPI in Python
  • 14. How to Learn ❖ Download Anaconda and set it up: https:// www.anaconda.com/download ❖ Share your notebooks at Anaconda Cloud: https:// anaconda.org ❖ Free for public projects
  • 15. WWI. source: https://www.youtube.com/watch?v=K0Wp7Y3Tbiw HPC (high-performance computing) is hard.
 Physics is harder.
 Don’t rely on the Schlieffen Plan.
  • 16. Optimization ❖ Memory access is expensive. ❖ Branching may be expensive too. ❖ Think like a machine: see through high-level source code all the way to assembly. ❖ If you don’t write your own compiler, learn C++. “There are only two hard things in Computer Science: cache invalidation and naming things.” Phil Karlton
  • 17. HPC Architecture ❖ Scientific computing takes tremendous computing power. We are interested in big problems. ❖ Some may be divided to smaller, self-contained sub- problems, e.g., data analytics. ❖ Some are unavoidably big. A reasonably big problem may use thousands of CPU cores for days. ❖ Accelerators like GPGPU sometimes speed up, but at a cost of complicated code.
  • 18. Python for Building Platform ❖ It's impossible to get it right the first time. ❖ Architecture design takes many iterations. ❖ Python allows quick prototyping. ❖ There is almost always a package for you. ❖ Python is either the best or the second best language for anything.
  • 19. NumPy ❖ N-dimensional array (ndarray). ❖ ndarray is typed and offers very fast speed. Oftentimes faster than naive C code. ❖ Efficient data storage and flexible access to memory. ❖ Linear algebra (MKL is supported), FFT, etc. ❖ SciPy: application-specific toolbox.
  • 20. Python Is Designed for C/C++ ❖ Everything may be replaced by C/C++. ❖ Python is a C library for a dynamically-typed runtime. ❖ Python is slow, but using Python makes the whole HPC system faster. ❖ Performance hotspots. ❖ High-level abstraction in low-level code. ❖ Plain C: Python C API or Cython. ❖ C++: pybind11 (C++11) or boost.python (pre-C++11). ❖ Fortran: f2py (part of numpy).
  • 21. Two Types of Platform ❖ Top-down: lay out everything in Python and replace hotspots using C/C++ ❖ Pro: Fast development. Reach results early. ❖ Con: Python dynamicity weakens robustness. ❖ Bottom-up: lay out core parts in C++ and glue in Python ❖ Pro: Highly robust (if coded right.) ❖ Con: Hard to get it right and take long time to code. ❖ Equally high-performance. Python scripts work as input files.
  • 22. Beyond the Concepts: Real Work ❖ What problems do you want to solve? ❖ Software skills: ❖ Coding and HPC: Python, C, C++. ❖ Testing. ❖ Version control. ❖ Operation and automation, including building system. ❖ Debugging. ❖ Documenting.