Archiving Computational Research in Virtual Machines Sorin Mitran - - PowerPoint PPT Presentation

archiving computational research in virtual machines
SMART_READER_LITE
LIVE PREVIEW

Archiving Computational Research in Virtual Machines Sorin Mitran - - PowerPoint PPT Presentation

UNCvm Prologue Teaching Research Epilogue Archiving Computational Research in Virtual Machines Sorin Mitran Applied Mathematics University of North Carolina Chapel Hill Applied Mathematics Perspectives Reproducible Research Workshop


slide-1
SLIDE 1

UNCvm Prologue Teaching Research Epilogue

Archiving Computational Research in Virtual Machines

Sorin Mitran

Applied Mathematics University of North Carolina Chapel Hill

Applied Mathematics Perspectives Reproducible Research Workshop Vancouver, BC July 15, 2011

slide-2
SLIDE 2

UNCvm Prologue Teaching Research Epilogue

UNCvm

1

Prologue

2

Teaching

3

Research

4

Epilogue

slide-3
SLIDE 3

UNCvm Prologue Teaching Research Epilogue

UNCvm

1

Prologue 15 years ago in July ... Store the context UNCvm

2

Teaching

3

Research

4

Epilogue

slide-4
SLIDE 4

UNCvm Prologue Teaching Research Epilogue 15 years ago in July ...

Implementing Godunov method

fweb Literate programming LaTeX documentation C, Fortran code Matlab mex facility

slide-5
SLIDE 5

UNCvm Prologue Teaching Research Epilogue 15 years ago in July ...

Implementing Godunov method

fweb Literate programming LaTeX documentation C, Fortran code Matlab mex facility

slide-6
SLIDE 6

UNCvm Prologue Teaching Research Epilogue 15 years ago in July ...

Implementing Godunov method

fweb Literate programming LaTeX documentation C, Fortran code Matlab mex facility

slide-7
SLIDE 7

UNCvm Prologue Teaching Research Epilogue 15 years ago in July ...

Implementing Godunov method

fweb Literate programming LaTeX documentation C, Fortran code Matlab mex facility

slide-8
SLIDE 8

UNCvm Prologue Teaching Research Epilogue 15 years ago in July ...

Aha! A makefile, I’m saved!

... or am I? Watcom 10.0 compiler - this might be difficult f2c, fweb, TeX - no problem Matlab 4.0 - now where’s Cleve’s phone number?

slide-9
SLIDE 9

UNCvm Prologue Teaching Research Epilogue 15 years ago in July ...

Aha! A makefile, I’m saved!

... or am I? Watcom 10.0 compiler - this might be difficult f2c, fweb, TeX - no problem Matlab 4.0 - now where’s Cleve’s phone number?

slide-10
SLIDE 10

UNCvm Prologue Teaching Research Epilogue 15 years ago in July ...

Aha! A makefile, I’m saved!

... or am I? Watcom 10.0 compiler - this might be difficult f2c, fweb, TeX - no problem Matlab 4.0 - now where’s Cleve’s phone number?

slide-11
SLIDE 11

UNCvm Prologue Teaching Research Epilogue 15 years ago in July ...

Aha! A makefile, I’m saved!

... or am I? Watcom 10.0 compiler - this might be difficult f2c, fweb, TeX - no problem Matlab 4.0 - now where’s Cleve’s phone number?

slide-12
SLIDE 12

UNCvm Prologue Teaching Research Epilogue 15 years ago in July ...

Some tools stick around, some don’t

Public domain tools are a bit more stable Proprietary tools are not Enough story-telling, get to work!

copy the directory make prog.tex fweave prog.web rm *.dvi; latex prog.tex ftangle prog.web; f77 prog.f vim prog.f; f77 prog.f; vim prog.web

slide-13
SLIDE 13

UNCvm Prologue Teaching Research Epilogue 15 years ago in July ...

Some tools stick around, some don’t

Public domain tools are a bit more stable Proprietary tools are not Enough story-telling, get to work!

copy the directory make prog.tex fweave prog.web rm *.dvi; latex prog.tex ftangle prog.web; f77 prog.f vim prog.f; f77 prog.f; vim prog.web

slide-14
SLIDE 14

UNCvm Prologue Teaching Research Epilogue 15 years ago in July ...

Some tools stick around, some don’t

Public domain tools are a bit more stable Proprietary tools are not Enough story-telling, get to work!

copy the directory make prog.tex fweave prog.web rm *.dvi; latex prog.tex ftangle prog.web; f77 prog.f vim prog.f; f77 prog.f; vim prog.web

slide-15
SLIDE 15

UNCvm Prologue Teaching Research Epilogue Store the context

Lessons learned

Panta rei, Quingenti annus abhinc vos auditus mihi diversus p(x) = y0 + [y1, y0](x − x0) + [y2, y1, y0](x − x0)(x − x1) Science is a social endeavour ... ... hence a product of its time Historians can afford to decipher Colleagues shouldn’t

slide-16
SLIDE 16

UNCvm Prologue Teaching Research Epilogue Store the context

Lessons learned

Panta rei, Quingenti annus abhinc vos auditus mihi diversus p(x) = y0 + [y1, y0](x − x0) + [y2, y1, y0](x − x0)(x − x1) Science is a social endeavour ... ... hence a product of its time Historians can afford to decipher Colleagues shouldn’t

slide-17
SLIDE 17

UNCvm Prologue Teaching Research Epilogue Store the context

Lessons learned

Panta rei, Quingenti annus abhinc vos auditus mihi diversus p(x) = y0 + [y1, y0](x − x0) + [y2, y1, y0](x − x0)(x − x1) Science is a social endeavour ... ... hence a product of its time Historians can afford to decipher Colleagues shouldn’t

slide-18
SLIDE 18

UNCvm Prologue Teaching Research Epilogue Store the context

Lessons learned

Panta rei, Quingenti annus abhinc vos auditus mihi diversus p(x) = y0 + [y1, y0](x − x0) + [y2, y1, y0](x − x0)(x − x1) Science is a social endeavour ... ... hence a product of its time Historians can afford to decipher Colleagues shouldn’t

slide-19
SLIDE 19

UNCvm Prologue Teaching Research Epilogue Store the context

Lessons learned

Panta rei, Quingenti annus abhinc vos auditus mihi diversus p(x) = y0 + [y1, y0](x − x0) + [y2, y1, y0](x − x0)(x − x1) Science is a social endeavour ... ... hence a product of its time Historians can afford to decipher Colleagues shouldn’t

slide-20
SLIDE 20

UNCvm Prologue Teaching Research Epilogue Store the context

Lessons learned

Panta rei, Quingenti annus abhinc vos auditus mihi diversus p(x) = y0 + [y1, y0](x − x0) + [y2, y1, y0](x − x0)(x − x1) Science is a social endeavour ... ... hence a product of its time Historians can afford to decipher Colleagues shouldn’t

slide-21
SLIDE 21

UNCvm Prologue Teaching Research Epilogue Store the context

Live without side effects?

Alonzo Church lambda calculus

no side effects all expressions are calculable

Imperative languages have side effects If we use imperative coding

store the context store the state

slide-22
SLIDE 22

UNCvm Prologue Teaching Research Epilogue Store the context

Live without side effects?

Alonzo Church lambda calculus

no side effects all expressions are calculable

Imperative languages have side effects If we use imperative coding

store the context store the state

slide-23
SLIDE 23

UNCvm Prologue Teaching Research Epilogue Store the context

Live without side effects?

Alonzo Church lambda calculus

no side effects all expressions are calculable

Imperative languages have side effects If we use imperative coding

store the context store the state

slide-24
SLIDE 24

UNCvm Prologue Teaching Research Epilogue Store the context

Virtual machines

What should be stored?

Compiler, library versions Tool versions OS idiosyncracies this might be a long list ...

What should be restored, and how?

all the above To install export CLAW=/home/claw What’s export?

slide-25
SLIDE 25

UNCvm Prologue Teaching Research Epilogue Store the context

Virtual machines

What should be stored?

Compiler, library versions Tool versions OS idiosyncracies this might be a long list ...

What should be restored, and how?

all the above To install export CLAW=/home/claw What’s export?

slide-26
SLIDE 26

UNCvm Prologue Teaching Research Epilogue Store the context

Virtual machine pros and cons

On the plus side

Hardware support (virtualization bit) Saves entire context

Turbo Pascal 5.5 (1989) Shock code from 1990 still runs (with graphics!)

On the loss side

Large amount of data to store - the entire OS What guarantees that the VM emulator will still run in 20 years? What about hardware essential to code execution (multiple CPUs for MPI, GPUs)

And yet ...

Storage is cheap and always getting cheaper Current strong vendor support for VM emulators MPI, OpenMP, GPU CUDA are all supported

slide-27
SLIDE 27

UNCvm Prologue Teaching Research Epilogue Store the context

Virtual machine pros and cons

On the plus side

Hardware support (virtualization bit) Saves entire context

Turbo Pascal 5.5 (1989) Shock code from 1990 still runs (with graphics!)

On the loss side

Large amount of data to store - the entire OS What guarantees that the VM emulator will still run in 20 years? What about hardware essential to code execution (multiple CPUs for MPI, GPUs)

And yet ...

Storage is cheap and always getting cheaper Current strong vendor support for VM emulators MPI, OpenMP, GPU CUDA are all supported

slide-28
SLIDE 28

UNCvm Prologue Teaching Research Epilogue Store the context

Virtual machine pros and cons

On the plus side

Hardware support (virtualization bit) Saves entire context

Turbo Pascal 5.5 (1989) Shock code from 1990 still runs (with graphics!)

On the loss side

Large amount of data to store - the entire OS What guarantees that the VM emulator will still run in 20 years? What about hardware essential to code execution (multiple CPUs for MPI, GPUs)

And yet ...

Storage is cheap and always getting cheaper Current strong vendor support for VM emulators MPI, OpenMP, GPU CUDA are all supported

slide-29
SLIDE 29

UNCvm Prologue Teaching Research Epilogue UNCvm

Virtual machines for all

Whatever your workflow

store it document it

Use version management

store states store forks

Distribute your code

with preset environment point and click examples

slide-30
SLIDE 30

UNCvm Prologue Teaching Research Epilogue UNCvm

Virtual machines for all

Whatever your workflow

store it document it

Use version management

store states store forks

Distribute your code

with preset environment point and click examples

slide-31
SLIDE 31

UNCvm Prologue Teaching Research Epilogue UNCvm

Virtual machines for all

Whatever your workflow

store it document it

Use version management

store states store forks

Distribute your code

with preset environment point and click examples

slide-32
SLIDE 32

UNCvm Prologue Teaching Research Epilogue UNCvm

Peculiarities of an academic environment

Incoming students are required to have a laptop

slide-33
SLIDE 33

UNCvm Prologue Teaching Research Epilogue UNCvm

Peculiarities of an academic environment

As for research scientists ...

slide-34
SLIDE 34

UNCvm Prologue Teaching Research Epilogue UNCvm

How to guide the transition?

Advocate for more research-friendly platforms

OS X (Carnegie-Mellon Mach kernel) Ubuntu (Debian) CentOS (Redhat)

1-click Linux install on Lenovo UNC-contract hardware Difficulties

The Linux environment still has to be configured Windows still needed, dual-boot is not officially supported

Put together a site-specific virtual machine (UNCvm)

slide-35
SLIDE 35

UNCvm Prologue Teaching Research Epilogue UNCvm

How to guide the transition?

Advocate for more research-friendly platforms

OS X (Carnegie-Mellon Mach kernel) Ubuntu (Debian) CentOS (Redhat)

1-click Linux install on Lenovo UNC-contract hardware Difficulties

The Linux environment still has to be configured Windows still needed, dual-boot is not officially supported

Put together a site-specific virtual machine (UNCvm)

slide-36
SLIDE 36

UNCvm Prologue Teaching Research Epilogue UNCvm

How to guide the transition?

Advocate for more research-friendly platforms

OS X (Carnegie-Mellon Mach kernel) Ubuntu (Debian) CentOS (Redhat)

1-click Linux install on Lenovo UNC-contract hardware Difficulties

The Linux environment still has to be configured Windows still needed, dual-boot is not officially supported

Put together a site-specific virtual machine (UNCvm)

slide-37
SLIDE 37

UNCvm Prologue Teaching Research Epilogue UNCvm

How to guide the transition?

Advocate for more research-friendly platforms

OS X (Carnegie-Mellon Mach kernel) Ubuntu (Debian) CentOS (Redhat)

1-click Linux install on Lenovo UNC-contract hardware Difficulties

The Linux environment still has to be configured Windows still needed, dual-boot is not officially supported

Put together a site-specific virtual machine (UNCvm)

slide-38
SLIDE 38

UNCvm Prologue Teaching Research Epilogue UNCvm

UNCvm

Lubuntu (Lightweight Ubuntu with LXDE) Contains free mathematical tools

Python, Octave, Gnuplot, Maxima TeXmacs

Supports via version forks

MPI, OpenMP (UNCvmMP) rCUDA GPU (UNCvmGPU)

Contains in-house code

BEARCLAW, Diapason UNCyml2tex

slide-39
SLIDE 39

UNCvm Prologue Teaching Research Epilogue UNCvm

UNCvm

Lubuntu (Lightweight Ubuntu with LXDE) Contains free mathematical tools

Python, Octave, Gnuplot, Maxima TeXmacs

Supports via version forks

MPI, OpenMP (UNCvmMP) rCUDA GPU (UNCvmGPU)

Contains in-house code

BEARCLAW, Diapason UNCyml2tex

slide-40
SLIDE 40

UNCvm Prologue Teaching Research Epilogue UNCvm

UNCvm

Lubuntu (Lightweight Ubuntu with LXDE) Contains free mathematical tools

Python, Octave, Gnuplot, Maxima TeXmacs

Supports via version forks

MPI, OpenMP (UNCvmMP) rCUDA GPU (UNCvmGPU)

Contains in-house code

BEARCLAW, Diapason UNCyml2tex

slide-41
SLIDE 41

UNCvm Prologue Teaching Research Epilogue UNCvm

UNCvm

Lubuntu (Lightweight Ubuntu with LXDE) Contains free mathematical tools

Python, Octave, Gnuplot, Maxima TeXmacs

Supports via version forks

MPI, OpenMP (UNCvmMP) rCUDA GPU (UNCvmGPU)

Contains in-house code

BEARCLAW, Diapason UNCyml2tex

slide-42
SLIDE 42

UNCvm Prologue Teaching Research Epilogue

UNCvm

1

Prologue

2

Teaching MATH566 - Undergraduate Introductory Numerical Analysis MATH761 - Graduate Numerical PDE

3

Research

4

Epilogue

slide-43
SLIDE 43

UNCvm Prologue Teaching Research Epilogue MATH566 - Undergraduate Introductory Numerical Analysis

Challenges

Introduce scientific programming Provide friendly environment

slide-44
SLIDE 44

UNCvm Prologue Teaching Research Epilogue MATH566 - Undergraduate Introductory Numerical Analysis

Challenges

Introduce scientific programming Provide friendly environment

slide-45
SLIDE 45

UNCvm Prologue Teaching Research Epilogue MATH761 - Graduate Numerical PDE

Objectives

Instill good record-keeping Controlled numerical experiment Introduce advanced tools, techniques

slide-46
SLIDE 46

UNCvm Prologue Teaching Research Epilogue MATH761 - Graduate Numerical PDE

Objectives

Instill good record-keeping Controlled numerical experiment Introduce advanced tools, techniques

slide-47
SLIDE 47

UNCvm Prologue Teaching Research Epilogue MATH761 - Graduate Numerical PDE

Objectives

Instill good record-keeping Controlled numerical experiment Introduce advanced tools, techniques

slide-48
SLIDE 48

UNCvm Prologue Teaching Research Epilogue

UNCvm

1

Prologue

2

Teaching

3

Research BEARCLAW

4

Epilogue

slide-49
SLIDE 49

UNCvm Prologue Teaching Research Epilogue BEARCLAW

Software PDE solver package

AMR MPI multiphysics mixed-mode CPU/GPU

slide-50
SLIDE 50

UNCvm Prologue Teaching Research Epilogue BEARCLAW

Patterned organic solar cells

Mimic nature

slide-51
SLIDE 51

UNCvm Prologue Teaching Research Epilogue BEARCLAW

photonic Computational model

Solve Maxwell equations Time domain Dispersive media Auxiliary equation

slide-52
SLIDE 52

UNCvm Prologue Teaching Research Epilogue

UNCvm

1

Prologue

2

Teaching

3

Research

4

Epilogue What to archive?

slide-53
SLIDE 53

UNCvm Prologue Teaching Research Epilogue What to archive?

The whole thing

Reproduce and archive the entire environment Reproduce your workflow Comment and write as you code

slide-54
SLIDE 54

UNCvm Prologue Teaching Research Epilogue What to archive?

The whole thing

Reproduce and archive the entire environment Reproduce your workflow Comment and write as you code

slide-55
SLIDE 55

UNCvm Prologue Teaching Research Epilogue What to archive?

The whole thing

Reproduce and archive the entire environment Reproduce your workflow Comment and write as you code