Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Logiciels libres pour le calcul scientifique : pourquoi et comment ? | LIEGE CREATIVE, 24.11.16

1,107 views

Published on

A l'occasion de cette conférence, le Professeur Christophe Geuzaine vous fera part de son expérience d'une vingtaine d'années dans la création et la distribution de logiciels libres de calcul scientifique, en se basant sur les exemples concrets du mailleur Gmsh, du code de calcul par éléments finis GetDP et de l'interface ONELAB.
Ce type de logiciels de calcul scientifique et les simulations qu'ils rendent possibles sont devenus indispensables à la conception de la plupart des produits et procédés innovants sur lesquels se base notre mode de vie moderne.

Published in: Software
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Logiciels libres pour le calcul scientifique : pourquoi et comment ? | LIEGE CREATIVE, 24.11.16

  1. 1. Christophe Geuzaine, Professeur ordinaire, ULg - Sciences Appliquées Jeudi 24 novembre Logiciels libres pour le calcul scientifique : pourquoi et comment ?
  2. 2. LIEGE CREATIVE, en partenariat avec :
  3. 3. Free Software for Scientific Computing: Why and How? Christophe Geuzaine University of Liège – Montefiore Institute Liège Creative, November 24 2016 Case studies: Gmsh & ONELAB http://gmsh.info | http://onelab.info
  4. 4. 2 Some Background • I am a full professor at the University of Liège, where I lead a team of about 20 people at the intersection of applied mathematics, scientific computing and engineering physics • Our research interests: modeling, analysis, algorithm development, and simulation for problems arising in various areas of engineering and science • Currently: electromagnetics, biomedical problems, geophysical waves
  5. 5. 3 Some Background • We write a lot of scientific computing software, mostly solvers for partial differential equations • Two codes released as free software: • Gmsh: mesh generator with built-in CAD engine and post-processor (http://gmsh.info) • GetDP: general finite element solver using mixed finite elements (http://getdp.info) • These are long term efforts… celebrating 20 years in 2016-2017 • Recently combined with ONELAB: a lightweight interface to FE software (http://onelab.info)
  6. 6. Free Software for Scientific Computing: Why and How?
  7. 7. 5 What is Free Software? • “Free software” means software that respects users' freedom and community • Roughly, it means that the users have the freedom to run, copy, distribute, study, change and improve the software • Thus, “free software” is a matter of liberty, not price: think of “free” as in “free speech,” not as in “free beer”
  8. 8. 6 What is Free Software? A program is free software if, as a user, you have 1. the freedom to run the program as you wish, for any purpose 2. the freedom to study how the program works, and change it so it does your computing as you wish 3. the freedom to redistribute copies so you can help your neighbor 4. the freedom to distribute copies of your modified versions to others. Access to the source code (“open source”) is a precondition for 2 and 4.
  9. 9. 7 What is Scientific Computing? Scientific computing (or “computational science”) = multidisciplinary field that uses advanced computing capabilities to understand and solve complex problems • Applied mathematics: getting results out of application areas (science, engineering, humanities) • Numerical analysis: results need to be correctly and efficiently computable • Computing: the algorithms need to be implemented on modern hardware
  10. 10. 8 What is Scientific Computing? • Increasing demand for scientific computing • Industry and academia • Smart + X • Coupled with an explosion of available computational power and storage (massively distributed/parallel/cloud) • Numerous underlying mathematical/numerical concepts/methods for • Analytics • Modelling & simulation • Optimization & control
  11. 11. 9 Why Use Free Software for Scientific Computing? • It’s free! • You can use it on 10,000 CPUs if you want • It’s open! • You can study all the details, modify what you want (if you have the skills), and use it forever • Quality has increased dramatically over last 15 years • thanks to the internet and to the availability of high- quality, free operating systems and tools (Linux, GCC, MPI, Python, Git, …) • It’s how science works: • “standing on the shoulders of giants” – reuse & extend existing software for faster and better results
  12. 12. 10 Why Use Free Software for Scientific Computing? • As a result, free professional quality tools for scientific computing are now available • Examples for engineering: OpenFOAM, Salome, R, Octave, deal.II, Paraview, Gmsh, … • Similar for science or humanities problems • Downsides? • Lack of documentation/support • Heterogeneity of the tools • Lack of “expert” layer/user interface • Usually takes more time and effort to get first results • This is where good commercial tools shine
  13. 13. 11 Why Develop Free Software for Scientific Computing? • Philosophical reasons: • Open science (open data, open source, open methodology, open peer-review, open access, open educational resources) for responsible and reproducible research • Public research funding: should give back to society • Practical reasons: • Increase visibility, number of users • Allows easy co-operation with fellow scientists/engineers • Leads to better code
  14. 14. 12 How? • As a developer, you choose a license for your code: • Based on copyright (sometimes with patent clauses) • Various choices, from more permissive (“BSD”-type) to more restrictive (“GNU GPL”-type: “copyleft”) • Differences between licenses can be quite subtle • And you implement a development process, usually to foster co-operation (today e.g. http://github.com) • Source code repository with version tracking • Continuous integration tools • Bug tracking • Forums, mailing lists, wikis, …
  15. 15. 13 Is it Incompatible with Making Money? No But it does make it difficult to make a lot of money: • Sell service/support; small margins, but stimulates (high-quality) job creation • Add closed layers on top, with clear added value (e.g. expert layer) • Multiple licensing (e.g. for integration into closed- source software)
  16. 16. Case study: Gmsh
  17. 17. 15 Gmsh An open source finite element mesh generator, with built-in CAD and post-processing facilities Let’s have a look
  18. 18. 16 Gmsh Interactive demo showing the user interface and the construction of meshes using .geo and .step files
  19. 19. 17 Gmsh – A Bit of History • Started in 1996 (“after-hours”, with J.-F. Remacle) • First public (binary) release in 1998 • Open sourced under GNU GPL in 2003 • Gmsh 2.0 in 2006 • IJNME paper and switch to CMake in 2009 • Python wrappers in 2011 • Curvilinear meshing: 2012– • Quad-Hex meshing: 2012– • Homology: 2013– • Parallel meshing: 2015–
  20. 20. 18 Gmsh – A Bit of History • Funding: • Project started as a hobby (to “scratch an itch”), no support and no funding until 2006 • EDF funded OpenCASCADE integration in 2006 • More recently: • EU and RW projects • Several PhD theses & post-docs • Industrial users • Commercial software vendors • None of the recent developments significantly affect the kernel
  21. 21. 19 Gmsh – A Bit of History • Today, Gmsh represents • about half a million lines of C++ code • still only 2 core developers (about 100 with repository write access) • about 1000 people on mailing lists • about 5000 downloads per week (80% Windows) • about 400 citations per year – the Gmsh paper is cited about 2000 times • Gmsh one of the most popular open source finite element mesh generator in the world 2000 2005 2010 2015 Year 0 100 200 300 400 500 600 700 References "Gmsh" keyword on Google Scholar
  22. 22. 20 Gmsh – Strategic Choices • Design goals: fast, light and user-friendly • Written in (simple) C++ • GUIs: FLTK (desktop), UIKit (iOS), Android, web (soon!) • OpenGL graphics • Highly portable (OSes & compilers) • Easy to distribute: zero dependencies on installation • Handling of numerous (> 40) third party libraries • Build system based on CMake – everything is optional (e.g. -DENABLE_OCC=0) • Some libs integrated and redistributed directly in gmsh/contrib (BAMG, Metis 4, Taucs, Concorde, …)
  23. 23. 21 Gmsh – Strategic Choices • Licensing • Gmsh is distributed under the GNU General Public License V2 or later, with exceptions to allow for easier linking with external libraries • Specific license exemptions given to Gmsh by developers of Metis, Concorde, BAMG, Tetgen/BR, … • Some third party libraries are unfortunately not compatible with the open source version • We double-license for commercial “embedders”
  24. 24. 22 Gmsh – Strategic Choices • Community infrastructure • Our own (not on GitHub) to allow public/private parts, for both commercial clients or for specific third party interfaces (e.g. Parasolid) • Continuous integration and automated nightly builds on Windows, Mac and Linux (using CMake/CTest/CDash on virtual machines) • Timeline of changes, wiki and bug tracking (using Trac) • Two mailing lists and a web site (http://gmsh.info) with complete user documentation and user tutorial • Scientific aspects of algorithms detailed in journal papers
  25. 25. 23 Gmsh – Basic Concepts • Gmsh can be used at 3 levels • User: through the GUI (which translates most actions into scripting commands in “.geo” text files) • Advanced user: through the dedicated “.geo” language • Developer: through the C++ or Python API • Main characteristic: all algorithms are written in terms of abstract CAD entities, using a “Boundary REPresentation” (BREP) approach
  26. 26. 24 Gmsh – Basic Concepts • Gmsh interfaces directly with multiple CAD kernels (Gmsh “.geo”, OpenCASCADE, ACIS, …) • Gmsh never translates from one kernel to another: • Read/write directly to each CAD kernel using own API • All algorithms written in CAD-agnostic manner • Allows multi-kernel geometries
  27. 27. 25 Gmsh – Basic Concepts The goal is to deal with very different underlying data representations in a transparent mannerCOMPUMAG–SYDNEY 2011, STATIC FIELDS AND QUASI-STATIC FIELDS (III), PA10.2, CM
  28. 28. 26 Gmsh – Recent Developments • Reparametrization and quad-meshing: 2012– • Curvilinear meshing: 2012– • Homology solver: 2013– • Hex meshing: 2014– • Parallel meshing: 2015–
  29. 29. 27 Gmsh – Reparametrization and Quad-MeshingApplied'&'Computa/onal'Electromagne/cs (ACE) C.'Geuzaine';'SysMod'seminar';'Nov'18th'2011 Quad&meshing&of&Falcon Falcon Applied'&'Computa/onal'Electromagne/cs (ACE) Mod'seminar';'Nov'18th'2011 58 Quad&meshing&of&Falcon alcon Parametrizations of the surfaces of the Falcon aircraft in the {u,v} plane. E. Marchandise, J.-F. Remacle and C. Geuzaine. Optimal parametrizations for surface remeshing. Engineering with Computers, December 2012, pp. 1-20 J.-F. Remacle, J. Lambrechts, B. Seny, E. Marchandise, A. Johnen and C. Geuzaine. Blossom-Quad: a non-uniform quadrilateral mesh generator using a minimum cost perfect matching algorithm. International Journal for Numerical Methods in Engineering 89, pp. 1102-1119, 2012
  30. 30. 28 Gmsh – Curvilinear Meshing A. Johnen, J.-F. Remacle and C. Geuzaine. Geometric validity of curvilinear finite elements. Journal of Computational Physics 233, pp. 359-372, 2013 A. Johnen, J.-F. Remacle and C. Geuzaine. Geometric validity of high-Order triangular finite elements. Engineering with Computers 30 (3), pp. 375-382, 2014 T. Toulorge, C. Geuzaine, J.-F. Remacle, J. Lambrechts. Robust untangling of curvilinear meshes. Journal of Computational Physics 254, pp. 8-26, 2013 Curvilinear meshing References A. Johnen, J.-F. Remacle and C. Geuzaine. Geometric validity of curvilinear finite elements. Journal of Computational Physics, 233, pp. 359-372, 2013.
  31. 31. 29 Gmsh – (Co)homology Solver M. Pellikka, S. Suuriniemi, L. Kettunen and C. Geuzaine. Homology and cohomology computation in finite element modeling. SIAM Journal on Scientific Computing 35(5), pp. 1195-1214, 2013 14 M. Pellikka, S. Suuriniemi, L. Kettunen, and C. Geuzaine Fig. 7.1: Induction heating geometry and surface mesh of Mc. Fig. 7.1: Induction heating geometry and surface mesh of Mc. Fig. 7.2: A representation of the basis of the homology space H1(Ma). Fig. 7.2: A representation of the basis of the homology space H1(Ma). Fig. 7.3: A representation of the basis of the cohomology space H1 (Ma).
  32. 32. 30 Gmsh – Hex-Dominant Meshing T. C. Baudouin, J.-F. Remacle, E. Marchandise, F. Henrotte, C. Geuzaine. A frontal approach to hex-dominant mesh generation. Advanced Modeling and Simulation in Engineering 2014. Hex-dominant meshing Name #Vertices%Hex %Prism % Pyr % Tet cpu(s) CUBO 133,436 89.74 4.02 4,20 2.02 247 BLADES 133,678 83.65 5.62 6.75 3.98 268 CV745 102,946 78.55 7.63 8.81 5.91 225 Baudouin, T. C., Remacle, J. F., Marchandise, E., Henrotte, F., Geuzaine, C. (2014). A frontal approach to hex-dominant mesh generation. Advanced Modeling and Simulation in Engineering
  33. 33. 31 Gmsh – Parallel Meshing J.-F. Remacle, V. Bertrand, C. Geuzaine. A Two-Level Multithreaded Delaunay Kernel. 24th International MeshingRoundtable, Procedia Engineering Volume 124, pp. 6-17, 2015 lti-threaded meshing 10 4 10 5 10 6 10 7 10 8 2 4 6 8 10 12 14 16 18 20 Number of Points N Speedup M=2 M=4 M=8 M=16 M=32 Less than 100 GB were necessary for 109 tets
  34. 34. 32 Gmsh – Was the Move to Free Software Useful? • Yes! • (A lot) more users, leading to more robust code • Dramatically improved international visibility • New collaborations, in unexpected areas (oil and gas, neuroscience, pure math, …) • Allowed us to “change division” (i.e., reach world class) • Downsides? • Very few significant external code contributions (topic/code is just too complicated) • Lost some commercial opportunities
  35. 35. Case study: ONELAB
  36. 36. 34 ONELAB Free, lightweight interface to finite element software Let’s have a look
  37. 37. 35 ONELAB Interactive demo, opening a GetDP .pro file, doing a calculation (e.g. benchmarks/superconductors), and showing some post-processing while the simulation is running.
  38. 38. 36 ONELAB – Context Economic • Growing importance of scientific computing in education and industry • Prohibitive cost of commercial packages for a significant subset of potential users (SMEs, education, occasional use) Scientific • High quality of free/open-source software developed in universities and research centers • Sometimes ahead of commercial equivalents Practical • No user-friendly interface and/or poor documentation for most open source Finite Element Analysis (FEA) codes
  39. 39. 37 ONELAB – Objective Develop a platform for integrating free Finite Element Analysis (FEA) software: • allowing the integration (by co-simultation) of any open-source code, whatever their characteristics • with an intuitive GUI allowing novice users to get started and guided into the world of FE modeling — but with the possibility to construct sophisticated, upgradable, multi-code, multi-platform scripts for the specialized user • and with the possibility to construct both education- and business-specific tools
  40. 40. 38 ONELAB – Design • Don’t reimplement, interface the existing! • Make it as small, lightweight and as easy to maintain as possible (no solver-dependent code in the interface) • Make it easy to provide templates, with interactive parameter modification • ONELAB role = data centralization, modification and redispatching Issues of completeness and consistency of the parameter set are completely dealt with on the solver side
  41. 41. 39 ONELAB – Design Heterogeneity free FE codes? • Abstract interface for parameter exchange (CAD, mesh, physical properties, constraints, code driver) Missing “expert” layer, top-down validation and documentation? • Development and documentation of templates: • Model: blackbox, parameterizable via abstract interface • Meta-model: set of models + selection logic
  42. 42. 40 ONELAB – Design Client-server: • Clients: CAD kernels, meshers, solvers, post- processors • Server: Gmsh (currently) + database Abstract interface: • The server has no a priori knowledge of the clients (no meta-language or exchange file format) • The server does not write input files for (native) clients: the client communicates with the server to define what information should be exchanged
  43. 43. 41 ONELAB – Implementation Abstract interface to physical properties, constraints & code drivers: • Reference server in C++, clients in C++ or Python • Exchange of parameters through TCP/IP, Unix sockets or in-memory “Native” clients use C++ or Python directly • Gmsh, GetDP, Octave, Fenics, BEM++, … “Non-native” clients use Python, by instrumenting their input files • Elmer, OpenFOAM, Code_Aster, Abaqus, Gnuplot, FreeFem, …
  44. 44. 42 ONELAB – Give it a Try • Available on Linux, Mac, Windows, iOS (iPhone/iPad) and Android • Download from http://onelab.info, or search for ONELAB on the AppStore or the Google Play Store
  45. 45. 43 Conclusion • Free software for scientific computing • Growing need/use in both industry and academia • Complementary to closed/commercial tools • My personal (academic) experience: free software is the way to go • Philosophically and scientifically (open science) • Pragmatically (better code, increased visibility) • Making my codes free clearly led to many opportunities that I wouldn’t have had otherwise • ... and commercial endeavors are still possible
  46. 46. 44 Thanks for your attention cgeuzaine@ulg.ac.be

×