Spheral++ An Open Source Project to Simulate Hydrodynamics in Astrophysical Systems. J. Michael Owen mikeowen@llnl.gov Lawrence Livermore National Laboratory.

Slides:



Advertisements
Similar presentations
The Complete Technical Analysis and Development Environment An attractive alternative to MATLAB and GAUSS - Physics World.
Advertisements

Integration of MBSE and Virtual Engineering for Detailed Design
Object-Oriented Application Frameworks Much of the cost and effort stems from the continuous re- discovery and re-invention of core concepts and components.
Guy Griffiths. General purpose interpreted programming language Widely used by scientists and programmers of all stripes Supported by many 3 rd -party.
.NET Technology. Introduction Overview of.NET What.NET means for Developers, Users and Businesses Two.NET Research Projects:.NET Generics AsmL.
This work was performed under the auspices of the U.S. Department of Energy by University of California, Lawrence Livermore National Laboratory under Contract.
Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Designing Reusable Frameworks for Test Automation
Using MapuSoft Instead of OS Vendor’s Simulators.
Visual Scripting of XML
COM vs. CORBA.
© Chinese University, CSE Dept. Software Engineering / Software Engineering Topic 1: Software Engineering: A Preview Your Name: ____________________.
ARCS Data Analysis Software An overview of the ARCS software management plan Michael Aivazis California Institute of Technology ARCS Baseline Review March.
© , Michael Aivazis DANSE Software Issues Michael Aivazis California Institute of Technology DANSE Software Workshop September 3-8, 2003.
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
Automated Tests in NICOS Nightly Control System Alexander Undrus Brookhaven National Laboratory, Upton, NY Software testing is a difficult, time-consuming.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
–Streamline / organize Improve readability of code Decrease code volume/line count Simplify mechanisms Improve maintainability & clarity Decrease development.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Separating VUI from business logic Caller Experience-centered design approach Alex Kurganov, CTO Parus Interactive
VIRTUAL PROTOTYPING of ROBOTS DYNAMICS E. Tarabanov.
PROGRAMMING LANGUAGES The Study of Programming Languages.
Starting Chapter 4 Starting. 1 Course Outline* Covered in first half until Dr. Li takes over. JAVA and OO: Review what is Object Oriented Programming.
© 2004 The MathWorks, Inc. 1 MATLAB for C/C++ Programmers Support your C/C++ development using MATLAB’s prebuilt graphics functions and trusted numerics.
ROOT: A Data Mining Tool from CERN Arun Tripathi and Ravi Kumar 2008 CAS Ratemaking Seminar on Ratemaking 17 March 2008 Cambridge, Massachusetts.
Framework for Automated Builds Natalia Ratnikova CHEP’03.
FROM CONTROL SOFTWARE TO CONTROL SYSTEMS Wojciech Kurek.
Java Analysis Studio Status Update 12 May 2000 Altas Software Week Tony Johnson
Architecture-Based Runtime Software Evolution Peyman Oreizy, Nenad Medvidovic & Richard N. Taylor.
Company Overview for GDF Suez December 29, Enthought’s Business Enthought provides products and consulting services for scientific software solutions.
Leslie Luyt Supervisor: Dr. Karen Bradshaw 2 November 2009.
Views The architecture was specifically changed to accommodate multiple views. The used of the QStackedWidget makes it easy to switch between the different.
MathCore Engineering AB Experts in Modeling & Simulation WTC.
Java Root IO Part of the FreeHEP Java Library Tony Johnson Mark Dönszelmann
A performance evaluation approach openModeller: A Framework for species distribution Modelling.
Sales Objections and FAQ’s 940-LC Analytical to Preparative Systems.
Center for Component Technology for Terascale Simulation Software CCA is about: Enhancing Programmer Productivity without sacrificing performance. Supporting.
240-Current Research Easily Extensible Systems, Octave, Input Formats, SOA.
Computational Aspects of Multi-scale Modeling Ahmed Sameh, Ananth Grama Computing Research Institute Purdue University.
Development of a Distributed MATLAB Environment with Real-Time Data Visualization Authors: Joseph Diamond, Richard McEver Affiliation: Dr. Jian Huang,
System Construction System Construction is the development, installation and testing of system components.
The course. Description Computer systems programming using the C language – And possibly a little C++ Translation of C into assembly language Introduction.
Cmpe 589 Spring 2006 Lecture 2. Software Engineering Definition –A strategy for producing high quality software.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
A Software Framework for Distributed Services Michael M. McKerns and Michael A.G. Aivazis California Institute of Technology, Pasadena, CA Introduction.
Introduction What is detector simulation? A detector simulation program must provide the possibility of describing accurately an experimental setup (both.
Windows Programming, C.-S. Shieh, KUAS EC, Chapter 0 Overview.
1 1 Office of Science Jean-Luc Vay Accelerator Technology & Applied Physics Division Lawrence Berkeley National Laboratory HEP Software Foundation Workshop,
August 2003 At A Glance The IRC is a platform independent, extensible, and adaptive framework that provides robust, interactive, and distributed control.
Topic 4 - Database Design Unit 1 – Database Analysis and Design Advanced Higher Information Systems St Kentigern’s Academy.
Views The architecture was specifically changed to accommodate multiple views. The used of the QStackedWidget makes it easy to switch between the different.
Online Performance Analysis and Visualization of Large-Scale Parallel Applications Kai Li, Allen D. Malony, Sameer Shende, Robert Bell Performance Research.
INTRODUCTION CSE 470 : Software Engineering. Goals of Software Engineering To produce software that is absolutely correct. To produce software with minimum.
Fermilab Scientific Computing Division Fermi National Accelerator Laboratory, Batavia, Illinois, USA. Off-the-Shelf Hardware and Software DAQ Performance.
CST 1101 Problem Solving Using Computers
Types for Programs and Proofs
Unified Modeling Language
Pipeline Execution Environment
Lawrence Livermore National Laboratory
Objectives of the Presentation
Python Training in Chennai
Object Oriented Analysis and Design
Using Tensorflow to Detect Objects in an Image
VISUAL BASIC.
Ada – 1983 History’s largest design effort
Design for Ease in Contraction and Extension
Synthesizing models with classes for automating code generation
TOPIC: Computer-Aided Design
The Lua Chunk Vault, an enhancement to epics base
What's New in eCognition 9
Presentation transcript:

Spheral++ An Open Source Project to Simulate Hydrodynamics in Astrophysical Systems. J. Michael Owen mikeowen@llnl.gov Lawrence Livermore National Laboratory O’Reilly Open Source Convention Python Track July 25, 2001

What is Spheral++? This project is developing an open source code for two purposes: To model the important physical processes required to study the formation and evolution of galaxies in a cosmological scenario (initially gravitation, hydrodynamics, and simple radiative processes). To provide a useful framework for developing novel new “particle” based hydrodynamic techniques.

Why Open Source? Typically scientific software is custom built, and not shared! This leads to disposable software, which is used some number of times by the author(s), and then discarded. For complex numerical simulation codes, this approach leads to massive duplication of effort. Some redundant effort is useful for comparison. “If I gave away my [numerical modeling] code, then someone would just abuse it.”

Why Open Source? There are many potential benefits to a shared resource for hydrodynamic modeling: These are complex, expensive programs, so we can reduce wasted effort by sharing. Peer review becomes possible. Once such a tool is well characterized, everyone can understand the results (and their shortcomings) that much more clearly. If properly designed, such a tool can easily be extended by other researchers. Not everyone wants to write their own!

Requirements In order to produce scientifically useful results, we minimally require: Model gravitation: N-body particle techniques are well characterized. Model hydrodynamics: Particle based hydro’s (such as smoothed particle hydrodynamics -- SPH) robustly model adiabatic and shock physics in a lagrangian manner, allowing the resolution scales to follow the mass. Adequate resolution: 2563 or greater numbers of particles, must be massively parallel!

Software Requirements Don’t assume what the user wants to do! Provide a flexible set of tools that can be used to build and analyze simulations. It must be possible to implement new algorithms and ideas in the framework without impacting (or even requiring an in depth understanding of) the rest of the code. Spheral++ should be as modular as possible, with components interacting through a simple set of interfaces.

Scripting Interface! We can meet the user flexibility requirements by using a scripting interface for the code. The code consists of building blocks adhering to a rigorous set of interfaces. The user is allowed to dynamically set up the problem, choose what set of physics modules (and their options) should be used, run it however they wish, and then analyze the results from the scripting language. This is like a Matlab for fluid simulations.

C++ is the implementation language. We use C++ to write the bulk of the code. Object oriented design (simple to specify and enforce interfaces). Templates and generic programming allow flexibility without sacrificing computational efficiency. Astrophysical hydrodynamic models are generally computationally bound, even on the fastest machines in the world!

Python Is the Interface We choose to use python as the front-end scripting interface for Spheral++. Python uses a relatively simple syntax that is easily learned. Python provides an object oriented programming model that fits well with C++ (our underlying implementation language). There are already many useful extensions to python (graphics and analysis packages) which we can directly leverage for use with Spheral++ simulations.

Exposing C++ to Python: Pyffle Until recently Spheral++ used pyffle (developed by Pat Miller at LLNL) to semi-automate “wrapping” C++ objects with a python interface. Released under open source license. Contained in the Spheral++ CVS distribution. Big plus, it works! Some shortcomings to pyffle Tiresome wrapping templated objects. No support for mathematical operations. No support for overriding virtual functions from python.

Boost Python Library (BPL) The Boost project (www.boost.org) provides a simple mechanism for wrapping and accessing C++ objects from python via the Boost Python Library (BPL). Easy to wrap templated objects. Trivial to expose mathematical operations with wrapped types (+, -, *, ==, etc.) Provides methods to override virtual functions from python. Makes it possible to rapidly prototype new ideas in python, before committing to compiled code.

Problems with BPL A few issues have surfaced trying to use BPL with Spheral++. Lack of cross module support for abstract interface classes Cross module inheritance (doesn’t work!) Accessing pointers to abstract classes (particularly STL vectors of them) These issues have been reported to the BPL developers.

Example: Hydrodynamic Test The LeBlanc shock tube. These results were generated using a Spheral python script to set up, run, and then plot the results against the analytic solution.

Example: Prototyping a New Idea We want to experiment with a new artificial viscosity. BPL lets us override C++ virtual functions from python. from ArtificialViscosity import ArtificialViscosity class myQ(ArtificialViscosity): def __init__(self, Cl, Cq): ArtificialViscosity.__init__(Cl, Cq) … def viscousPressure(self, …): myPressure = … return myPressure

Current Status The major modules for running hydrodynamic problems are in place. Several standard 1-D hydro test problems have already been constructed and run. Results are available in Spheral++ distribution. Transitioning to BPL from pyffle. A few shortcomings in BPL have been exposed during this process.

Future Plans Profiling and optimization Implement distributed parallelization (underway) Implement more physics modules Self-gravitation Radiative cooling Improve build system (autoconf?) Explore more visualization and analysis tools MayaVI VTK

Resources www.Spheral.sf.net (Spheral++ home page) www.boost.org (BPL and other useful stuff) www.gnuplot.org (Plotting package) Developers: Pat Miller Jeff Johnson Martin Casado Noel Keen Mike Fisher Acknowledgement: This work was supported under the auspices of the US DOE by LLNL under contract W-7405-Eng-48.