Title: COMPENG%20701
1COMPENG 701
- FOUNDATIONS OF MODERN SCIENTIFIC PROGRAMMING
2Course Information
- Instructor Yuriy Zinchenko,
- Information Technology Building 221,
zinchen_at_mcmaster.ca, - course syllabus at
- http//optlab.mcmaster.ca/yzinchen/
- Time and location
- Thursday, 1030-1330,
- ITB 235
3Course Goals
- introduce to high-performance/high-throughput
computing - equip with basic knowledge of computing tools
available - The course is self-contained, tutorial-based.
- Focus Basic Linear Algebra Subprograms
4Tentative Layout
- introductory lecture
- file systems, binary systems, computer and
processor architecture - Linux/Unix and Windows operating systems
- introduction to MATLAB and Octave
- introduction to C and Fortran
- BLAS
- memory management and processor architecture for
high-performance computing, compiler flags,
tuning BLAS, Automatically Tuned Linear Algebra
Software - writing fast code in MATLAB
- external libraries with MATLAB/Octave, MEX files,
BLAS interfacing - introduction to parallel computing, cluster and
multi-processor system (MPS) environments - C/Fortran for high-performance computing on MPS,
OpenMP, - using clusters (SHARCNET)
5Typical Applications for BLAS
- numerical PDEs
- image processing
- core of most optimization engines
- many others
- Important always exploit data structure!
6An Example
- Radiation Therapy for Cancer Treatment
- Background
- About 1.3 million new cancer cases in the U.S.
each year - Nearly 60 receive radiation therapy, in
conjunction with surgery, chemotherapy, etc.
7External beam radiation therapy
- Radiation delivered by a linear accelerator
- Cancer cells more susceptible than normal cells
- Dose given in daily fractions for 6 weeks
- Overlay beams from different angles
8Intensity Modulated Radiation Therapy
- Block parts of the radiation beam discretize
the beam into smaller beamlets - Choose different intensities for each beamlet
Intensity Modulated Radiation Therapy
Collaborative Working Group, 2001
9Treatment planning
Goal Choose beam angles and beamlet
intensities that kill tumor and spare healthy
tissues
- Take CT scan
- Delineate
- Discretize body into voxels
- Formulate solve a mathematical program to find
a good plan -
-
Princess Margaret Hospital
10One facet of RT treatment planning
- Formulate and solve inverse problem to find
beamlet intensities that satisfy clinical
objectives - Assuming all the input data are error-free
- Common approach use optimization
11Calculating dose delivered
- Dose delivered to voxel
- w(b) intensity of
- beamlet b
- (decision variable)
- Dose(b,v) dose
- to voxel v
- from beamlet b
- (parameter)
12Types of models
- Common objectives
- Maximize the minimum dose to the target region
- Minimize deviations from prescribed dose
- Common constraints
- Homogeneity
- Maximum dose constraints
- Dose-volume constraints
13How to deliver ?
- Bad news sensitive to errors
14Uncertainties
- Setup errors
- Patient motion
- Structural changes during treatment
- uncertainty in geometry
- A direction rescan to eliminate some of these
errors
15What can go wrong?
- A simple LP problem
- max x y
- s.t. x.99 y ? 1 x, y ? 0
16A new problem
- Given image A and its perturbed copy B, how can
we match those?
?
17Assignment 1
- MATLAB code and data are posted on the web. The
image recovery is performed via naïve local
search amongst the sequence of translations and
rotations (e.g., lines 21-30 of the code). - 0. Fill in the survey form on the next page.
- Would anything change if we replace line 26 with
line 27? Which one would you prefer? Explain both
parts. - The translation/rotation transformation is
implemented as series of operations on the
intensity matrix (e.g., scan2). Write this
operation in matrix-vector form, i.e., as ABCD
for some matrices A,B,C and D. - Are any of the data structures in 2 sparse, that
is, have big blocks of zeros? Can one potentially
take advantage of this? - Bonus question implement the sparse
matrix-vector multiplication routine in MATLAB
(may use C but no external libraries). The
fastest code gets bonus points.
18Background survey
- Name Degree you pursuing (MS/PhD) Department
- 1. Rank your answer from 1-no idea to 5-expert
level to the following questions how familiar
are you with
Linux/Unix OS
Windows OS
MATLAB
Octave
BLAS
ATLAS
C
Fortran
OpenMP
MPI
2. Circle one was todays class too
elementary just right too
complicated? 3. Reason for taking the course
required interest in the subject. 4. What
is the most important thing you would like to
learn in this class?