hpc @ aub day 1 - computational software carpentry

thanks

overview

overview

each day will be split into a lecture and a laboratory

today's lecture

provenance

computational scientist's motivation: reproduce, reproduce, reproduce!

reproduction

media/reproduce.jpg

scientific reproducibility

scientific provenance
the origin or source of data presented in defense of a scientific theory or argument
experimental provenance
equipment, materials, and procedure in obtaining data
computational provenance
software, input data, and environment for obtaining data

Never trust a result you can't reproduce

managing code provenance

How are changes allowed to be introduced?
change management
What do we do to patent/publish/sell this?
release management
How was this particular artifact (graph/table) produced? How do we coordinate distributed development of our software?
version management

code management

change control
formal process for proposing, verifying, and recording changes to software

computational science perspective

release management

release management
management of the process of releasing software to users or a production environment

computational science perspective:

release management

software versioning schemes are somewhat arbitrary, generally:

version numbers

version control

version control
management of changes to documents, sources, and other aspects a repository

computational science perspective (absolutely essential!):

history of version control

bitbucket.org

introduction to git

Looks very similar to SVN, but introduces no abstractions because there is no central repository.

provenance

computational scientist's motivation: reproduce, reproduce, reproduce!

computational software engineer's motivation

Build, Baby Build!

a basic taxonomy of programming languages

a basic taxonomy of programming languages

interpreted vs. compiled

interpreted vs. compiled

building scientific software

building scientific software

how make all works

  1. look in the current directory for a Makefile, a text file containing declarations of targets, their dependencies, and a set of rules for building targets from their respective dependencies
  2. constructs a directed acyclic graph (DAG) mapping targets to dependencies.
  3. traverses the directed acyclic graph and, for each target, finds all its dependencies, and updates the target if it is older than any of its dependencies (out-of-date)

directed acyclic graph

media/dag.jpg

targets

media/targets.jpg

dependencies

media/dependencies.jpg

the command line

"Unix is hard to learn. The process of learning it is one of multiple small epiphanies. Typically you are just on the verge of inventing some necessary tool or utility when you realize that someone else has already invented it, and built it in, and this explains some odd file or directory or command that you have noticed but never really understood before."

Neil Stephenson "In the Beginning... Was the Command Line"

the command line - ls

$ ls

the command line - ls

 $ ls

Applications      ILOG              Public            games             sandbox
Desktop           Library           Red Kawa          homebrew          sparse_mutant
Documents         Mail              Sites             hpc@aub           thesis
Downloads         Movies            bac               hpc@aub_private   tmp
Dropbox           Music             bin               junk from desktop unison
Frameworks        Pictures          blast             ksl

ls,wc - count directory contents

$ ls | wc

  29      32     237

ls, grep, wc - number of contents that start with D

$ ls | grep '^D' | wc

   4       4      36

command line tools

grep, wc, and ls are all examples of command line tools. we don't have the time to explore the full capabilities of the command line, but it is important to know of these techniques for getting more information about any tool

command line tools - getting help

secure shell (ssh)

secure shell (ssh) in 15 seconds

ssh-keygen -t rsa -C "user@aub.edu.lb"
ssh-copy-id -i ~/.ssh/id_rsa.pub user@machine
exec ssh-agent $SHELL
ssh-add ~/.ssh/id_rsa

thanks