Introduction to Scientific and Technical Computing
Introduction to Scientific and Technical Computing
Editor/Author
Willmore, Frank T., Jankowski, Eric and Colina, Coray
Publication Year: 2016
Publisher: CRC Press
Single-User Purchase Price:
$79.95

Unlimited-User Purchase Price:
Not Available
ISBN: 978-1-49-874504-8
Category: Technology & Engineering - Technology
Image Count:
40
Book Status: Available
Table of Contents
Created to help scientists and engineers write computer code, this practical book addresses the important tools and techniques that are necessary for scientific computing, but which are not yet commonplace in science and engineering curricula.
Table of Contents
- Foreword
- Preface
- Editors
- Contributors
- 1. Operating Systems Overview - Erik E. Santiso
- 1.1 Introduction: The Kernel, Shells, Processes, Daemons, and Environment Variables
- 1.2 Basic Navigation and File Manipulation
- 1.3 Interacting with Remote Computers
- 1.4 Regular Expressions
- 1.5 Other Commonly Used Commands
- 1.6 Running and Managing Running Processes
- 1.7 Shell History and Shortcuts
- 1.8 Advanced Text Manipulation
- 1.9 Useful Packages
- References
- 2. Machine Numbers and the IEEE 754 Floating-Point Standard - Frank T. Willmore
- 2.1 Integer Types
- 2.2 Unsigned and Signed Integers
- 2.3 Single versus Double Precision
- 2.4 Double Precision
- 2.5 Overflow and Underflow
- 2.6 What a Subnormal Number Often Means
- 2.7 Summary
- 3. Developing with Git and Github - Chris Ertel
- 3.1 Introduction
- 3.2 Basic Git
- 3.2.1 A Simple Overview of Git
- 3.2.2 Creating a New Repository
- 3.2.3 Cloning an Existing Repository
- 3.2.4 Saving Work
- 3.2.5 Sharing Changes
- 3.3 Basic Github
- 3.3.1 Creating a Github Repository
- 3.3.2 Adding People to a Repository
- 3.4 Intermediate Git
- 3.4.1 Housekeeping
- 3.4.2 Fixing Mistakes
- 3.4.3 Branching in Git
- 3.4.4 Merging Branches
- 3.5 Intermediate Github
- 3.5.1 Deleting Branches
- 3.5.2 Pull Requests
- 3.6 Tips
- Further Reading
- 4. Introduction to Bash Scripting - Erik E. Santiso
- 4.1 Introduction: Building Your First Bash Script
- 4.2 Variables and Substitution
- 4.3 Input and Output
- 4.4 Flow Control
- 4.5 Functions
- References
- Further Reading
- 5. Debugging with gdb - Frank T. Willmore
- 5.1 Print Statements and Macros
- 5.2 Sample Code
- 5.3 Instrumenting the Code
- 5.4 Running the Program without the Debugger
- 5.5 Core Dump
- 5.6 Backtracing
- 5.7 Invoking the Code with the Debugger
- 5.8 Setting (and Deleting) Breakpoints
- 5.9 Modifying Variables
- 5.10 Modifying Breakpoints
- 5.11 Listing and Stepping through Code
- 5.12 Running from Breakpoint to Breakpoint
- 5.13 Conditional Breakpoints
- 6. Makefiles, Libraries, and Linking - Frank T. Willmore
- 6.1 Makefiles
- 6.2 Libraries
- 6.3 Linking
- 7. Linking and Interoperability - Frank T. Willmore
- 7.1 Fortran Calling Fortran
- 7.2 Fortran Calling C
- 7.3 C Calling Fortran
- 7.4 And Beyond. C++ Really!?
- 7.5 External Linkage/Externing
- 7.6 Some Notes on Best Practices
- 7.7 Interoperability with Python
- 8. Build Management with CMake - Ryan L. Marson and Eric Jankowski
- 8.1 Introduction to CMake
- 8.2 CMakeLists .txt—Building a Basic Execuw
- 8.3 Generating Headers
- 8.4 Compiling and Linking Libraries
- 8.5 Testing
- 8.6 Conditional Compilation and System Introspection
- 8.7 Summary
- 9. Getting Started with Python 3 - Brian C. Barnes and Michael S. Sellers
- 9.1 Python 3 Essentials
- 9.1.1 Running a Python Script
- 9.1.2 Built-In Types and Their Uses
- 9.1.2.1 Lists
- 9.1.2.2 Tuples
- 9.1.2.3 Strings
- 9.1.2.4 Dictionaries
- 9.1.3 Statements and Control Flow
- 9.1.3.1 if/then/else Statements
- 9.1.3.2 Looping
- 9.1.4 Functions
- 9.1.5 Modules
- 9.1.5.1 The sys Module
- 9.1.5.2 The io Module
- 9.1.5.3 Importing Modules
- 9.1.6 Other Essential Modules
- 9.1.7 A Python Class
- 9.2 Python Number Crunching
- 9.2.1 How Python Handles Numbers
- 9.2.2 Numpy
- 9.2.3 Scipy
- 9.2.4 Data Science
- 9.3 Python Extras
- 9.3.1 Python Style
- 9.3.2 Parallelism
- 9.3.3 Matplotlib
- 9.3.4 Porting from 2 to 3
- 9.3.5 Third-Party Tools
- Further Reading
- 10. Prototyping - Charles Lena
- 10.1 What Is Prototyping?
- 10.2 Choosing the Language for the Prototype
- 10.3 Fighting Knowledge Gaps
- 10.4 When to Prototype?
- 10.5 Software Design
- 10.6 Pitfalls and Traps
- Acknowledgments
- Reference
- 11. Introduction to High-Performance Computing Systems - Todd Evans
- 11.1 Hardware-Based Parallelism in HPC Systems
- 11.1.1 Instruction-Level Parallelism
- 11.1.2 Core-Level Parallelism
- 11.1.3 Processor-Level Parallelism
- 11.1.4 Node-Level Parallelism
- 11.2 Software-Based Parallelism in HPC Applications
- 11.2.1 Memory, Processes, and Threads
- 11.2.2 Distributed Memory Programming and MPI
- 11.2.3 Shared Memory Programming and OpenMP
- 11.3 Batch System-Based Parallelism in HPC Systems
- 11.3.1 Job Schedulers
- 11.3.2 Job Priority
- 11.3.3 Additional Scheduling Methods
- 11.3.4 Job Submission Scripts
- 12. Introduction to Parallel Programming with MPI - Jerome Vienne
- 12.1 The Origin of MPI
- 12.2 A Little MPI Program to Start
- 12.2.1 From Serial to Parallel
- 12.2.2 MPI_Init and MPI_Finalize
- 12.2.3 MPI_Comm_size and MPI_Comm_rank
- 12.2.4 Compilation and Execution
- 12.3 Point-to-Point Communication
- 12.3.1 MPI_Send and MPI_Recv
- 12.3.2 MPI_Isend and MPI_Irecv
- 12.3.3 Potential Pitfalls
- 12.4 Collective Communication
- 12.4.1 MPI_Bcast
- 12.4.2 MPI_Reduce
- 12.4.3 MPI_Scatter
- 12.4.4 MPI_Gather
- 12.5 Example: Compute π
- 12.6 Conclusion
- 13. Introduction to OpenMP - Yaakoub El Khamra
- 13.1 What Is OpenMP?
- 13.2 OpenMP and Multithreading
- 13.3 Compiling Applications with OpenMP (GCC, Intel, PGI), Fortran, and C
- 13.4 OpenMP Basic Environment Variables
- 13.5 OpenMP Basics
- 13.5.1 Syntax, Directives, and Clauses (Examples in C and Fortran)
- 13.6 Parallel Regions and Worksharing
- 13.6.1 OpenMP Do/For
- 13.6.2 Scheduling Constructs
- 13.6.3 Sections and Tasks
- 13.6.4 Single and Master
- 13.7 Data Scoping
- 13.7.1 Synchronization and Mutual Exclusion
- 13.8 More Language Constructs
- 13.8.1 Runtime Library Application Programming Interface
- 13.8.2 Environment Variables
- 13.9 Practical Issues
- 13.9.1 Race Conditions
- 13.9.2 Reducing Errors
- 13.10 Concluding Remarks
- References
- Further Reading
- 14. Checkpointing Code for Restartability with HDF5 - Frank T. Willmore
- 14.1 Checkpointing and Restarting
- 14.2 HDF5
- 14.3 H Is for Hierarchical
- 14.4 Installing and Using HDF5
- 14.5 A Simulation Example Using HDF5 for Checkpointing and Restarting
- 14.6 The HDF5 Restart File
- 14.7 Restart
- 14.8 A Note on Stochastic Methods and Restart
- 15. Libraries for Linear Algebra - Victor Eijkhout
- 15.1 Introduction
- 15.2 Choosing a Library
- 15.3 BLAS
- 15.3.1 Vector Operations
- 15.3.2 Matrix-Vector Operations
- 15.3.3 Matrix-Matrix Operations
- 15.4 LAPACK
- 15.4.1 Other Storage Formats
- 15.4.2 Parallelism
- 15.5 The PETSc Library for Parallel Linear Algebra
- 15.5.1 What Is in PETSc?
- 15.5.2 The PETSc Workflow
- 15.5.3 Parallelism
- 15.5.4 Object Orientation
- 15.5.5 Worked-Out Examples
- 15.5.5.1 A Linear System Example
- 15.5.5.2 A Finite Element Example
- 15.5.6 PETSc Usage
- 15.5.6.1 PETSc and Python
- 15.5.7 Runtime Options
- 15.5.8 Profiling
- 15.5.9 Debugging
- References
- 16. Parallel Computing with Accelerators - inang şenocak and Haoqiang Jin
- 16.1 Introduction
- 16.2 NVIDIA CUDA Architecture
- 16.3 Intel Many Integrated Core Architecture
- 16.4 Two-Dimensional Wave Equation
- 16.5 Serial C Implementation for CPUs
- 16.6 Parallel Implementation with OpenACC for GPUs
- 16.7 Parallel Implementation with OpenMP for Intel Xeon Phi
- 16.8 Parallel Implementation with CUDA for GPUs
- 16.9 Performance Discussion
- Acknowledgments
- References
- 17. Testing and Verification - Paul Kwiatkowski
- 17.1 Programs Grow and Become Software
- 17.2 Why Test?
- 17.2.1 Guarding against Regressions
- 17.2.2 Speed and Confidence
- 17.2.3 Refactoring
- 17.2.4 Informing Code Usefulness
- 17.2.5 Tests as Documentation
- 17.3 The Mechanics of an Automated Test
- 17.3.1 The Four-Phase Pattern
- 17.3.1.1 Setup
- 17.3.1.2 Exercise
- 17.3.1.3 Verify
- 17.3.1.4 Teardown
- 17.3.2 Additional Testing Terminology
- 17.3.2.1 Test Case
- 17.3.2.2 Test Harness
- 17.3.2.3 Test Fixture
- 17.3.2.4 Test Coverage
- 17.4 Major Types of Automated Software Testing
- 17.4.1 Unit Tests
- 17.4.2 Functional Tests
- 17.4.3 Integration Tests
- 17.4.4 System Tests
- 17.5 Knowing What, When, and How to Test
- 17.5.1 Separating Function Concerns
- 17.5.2 Testing Styles
- 17.5.2.1 Test-Driven Development
- 17.5.2.2 Behavior-Driven Development
- 17.5.2.3 A Note on Testing Methodologies
- 17.5.3 Considerations for Testing Parallel Code
- 17.5.4 Considerations for Testing Object-Oriented Code
- 17.5.4.1 Testing a Class as a Unit
- 17.5.4.2 Inheritance and Testing
- 17.5.4.3 Test Doubles
- 17.6 Concrete Uses of Testing
- 17.6.1 Understanding and Modifying Legacy Code
- 17.6.2 A New Project with Many Unknowns
- 17.6.3 A Project with Certainty in Its Goals
- 17.7 Realities of Testing in a Project
- 17.7.1 Does Testing Take a Lot of Time?
- 17.7.2 How Many Tests Are Enough?
- 17.7.2.1 Mutation Testing
- 17.7.2.2 Property/Generative Testing
- 17.7.3 Convincing Your Team
- Glossary
- 18. Validation of Computational Models and Codes - Christopher R. Iacovella, Christoph Klein, Janos Sallai, and Ahmed E. Ismail
- 18.1 Introduction
- 18.2 What Is a Model?
- 18.3 Molecular Models
- 18.4 Validation
- 18.4.1 Validation of Model Inputs
- 18.4.2 Sanity Checks
- 18.4.3 Comparisons with Existing Results
- 18.5 Summary
- References
- 19. Software Licensing and Distribution - Paul Saxe