## Matrix Functions Course at Gene Golub SIAM Summer School 2013

As described in a previous blog post, I gave a course on matrix functions at the Gene Golub SIAM Summer School in Shanghai last July. Summer Schools are regularly held in Shanghai and it has been traditional to produce a booklet with summaries of the courses delivered. The organizers therefore asked the speakers at the Golub Summer School to provide a summary of their courses.

I have written a summary, jointly with my postdoctoral research associate Lijing Lin, who acted as TA for the course. It is available as Matrix Functions: A Short Course (MIMS EPrint 2013.73). You can also access the other materials for the course.

In 2005 I interviewed Gene Golub when he visited Manchester. A transcription of the interview is available as An Interview with Gene Golub (MIMS EPrint 2008.8).

If you didn’t have the chance to meet Gene the interview will give you some insight into his career and the early history of numerical linear algebra. Here is a photo of Gene that I took after the interview.

The sketch below is by John de Pillis, a Professor of Mathematics at the University of California, Riverside. John is a talented sketcher and cartoonist and his 777 Mathematical Conversation Starters is full of cartoons, stories, and quotes. It includes a quote from Gene:

Most problems in scientific computing eventually lead to solving a
matrix equation.

## More LaTeX and Beamer Tips

Following my earlier posts Top 5 Beamer Tips and Fine-Tuning Spacing in LaTeX Equations I offer four further tips that I’ve been using over the last few months.

## 1. Platform-independent specification of paths

I use both Windows and Mac machines and want my LaTeX files to run equally well on both. The only difficulty arises when a file is included from another directory (usually a PDF or jpeg file or a program listing). If the file name is specified relative to the current location then forward slash syntax can be used and works on both Mac and Windows. For example

\includegraphics[width = 8cm]{../figs/fig1.pdf}


However, if files are being pulled in from many different directories it can be tedious to specify relative paths and absolute paths are preferable. The problem is that the home directory is system-dependent. My solution is to use the ifplatform package as follows:

\usepackage{ifplatform}
...
\ifwindows\def\home{d:/}\else\def\home{/Users/nick/}\fi
%              Windows            Mac or Linux
...
\includegraphics[width = 8cm]{\home/tex/figs/fig1.pdf}


The \ifwindows construct sets up \home, which is then used as the prefix to the paths of the files to be included. (I initially tried using \home{~} for the Mac, but could not find a way of making this work, since LaTeX interprets the tilde as a hard space.)

## 2. Spacier Lists

If a Beamer slide consists mostly of a list and has lots of space below the list it can aid readability if the list is opened up a little, by increasing the spacing between items. This can be done as follows:

\begin{itemize}

\item
...

\end{itemize}


## 3. Code listings

The standard verbatim environment does not look very good in Beamer, as the font it uses is rather thin. I prefer to use the Verbatim environment provide by fanycvrb, which allows me to customize the font style and color:

\usepackage{fancyvrb}
\begin{Verbatim}[fontseries=b,formatcom=\blue]
...
\end{Verbatim}


This example uses a bold font in blue. Lots of other options are available for customizing the way the Verbatim environment is rendered.

In Emacs, with the RefTeX package, the command reftex-toc produces a table of contents for a LaTeX document, allowing navigation by sectional unit. By default, this command does not know about Beamer. You can tell reftex-toc about Beamer frames by adding the following to your .emacs, after (require 'reftex):

  (setq reftex-section-levels
(append '(("begin{frame}" . -3) ) reftex-section-levels))


This works even if the frame title is set with the \frametitle command.

Posted in LaTeX | Tagged | 2 Comments

## 1980s Microcomputers and the LINPACK Benchmark

As an undergraduate and postgraduate student in the early 1980s I owned a Commodore Pet microcomputer and then a Commodore 64. Both came with Basic built into ROM. On booting the machines you were presented with a flashing cursor and could type in programs to be executed by the Basic interpreter or load programs from cassette or disk.

I used the machines in my research on matrix computations, writing many programs in Basic and Comal (a more structured, Pascal-like version of Basic, originating in Denmark).

Recently, I was looking for information about the microprocessors used in the early microcomputers. I could not find what I wanted, but remembered that some relevant information is contained in the appendices of a technical report Matrix Computations in Basic on a Microcomputer that I wrote in 1985 (the published version 1 omits the appendices). Specifically, the appendices contain

• specifications of the Commodore 64, the BBC Microcomputer Model B and Model B with Torch Z-80 second processor, and the Amstrad CPC-64,
• examples of 6502 assembly language programs for the Commodore 64 and the BBC Model B,
• Basic and Comal programs for the above machines.

As these are of some historical interest I have scanned the technical report and made it available as a MIMS EPrint. I still have the original hard copy, which was produced on the Commodore 64 itself using a wordprocessor called Vizawrite 64 and printed on an Epson FX-80 dot matrix printer, taking advantage of the printer’s ability to produce subscripts. These were the days before TeX was widely available, and looking back I am surprised that I was able to produce such a neatly formatted document, with tables and program listings. Just printing it must have taken a few hours. Vizawrite was the last wordprocessor I have used seriously, and adapting Tony Hoare’s quote about Algol I would say that it was “so far ahead of its time that it was not only an improvement on its predecessors but also on nearly all its successors”.

The purpose of the report was to convert the LINPACK Fortran linear equation solvers SGEFA/SGESL to Basic and run them on the four machines mentioned above. I found that the cost of the computations was dominated by subscripting calculations and not the floating point arithmetic. I therefore translated the Basic Linear Algebra Subprograms (BLAS) that are called by the codes into assembly language for the Commodore and BBC machines and obtained significant speedups, due to removal of the subscripting overheads.

Writing in assembly language is very different from writing in a high-level language, because the available operations are so simple: load the contents of a memory location into the accumulator, increment or decrement by one the value stored in a memory location, and so on. Fortunately, when I started this project I already had experience of writing 6502 assembly language as I had used it in my Music Master program for the Commodore 64 published by Supersoft. And I had the excellent Mikro Assembler cartridge for the Commodore 64 that made developing assembly code as easy and enjoyable as it could be.

The LINPACK routines that I translated are the ones originally used for the LINPACK benchmark that has been used since the 1980s to measure the speed of the world’s fastest computers. Based on the timings in my article extrapolated to 100 by 100 matrices, here is a table comparing the speed in megaflops of the Commodore and BBC machines with that of two recent low-end computers:

Machine Year Megaflops
Commodore 64 (Basic + machine code) 1985 0.0005
BBC Model B (Basic + machine code) 1985 0.0008
iPad 2 (data from Jack Dongarra) 2011 620
Raspberry Pi 2013 42

## Footnotes:

1

N. J. Higham. Matrix computations in Basic on a microcomputer. IMA Bulletin, 22:13-20, 1986.

Posted in matrix computations | Tagged , | 2 Comments

## Solutions to Some Emacs Problems

I’ve been using Emacs exclusively for a couple of years, on both Windows and Mac machines. Prior to that I had used it intermittently, mainly on Unix machines, for over 20 years.

In setting up and customizing Emacs I’ve hit a few Emacs problems whose solutions were not easily found on the web. I’m listing my solutions here in the hope that others will find them useful. The issues covered here are very specific. I’ll be writing about aspects of Emacs of more general interest in the future.

## Copy and Paste Problems on Mac

I encountered an intermittent problem on the Mac, originally when exporting from Org mode, giving the strange error

"quit: pasteboard doesn't contain valid data"


This error was then produced every time I did a kill (copy) or yank (paste). Pasting anything from another app (say Firefox) seemed to cure the problem, at least for a while. I eventually tracked the problem down to this configuration line that I’d put in my .emacs:

(setq save-interprogram-paste-before-kill nil)


Making that code execute only when Emacs is running under Windows cured the problem.

## Executables

On Windows I had trouble getting Emacs to find the git executable, despite the relevant directory being on the exec-path. In the end I had to set, in my .emacs,

(custom-set-variables
...
'(magit-git-executable "c:\\program files (x86)\\git\\bin\\git.exe")
'(vc-git-program "c:\\program files (x86)\\git\\bin\\git.exe")
...)


I run git from magit; the second of those lines is needed for vc-annotate.

## System Name

In my .emacs I set the Emacs window size based on the system-name variable, as I want a different window size for a laptop versus a large desktop screen. When travelling I’ve found that the window on my MacBook Pro sometimes opens too large and looks very strange, with a missing top line of the window. It seems that being on different wireless networks can change the value of system-name. I have not found a solution, other than to resize the window with the mouse when Emacs starts.

## Take Command Shell

On Windows, I use the excellent Take Command shell instead of the CMD shell that comes with Windows. In order to get LaTeX to work as I wanted I needed to tell Emacs to use this shell:

(setq TeX-shell "d:/tcmd/tcc.exe")


## Creativity Workshop

The Numerical Analysis Group at the University of Manchester held a two-day Creativity Workshop at Shrigley Hall in the Cheshire countryside at the end of May 2013. All of the numerical analysis staff, postdocs and PhD students attended, along with two external collaborators from NAG and the Rutherford Appleton Laboratory.

After successfully piloting creativity workshops in 2010 under the Creativity@Home banner, the Engineering and Physical Sciences Research Council (EPSRC) now encourages holders of large grants to exploit creativity training.

A creativity workshop is an event in which a group of people tackle questions using a structured approach that encourages innovative ideas to be generated and carefully assessed and developed. It avoids the trap that we readily fall into of evaluating ideas too soon. Such an event needs an experienced facilitator who understands the nature of creativity and can skillfully guide the participants through the steps of tackling problems.

We were fortunate to have as our guide Dennis Sherwood, a leading expert on creativity who has worked with a wide variety of organizations including Manchester United, the National Grid and the European Commission, and who is recommended by EPSRC (indeed Dennis previously led an EPSRC-funded creativity workshop in 2010 that I attended as part of the Manchester CICADA team).

Dennis provides participants with a day of creativity training before a workshop. He quotes Koestler’s law (from The Act of Creation, 1964):

The creative act is not an act of creation in the sense of the Old Testament.
It does not create something out of nothing.
It uncovers, selects, reshuffles, combines, synthesizes, already
existing facts, ideas, faculties, skills.
The more familiar the parts the more striking the new whole.

He points out a problem with Koestler’s definition: it assumes that the sub-assemblies that are selected, reshuffled, and so on, are already explicitly there. In practice they are usually there within existing patterns, and may not be so obvious. He formulates Sherwood’s Law:

Creativity is the process of forming new patterns from pre-existing
component parts. The more the resulting pattern shows emergent
properties, such as those of beauty, utility, or value,
the more powerful the corresponding idea.

So creativity does not necessarily need new ideas (in any case, we usually don’t know if an idea is novel), but is about taking existing ideas and combining them in new and unanticipated ways. Dennis’s training days and his books 1, 2 explain the principles of creativity and the workshops themselves help put them into practice.

At our workshop a number of questions were addressed, including “Being a magnet for talent”, “The undergraduate curriculum”, “Software and programming languages”, “The PhD experience”, as well as strategic plans for the group and plans for future research projects and grant proposals.

By the end of an exhausting workshop many ideas had been generated and assessed and the group is now planning the next steps with the help of the detailed 94-page written report produced by Dennis.

Despite some understandable initial skepticism among some attendees new to the creativity workshop concept, everyone participated fully and enjoyed the experience. I thoroughly recommend such a workshop to other research groups.

Photo credits: Nick Higham (1,4), Dennis Sherwood (2,3).

## Footnotes:

1

D. Sherwood, 1998, Unlock Your Mind. A Practical Guide to Deliberate and Systematic Innovation. Gower Publishing Ltd., Aldershot, Hampshire, UK.

2

D. Sherwood, 2001, Smart Things to Know about Innovation and Creativity. Capstone, Oxford, UK.

## Gene Golub SIAM Summer School 2013

A two week Gene Golub SIAM summer school on matrix functions and matrix equations was held at Fudan University, Shanghai from July 22 to August 2, 2013, in conjunction with the 3rd International Summer School on Numerical Linear Algebra and the 9th Shanghai Summer School on Analysis and Numerics in Modern Sciences. This was the fourth Golub Summer School and the second devoted to numerical linear algebra.

45 PhD students attended, coming from institutions in 15 countries. The lecturers were me and Marlis Hochbruck (Karlsruhe Institute of Technology, Germany) in week 1 and Peter Benner (Max Planck Institute, Magdeburg), Ren-Cang Li (University of Texas, Arlington) and Xiaoye (Sherry) Li (Lawrence Berkeley National Laboratory, USA) in week 2.

My 10 hours of lectures were on matrix functions. The slides and exercises can be downloaded from my website.

The lectures were held in the mornings in the GuangHua Twin Tower – an impressive, marbled 30-storey building on the Fudan campus. Attendees were grateful that the lecture room was air conditioned, as the Shanghai summer was at its peak of temperature and humidity, and on the Friday of the first week a record temperature of 40.6 degrees Celsius (105 degrees Fahrenheit) was reached in the city.

The GuangHua Twin Tower from my room in the Fuxuan Hotel.

Afternoons contained exercise sessions, 10-minute presentations by the students on their thesis work, and a guest seminar by Hongguo Xu (University of Kansas) in week 1 and Heike Fassbender (TU Braunschweig) in week 2. These were fully attended and it was great to see the students working so enthusiastically together and interacting with the lecturers.

For the lunches and dinners the students and lecturers sat together in randomized positions – an excellent idea on the part of the local organizers which helped ensure that people got to know each other.

Group photos at conferences can be rather shambolic. This one was the most professional I’ve ever seen. When we arrived at the designated spot the photographer had already set up three rows of metal staging and the photo was quickly taken (just as well given the scorching heat even at 8.15 am). Laminated photos were delivered to participants the same afternoon.

The local organizers are to be congratulated on an excellent job. In particular, Weiguo Gao and Yangfeng Su (Fudan University) and Zhaojun Bai (UC Davis) were busy every day making sure that the event ran smoothly. Daniel Szyld (Temple University) must also be mentioned for his excellent work over the last 5 years in chairing the SIAM committee that manages the Gene Golub SIAM Summer School program.

The school was generously supported by the SIAM Gene Golub Summer School fund, the Shanghai Center for the Mathematical Sciences, ISFMA (Sino French Institute of Applied Mathematics), the NSF (USA) and NAG.

Three things will stand out in my memory from the School. First, the enthusiasm of the students, among whom will no doubt be some of the future leaders of our field. (See the blog post by my PhD student Sam Relton.) Second, sitting in the plush 15th floor cafe of the GuangHua Tower chatting to other participants over a cafe latte with smooth jazz coming over the speakers. Third, the Chinese (motor) cyclists, who carry a wondrous variety of goods on their bikes and ride without any attention to the traffic signals but miraculously seem to avoid accidents. See the photos below taken on the short walk from the hotel to the department!

In summing up I can do no better than to endorse Charlie Van Loan’s words in describing the first Gene Golub Summer School in 2010: “The idea of a summer school for graduate students from around the world is the perfect way to honor Gene’s memory. It is exactly the kind of activity that Gene loved to promote.”

Professor Tatsien Li making welcoming remarks.

Marlis Hochbruch.

PhD student Antti Koskela (Innsbruck).

Morning callisthenics in front of the GuangHua Tower.

Posted in conferences | Tagged , | 1 Comment

## Notes on SIAM Annual Meeting Minisymposium on Professional Use of Social Media

In my recent post I publicized the upcoming minisymposium Establishing a Professional Presence in the Online World: Unraveling the Mysteries of Social Media and More organized by Tammy Kolda and I at the 2013 SIAM Annual Meeting in San Diego.

We had an enjoyable session. Despite being in the most far flung and hard to find room on the site, we had a good-sized audience who contributed useful questions and thoughts.

The slides for the four talks are downloadable from the previous post. Here, I summarize a few key points from each talk.

Tammy Kolda (Sandia National Labs) described how to export BibTeX entries for journal articles to html via the JabRef reference manager. The resulting html includes an abstract, keywords, and hyperlinks to the DOI, a PDF file, an expurgated BibTeX entry and a preprint version (assuming all this information is present in the entry). The idea is that the html can be used for lists of publications on a web page. I haven’t used Jabref for a while, but intend to try this export filter out. Tammy also gave a flowchart answering the question of how and where to post a publication list.

David Gleich

David Gleich (Purdue University) gave his presentation using Prezi, a cloud-based presentation tool that produces “multiscale” slides that zoom in and out. He surveyed the main social media tools and classified them into categories 1-1, 1-many and many-many. He then explained how he keeps on top of information using Flipboard, Feedly and Instapaper daily.

I described reasons for mathematicians to blog or tweet and the features that characterize a good blog. I also gave tips for using WordPress and Twitter and described SIAM’s plans for a SIAM blog.

Nick Higham

Finally, Karthika Muthukumaraswamy (SIAM Public Awareness Officer) gave a compelling explanation of why mathematicians and scientists should blog and how the web is changing science communication. She also explained the benefits of blog networks, in which several people contribute to a blog, and the motivation for the planned SIAM blog.

Karthika Muthukumaraswamy

More photos are available in my photo gallery.

Finally, I note that David Bindel has written some notes on the SIAM Annual meeting.

Posted in conferences | Tagged , , | 1 Comment