Homework 2

Deadline: September 19, 2012
Assignments: All parts are to be solved individually (turned in electronically, written parts in ASCII text, NO Word, postscript, etc. permitted unless explicitly stated).

Please use the ARC cluster for this assignment. All programs have to be written in C, translated with mpicc/gcc and turned in with a corresponding Makefile.

  1. (50 points) Custom message passing using sockets In this assignment, you will

    If you are having trouble with scripting and qsub, take a look at this simple implementation of using qsub, bash scripting, and ssh to launch programs on several nodes: simple_mpi.tar

    Hints:

    Discussion information:

    Run the same setup as HW1 #2. Compare your results.

    mympirun -np 4 myrtt
    

    Turn in mympirun (a script), mympi.c/mympi.h (module containing the subset of MPI functionality required) and myrtt.c (same as in HW1 but referencing mympi.h).

  2. (0 points) Learn how to compile and execute a CUDA program.
  3. (50 points) Group problem (3 per group)

    We will extend the methods of the last HW into two dimenions.

    Download, extract, compile the code lake.tar

    This program models the surface of a lake, where some pebbles have been thrown onto the surface. The program works as follows. In the spatial domain, a centralized finite difference is used to inform a zone of how to update itself using the information from its neighbors

    The time domain does something similarly, but here using information from the previous two times

    The program runs two versions of the algorithm, a CPU version, and a skeleton GPU version. Your task is to fill in the GPU algorithm to solve the same problem. Instructions
    V0:


    V1: V2: Include in README a discussion of your results. Your discussion should include answering the following questions:

    Hints:

    Turn in README, lake.cu, lakegpu.cu, Makefile

  4. Peer evaluation: Each group members has to submit a peer evaluation form.

What to turn in for programming assignments: