• No results found

Sourcery Overview & Virtual Machine Installation

N/A
N/A
Protected

Academic year: 2021

Share "Sourcery Overview & Virtual Machine Installation"

Copied!
17
0
0

Loading.... (view fulltext now)

Full text

(1)

Sourcery Overview & Virtual Machine Installation

Damian Rouson, Ph.D., P.E.

Sourcery, Inc.

www.sourceryinstitute.org

(2)

About Us

Sourcery, Inc., is a software consultancy founded by and for

computational scientists, engineers, and mathematicians.

We are involved in software development, training, and consulting

centered around modern Fortran, including:

Sourcery, Inc., was launched in 2013 through the Entrepreneurial

Separation to Transfer Technology program of Sandia National

Laboratories.

Morfeus

OpenCoarrays

(3)

Foundation: a narrated evolution of Fortran 77 code to Fortran 2008.

Programming Paradigms in Modern Fortran

Object-Oriented Programming (OOP) for computational science, engineering, and mathematics.

Functional Programming using user-defined operators for asynchronous expression evaluation.

Parallel Programming, including

Single Program Multiple Data (SPMD) programming via the coarray Fortran (CAF)

Many-core accelerator and GPU programming.

Mixing CAF and MPI

Breaking the bulk synchronization bottleneck with Fortran 2015 CAF EVENTs.

Loop concurrency

Sourcery Curriculum

(4)

Software Engineering in Modern Fortran

Object-Oriented Design Patterns: best practices for choosing program structure and behavior.

Agile development and Test-Driven Development (TDD)

Literate programming with documentation generators.

Programming by contract, formal design constraints, and runtime assertions.

Tools, Libraries and Frameworks: performance tuning, building, testing, documentation generation,

reverse engineering of class diagrams, parallel sparse linear algebra.

Case Studies

Parallelizing legacy Fortran.

Mixing Fortran with C/C++.

Unit testing.

(5)

MoFoSoft: modern Fortran code examples and student exercises for use in Sourcery and Stanford Courses.

ScientificSoftwareDesign: all codes from the textbook Scientific Software Design: The Object-Oriented Way.

GCC 6.0: Fortran, C, & C++ compilers, including support for CAF parallel programming.

OpenCoarrays: transport layer using MPI or GASNet communication libraries to support CAF compilers.

MPICH, OpenMPI: Message Passing Interface implementations.

GASNet: a communication library for Partitioned Global Address Space (PGAS) languages, including CAF (which is part of Fortran 2008) and Unified Parallel C (UPC)

PSBLAS: modern Fortran Parallel Sparse Basic Linear Algebra Subroutines for CPUs and GPUs.

pFUnit: a unit testing framework for modern Fortran.

Eclipse/Photran: an integrated development environment (IDE) and refactoring tool for modern Fortran.

All Attendees Receive a Multi-Core-Capable Linux Virtual

Machine Loaded with Open-Source Software

(6)

TAU: parallel performance tuning and analysis utilities.

CMake/CTest: Cross-platform Makefile generator for automated software building and testing.

ForUML: Reverse engineering tool for generating object-oriented design diagrams of modern Fortran codes.

ROBODoc: Automated documentation generator.

Git: distributed version control.

Octave: a MATLAB-like interpreted language for numerical computation and visualization.

Doxygen: Automated documentation generator and reverse engineering tool.

(7)

Compiler Support

x supports all Fortran 2003 features employed in our courses

o supports all Fortran 2008 & 2015 features we employ

- supports all Fortran 2008 features we employ & some 2015 features

Compiler

Fortran 2003 2008, 2015

GNU

x

o

Cray

x

-Intel

x

-IBM

x

Portland Group (Nvidia)

x

(8)

1. Download and install VirtualBox from http://www.virtualbox.org.

2. Launch VirtualBox and select “File->Import Appliance” and import the “SourceryLubuntuYYYYMMDD.ova” file*. 3. Double-click the imported file to boot Linux in a window.

4. Log in using Account Name: sourcery student Password: U-Guest-It (Your username is “guest”) 5. The sourcery student account has superuser privileges via the sudoers list.

6. The virtual machine contains environment modules for loading and unloading a few of the installed packages, including various versions of GCC, MPICH, etc. Type “module avail” to see the available modules and see

http://modules.sourceforge.net for more details.

*If you have less than 12 GB of free storage space on your computer, see the next slide.

(9)

If you have less than approximately 12 GB of free space on your

computer, you can store the virtual disk on a flash drive. The screen

shot below shows where to specify the path to the virtual disk:

Placing the virtual disk on the flash drive might affect its

performance and will require that the flash drive be connected to

the computer every time you use the virtual machine.

(10)

Sourcery Courses Leverage Modern Fortran’s Support for

Multiple Programming Paradigms

00-6

Parallel programming (Fortran 2008 and 2015)

Object-oriented programming (Fortran 2003)

Mixed-Language Programming (Fortran 2003)

Functional Programming (Fortran 95)

u_t = -(.grad.p)/rho + nu*(.laplacian.u) -(u.dot.(.grad.u))  

User-defined, purely functional, asynchronous operators

(11)

Live Coding “Jam Sessions” Motivate Modern Fortran

Why write pure procedures?

- To facilitate optimizations, including vectorization & parallelization.

Why use coarrays?

- To write parallel algorithms that operate on distributed data.

Why use modules?

- To hide information, increase type safety, and document dependencies.

Why define derived types?

- To encapsulate data and move to a higher level of abstraction.

Why extend types?

- To facilitate code reuse and polymorphism.

Why use abstract types?

- To facilitate design reuse and make code more flexible.

Parallel

Programming

Object-Oriented

Programming

Object-Oriented

Design Patterns

Functional

Programming

(12)

Sourcery Courses Incorporate

Open-Source HPC Tools

(13)

0.00# 0.20# 0.40# 0.60# 0.80# 1.00# 0# 5000# 10000# 15000#

Effic

ie

nc

y(

Number(of(Images(

Weak#Scaling#

Sourcery Courses Teach Techniques that

Scale to Massively Parallel Platforms

(14)

We Employ Examples and Hands-On Exercises

Relevant to Scientific Programming

d~x

dt

⌘ ~v

d~v

dt

=

1

p

[~v

wind

(z)

~v] ⌧

p

m

6⇡aµ (T

air

(z; T

0

))

Starting with “stars” initially located randomly around a

unit sphere with velocities oriented radially outward, we

will develop a parallel simulation of the stars’ motion using

a linear drag law:

Object-oriented design patterns give us the flexibility to

extend our initial code and design. We progressively

enhance the simulation’s fidelity by adding the option to

include fireworks colors, a turbulent wind velocity profile,

and variable air properties while offloading much of the

new logic to the compiler in the form of dynamic

(15)

http://www.cambridge.org/Rouson

14

Course Attendees Receive a Copy of

Scientific Software Design: The Object-Oriented Way

Textbook for Short Courses at

Wright Patterson Air Force Base, SC14,

Bettis Atomic Power Laboratory, BP, NASA LaRC, ARL, NRL (DC), NRL (CA),

Knolls Atomic Power Laboratory, NASA GSFC, Oak Ridge, SC12, NCAR,

(16)

Online Tutorials

(17)

14

Sourcery Short Courses Employ Material Developed for

University Graduate Courses

Stanford University (2013, 2014)

University of Cyprus (2006)

References

Related documents

According to the above analysis of the factors that have effect on patent applications and other influencing factors, firstly, select the application process, the rule of

Position student at start line for 6' chain link fence climb (5 yards from fence)... Inform student

Борде показав, що проблеми, які виникають під час переливання крові – гемаглютинація і гемолі - зис (на той час групи крові ще не було відкри- то К.. За його

Within the last 12 months, Morgan Stanley has provided or is providing investment banking services to, or has an investment banking client rela- tionship with, the following

Project/Program Name: Washoe County Supports "Nevada's Working Capital,, project Scope of the Project: Train and Certify Library Staff instructors to adrninister

County-level distributions of blue, green, and grey water footprint for a 2000 DMT/d biorefinery in 2017 to produced biofuel from (a) corn stover grown in Iowa via advanced

We have audited, in accordance with the auditing standards generally accepted in the United States of America, the standards applicable to financial audits contained in

- OECD/Eurostat Joint Questionnaire on inland waters – Metadata; - Agro-environmental indicator (AEI) 20: Water abstraction, as defined in the COM (2006) 508 on "Development