Cooperative Computing Lab
CCL | Software | Install | Manuals | Forum | Papers
CCL Home

Research

Software Community Operations

Homework 1: Learning Makeflow

  1. Write a Makeflow to check if "Shakespeare speak" still exists
    1. Prerequisites
    2. Objectives
    3. The Assignment
    4. Deliverables

Use the instructions in the tutorial to install and setup CCTools as required.

Homework 1

Write a Makeflow to check if "Shakespeare speak" still exists

Prerequisites

Completion of the Using Makeflow on FutureGrid tutorial.

Objectives

At the conclusion of this assignment, students will be able to:

  • Decompose and execute workflows as smaller concurrent pieces.
  • Write Makeflow scripts for the execution of their workflows.

The Assignment

In this assignment, you will compare the words seen in the works of Shakespeare with the words currently in use in the English language and identify those words that are still in use.

You will compare the words of Shakespeare listed in each of these text files:

Each file contains all the words found in a work of Shakespeare identified in the filename. For your convenience, each word is listed in a separate line to make it easier to scan and read them.

You will compare the words in each of these files with the dictionary provided in Unix systems (/usr/share/dict/words or /usr/dict/words). If a word is found to exist in the dictionary, you should print the word followed by the string "Art spoken ever and anon!". If not, you should print the word followed by the string "Ne'er spoken ever!".

To complete this assignment, you will create a Makeflow script that decomposes the problem into concurrent tasks. Your script should contain 5 rules, each describing a search of the dictionary for the words in a file, or in other words, one rule per file. You will then run this Makeflow using the Torque batch submission system as described here.

Hint:

To read each file and compare the words listed in it against the dictionary, you can use this simple python program: shakespeare-compare.py. You will then have this program executed remotely by specifying the filename containing the words to check.

For example, to check if the words in hamlet.txt exist in the dictionary, run:

python shakespeare-compare.py hamlet.txt

Create Makeflow rules that check each of the files by running this program.

Deliverables

You are required to submit the following for this homework:

  • The makeflow script that was created.
  • The makeflow log that shows successful execution of this makeflow script. (If the makeflow script is named as Makeflow, the log is created under the name Makeflow.makeflowlog.)