UW AMath High Performance Scientific Computing
AMath 483/583 Class Notes
Spring Quarter, 2011

Previous topic


Next topic

Homework 2

This Page

Homework 1ΒΆ

Due Wednesday, April 6, 2011, by 11:00pm PDT.

The goals of this homework are to:

  • Make sure you are familiar with basic Unix commands (see Unix, Linux, and OS X) and an editor, (see Text editors),
  • Start using Mercurial (Mercurial (hg)) to download course materials,
  • Create your own hg repository to keep your coursework and post homeworks to be graded.

Before tackling this homework, you should read some of the class notes and links they point to. In particular, the following sections are relevant:

You do not need to “turn in” anything for this homework, but by doing it you will create files in your repository that we can view to grade.

  1. First, if you have not already completed the survey on your background and computing needs, please do so now. You can find it here.

  2. Make sure you have access to Mercurial on the computer you plan to use (see Downloading and installing software for this class). Read the section Mercurial (hg) and the documentation linked from there in order to get a sense of how it works.

  3. Clone the class repository following the Instructions for cloning the class repository.

    Make sure you have set the environment variable CLASSHG since this is used below.

  4. Set up your own personal repository on Bitbucket, by carefully following all of the instructions at Creating your own Bitbucket repository. By following these instructions you will also create a clone of the repository and add a file to it called testfile.txt.

    Make sure you have set the environment variable MYHG since this is used below.

  5. In the clone of your repository, create a subdirectory homeworks and within this directory a subdirectory homework1, via the following commands:

    $ cd $MYHG
    $ mkdir homeworks
    $ cd homeworks
    $ mkdir homework1

    You should now be able to cd into this directory:

    $ cd homework1

    or later you can get there from anywhere via:

    $ cd $MYHG/homeworks/homework1
  6. Copy a file from the class repository to your own repository by:

    $ cp $CLASSHG/homeworks/homework1/testpython.py $MYHG/homeworks/homework1

    This should create a file testpython.py in the directory $MYHG/homeworks/homework1. Read the instructions in the file and do as instructed. As part of this you will add two files using hg, commit this change, and push them to your Bitbucket repository so that we can view them.

    Note: If you have done this and also followed the instructions at Creating your own Bitbucket repository and in the file testpython.py, you should have 3 files in your repository:

    • $MYHG/testfile.txt
    • $MYHG/homeworks/homework1/testpython.py
    • $MYHG/homeworks/homework1/testoutput.txt

    These files should also be visible from your bitbucket webpage, by clicking on the “Source” tab, see Bitbucket repositories: viewing changesets, issue tracking.

    Note: After running the test script, you will also have a file test.f90 and perhaps a.out in your directory $MYHG. Do not add these to your repository with hg add.

  7. You created a private repository, so you will have to give us permission to view or clone it. Do so by clicking on the “Admin” tab at the top of your Bitbucket account page and then use the “Add reader” tool. You should add both rjleveque and grady.lemoine (the TA).

  8. Finally, let us know where your Bitbucket repository is so that we can clone it and/or view your source files online in order to grade it. If you are registered in the class, you should be able access the class Catalyst webpage. Go to that page and follow instructions to send us this information.