GC3: Grid Computing Competence Center

Blog index

GC3 graudates into S3IT
Posted early Tuesday morning, July 1st, 2014
How to create a module that also load a virtualenvironment
Posted late Friday morning, March 7th, 2014
Openstack workshop at GC3
Posted at noon on Saturday, February 22nd, 2014
Moving LVM volumes used by a Cinder storage
Posted late Friday evening, February 21st, 2014
How to configure swift glusterfs
Posted Monday night, February 10th, 2014
Yet another timeout problem when starting many instances at once
Posted late Friday night, February 8th, 2014
Fixing LDAP Authentication over TLS/SSL
Posted Monday night, January 6th, 2014
Linker command-line options for Intel MKL
Posted Saturday night, January 4th, 2014
A virtue of lazyness
Posted Saturday afternoon, December 21st, 2013
(Almost) readable CFEngine logs
Posted Thursday afternoon, December 19th, 2013
CFEngine error: ExpandAndMapIteratorsFromScalar called with invalid strlen
Posted Wednesday afternoon, December 11th, 2013
'Martian source' log messages and the default IP route
Posted Monday afternoon, November 25th, 2013
GC3 takes over maintenance of the Schroedinger cluster
Posted at noon on Monday, November 4th, 2013
Grid Engine: how to find the set of nodes that ran a job (after it's finished)
Posted early Wednesday morning, October 30th, 2013
Python2 vs Python3
Posted at teatime on Friday, September 13th, 2013
GC3Pie 2.1.1 released
Posted Friday evening, September 6th, 2013
Happy SysAdmin day!
Posted mid-morning Friday, July 26th, 2013
Object-oriented Python training
Posted Thursday afternoon, July 25th, 2013
Elasticluster 1.0.0 released
Posted Thursday night, July 18th, 2013
Short Autotools tutorial
Posted at lunch time on Friday, July 5th, 2013
Patch Emacs' PostScript printing
Posted Tuesday evening, June 11th, 2013
Slides of the Object-oriented Python course now available!
Posted Tuesday evening, June 11th, 2013
Automated deployment of CFEngine keys
Posted at midnight, May 31st, 2013
Posted Tuesday evening, May 14th, 2013
Join us at the Compute Cloud Experience Workshop!
Posted early Monday morning, April 29th, 2013
GC3 Beamer theme released
Posted at lunch time on Friday, April 5th, 2013
VM-MAD at the International Supercompting Conference 2013
Posted at lunch time on Tuesday, March 26th, 2013
The GC3 is on GitHub
Posted at lunch time on Monday, March 18th, 2013
How to enable search in IkiWiki
Posted Friday afternoon, March 15th, 2013
GC3Pie Training
Posted Thursday night, March 7th, 2013
Object-oriented Python training
Posted Thursday afternoon, March 7th, 2013
Advance Reservations in GridEngine
Posted late Thursday morning, March 7th, 2013
GridEngine accounting queries with PostgreSQL
Posted Wednesday night, March 6th, 2013
Floating IPs not available on Hobbes
Posted at teatime on Tuesday, February 26th, 2013
Notes on SWIFT
Posted mid-morning Tuesday, February 12th, 2013
An online Python code quality analyzer
Posted at lunch time on Saturday, February 9th, 2013
Seminar on cloud infrastructure
Posted Sunday night, February 3rd, 2013
GC3 announce its cloud infrastructure Hobbes
Posted Wednesday afternoon, January 30th, 2013
GC3Pie 2.0.2 released
Posted Monday afternoon, January 28th, 2013
Continuous Integration with Jenkins
Posted at noon on Saturday, January 26th, 2013
On the importance of testing in a clean environment
Posted mid-morning Monday, January 21st, 2013
Weirdness with ImageMagick's `convert`
Posted at teatime on Tuesday, January 15th, 2013
boto vs libcloud
Posted Tuesday afternoon, January 15th, 2013
Resolve timeout problem when starting many instances at once
Posted at lunch time on Monday, January 7th, 2013
Proceedings of the EGI Community Forum 2012 published
Posted at teatime on Monday, December 17th, 2012
SGE Workaround Installation
Posted at lunch time on Tuesday, December 4th, 2012
How to pass an argument of list type to a CFEngine3 bundle
Posted mid-morning Thursday, November 22nd, 2012
GC3 at the 'Clouds for Future Internet' workshop
Posted mid-morning Wednesday, November 21st, 2012
GC3 attends European Commission Cloud Expert Group
Posted mid-morning Monday, October 29th, 2012
SwiNG - SDCD2012 event
Posted at lunch time on Monday, October 22nd, 2012
Large Scale Computing Infrastructures class starts tomorrow!
Posted late Tuesday afternoon, September 25th, 2012
From bare metal to cloud at GC3
Posted mid-morning Monday, September 24th, 2012
GC3 at the EGI Technical Forum 2012
Posted Thursday night, September 20th, 2012
Training on GC3Pie and Python
Posted late Friday evening, September 7th, 2012
GC3Pie used for research in Computational Quantum Chemistry
Posted late Thursday afternoon, September 6th, 2012
``What's so great about MPI or Boost.MPI?''
Posted mid-morning Thursday, September 6th, 2012
blog/How to generate UML diagram with `pyreverse`
Posted late Thursday morning, August 23rd, 2012
Git's `rebase` command
Posted mid-morning Friday, June 15th, 2012
AppPot 0.27 released!
Posted at noon on Thursday, June 14th, 2012
Urban computing - connecting to your server using `mosh`
Posted mid-morning Wednesday, June 6th, 2012
Whitespace cleanup with Emacs
Posted Tuesday afternoon, June 5th, 2012
Translate pages on this site
Posted Thursday evening, May 31st, 2012
Scientific paper citing GC3Pie
Posted Wednesday evening, May 30th, 2012
GC3 attends Nordugrid 2012 conference
Posted at lunch time on Wednesday, May 30th, 2012
How the front page image was made
Posted late Wednesday evening, May 16th, 2012
GC3 blog launched!
Posted late Tuesday evening, May 15th, 2012
New GC3 Wiki now online!
Posted Tuesday evening, May 15th, 2012
AppPot paper on arXiv
Posted Tuesday evening, May 15th, 2012
GC3 at the EGI Technical Forum 2011
Posted Tuesday evening, May 15th, 2012

More on topic...

How the front page image was made

We wanted a composite picture for the front page, something that would hint at the multifaceted GC3 activities. We opted for making a 2x2 tiled picture from other image sources. This post shows how the final picture was assembled; it is essentially an exercise in using the wonderful ImageMagick command-line programs.

Choosing image sizes

First, note that the front page image has a fixed vertical dimension of 295px, according to the UZH CSS style. The width can be adjusted; choosing 480px gives an aspect ratio which is close enough to the Golden ratio, yet also easy to remember.

Since the final picture is a 2x2 assemblage of tiles, each tile must be 240px wide and 150px tall; the aspect ratio of each tile is exactly the same as the assembled picture.

ImageMagick's montage program can resize the tiles when assembling them, so all we need to do is take pictures with the correct aspect ratio.

Gathering pictures: camera shots

The first two pictures were kindly provided by Tyanko who took some beatiful close-ups of our servers in the machine room with his iPhone.

ImageMgick's identify command can be used to find out the format and size of an image:

    $ identify A.jpg
    A.JPG JPEG 2592x1936 2592x1936+0+0 8-bit DirectClass 2.041MB 0.000u 0:00.000

In this case it tells us that the iPhone camera shoots at 2592x1936 (5 Mpx), so the aspect ratio is 1.3, whereas we need 1.6. Given the look of the pictures, we can just trim two horizontal bands from the top and the bottom of the image, so to reduce the vertical size and increase aspect ratio.

A quick computation says that we need to reduce the vertical size to 1607px in order to have the aspect ratio 1.6; therefore we need to remove 165px from the top, which can be done with ImageMagick's mogrify command:

    mogrify -crop 2592x1607+0+165 A.jpg

The -crop option tells mogrify what part of the picture to extract: everything outside the specified rectangle is discarded. The argument of the -crop option is an extended X11 geometry specification:

  • it starts with the image dimensions: width x height (both in pixels),
  • followed by the coordinates of the upper left corner of the rectangle to crop: +X+Y

So, in this case case we have:

  • width is 2592: we keep the full horizontal range of the pictures;
  • height is 1606, as computed before;
  • X is 0: again, the left side of the cropped image is the left border of the original one;
  • Y is 165: we discard this many lines from the top of the pciture.

Note that the mogrify command overwrites the pciture with the modified one; the convert command can do the same operations and write the output to a different file:

    convert original.jpg -crop 2592x1606+0+165 modified.jpg

Gathering pictures: screen shots

Other pictures can be easily made by taking a screenshot and selecting a small portion of the windows arrangement.

ImageMagick provides the import command to save a portion of the screen or a window onto a file:

    import -window emacs@xenia -crop 640x450+0+0 C.jpg

(Here we capture a larger portion of the Emacs window: after the final resize it will look a bit blurred, but the information per pixel is higher.)

Note, however:

  • import only works if the window is visible (mapped): it cannot take snapshots of windows on other virtual desktops.

  • the snapshot is captured immediately: there's no delay!

  • the -window option takes the window name (use root to capture the whole screen), which can be unwieldy.

The standard X11 program xwd allows you to select a window by clicking on it with the mouse, and then dumps it to STDOUT (in its very own "X/Windows Dump" format). We can capture that stream and convert it to a PNG image with ImageMagick's convert:

    xwd | convert XWD:- -crop 640x450+0+0 D.png

Gathering pictures: adapt what's on the internet

The Wordle.net website lets you create beautifully-woven word patterns, given a list of words (e.g., any text excerpt).

Nothing special here: just choose the full-screen version of the wordle, and use the import/xwd to dump it to a file; find out the dimensions and trim borders with mogrify. Just remember to aim at the correct aspect ratio. For example:

    convert wordle.png -crop 1600x1000+150+75 F.png

All together now

Now it's time to assemble all the pictures together into a composite one. Enter montage, an ImageMagick utility just for the purpose:

    montage -tile 2x2 \
        A.jpg -resize 240x150 \
        C.png -resize 240x150 \
        D.jpg -resize 240x150 \
        B.jpg -resize 240x150 \
        -geometry +0+0 \

Let's review the command-line arguments one by one:

  • -tile: this specifies the tile arrangement: tiles are taken from the following command-line arguments: the first one specifies the top left tile, the second is the tile immediately to the right, and so on until the first row is filled; then montage advances to the next row.
  • A.jpg -resize 240x150: this takes the file A.jpg, resizes it to the final dimension, and places it in the top left tile; other arguments do the same with files B.jpg, C.png, etc.
  • -geometry +0+0: this is a counter-intuitive use of the -geometry option, for it specifies that no padding should surround the tiles (+0+0 for 0 pixels of horizontal padding, and 0 pixels vertical).
  • cover-photo.jpg: this is the output file.

Note that tiles are not required to have the same size: montage will pad images as necessary to make all tiles in a row (resp. column) have the same height (resp. width).

Now, what's your favorite arrangement?
Can you come up with a better front page image? :-)


A.jpg|B.jpg|C.png D.jpg|E.png|F.png