Announcements



6/8/99:
  • All programming assignment #3s have been graded. If you have not received your grade via email, let me know as soon as possible. Grading criteria is available.
5/29/99:
  • The last lab hours will be held Monday (the 31st) from 4-5:30 as usual. If you think you will be working on the assignment past Tuesday and would like me to have lab hours on Friday, email me and let me know.
  • Postscript Viewer for windows is available here. Download gsv27550.exe. After installing, open up gsview to view files. When printing, I used the mswinpr2 device for my printer.
5/25/99:
  • Grades: I have emailed out to each student their grades so far in the class. Please check this out and make sure your scores are accurate. The scores are in the order of programming assignment #1, midterm #1, and programming assignment #2.
  • Programming Assignment #3: You do NOT need to turn in a hardcopy of your report.
  • Course notes for second half of the quarter (i.e. Fran's notes) will be handed out on Friday (the 28th)
  • A small script is now available for you to use in $PUBLIC to calculate speedup. It functions as follows:
    calc_speedup <prefix of files>
    
    It assumes that you have 4 files named as follows
    • <prefix of files>.1
    • <prefix of files>.2
    • <prefix of files>.4
    • <prefix of files>.8
    Each file is formatted as Dmitrii described in the assignment writeup.
    A file labeled <prefix of files>.speedup will be created with the speedup numbers for each chunk size. Additionally, a postscript file will be created, <prefix of files>.speedup.ps which graphs the numbers.
5/25/99:
  • All programming assignment #2 regrades have been completed. Let me know if you haven't received yours.
  • Programming assignment #3: Note that for this assignment, we are allowing you the option of using code that doesn't output a correct image. The reason is that the objectives of this assignment are different. However, you will be docked points for doing this. This may seem like you are being docked twice for the same mistake, but we don't see how this could be avoided for the following reasons. One reason is that there is no easy way to check if your optimization is correct or not. The other reason is to be fair to those students who did spend the time to get their programs working. If you choose to use this option, you should document this well in your report. But note, depending on how functioning your program is, your timings may not behave "nicely".
  • Note on my pack/unpack routines: This is something I forgot to announce earlier...

    When working with one of the students, I discovered that my description of the unpack_array routine was flawed. In the description, I noted that a processed chunk should be sent from the worker to the manager without the ghostcells. However, in my implementation I was sending back the chunks with the ghostcells (this was a simplification that I intended to go back and implement later but forgot). So, instead of having
    EL_G( to_array, i, j, width) = EL_G(from_array, m,n, chunk_x);
    
    it should have been
    EL_G( to_array, i, j, width) = EL(from_array, m,n, chunk_x);
    
    So, if you used my routines in the second programming assignment and weren't able to get your program to work correctly because of this, please send me some email and we'll work something out. But you will need to demonstrate that the problem with your program is dependent on this factor.
5/24/99:
  • Programming Assignment #3: You don't need to include the case where there are 8 workers and a chunk size of 512x512 for the 1024x1024 image in your timings.
  • Reminder: There will be no section Wednesday (26th)...instead I will have lab hours.

  • Turning in Programming assignment #3: If you are working in partners, only one person needs to turn in the code. If you are the partner not turning in the code, instead turn in a text file saying who you worked with. And, make sure that BOTH of the partner's names are on the writeup.

  • Writeup for Programming assignment #3: In the part where we ask you to comment on the optimizations you decided not to do, just write 2-3 sentences on how you would approach each optimization. Feel free to just use what I showed you in section.

  • Turning in Programming assignment #3: For this assignment, you should turn in
    1. your base code (parallel program without optimizations) - edge0
    2. optimized code (edge1, edge2, etc. )
    All code should be tarred up into one directory with one makefile. All executables should be made on typing 'make'. For example,
    all: edge0 edge1 edge2 ...
    
    edge0: edge0.o
            $(CLINKER) $(OPTFLAGS) -o edge0 edge0.o
    
    edge1: edge1.o
            $(CLINKER) $(OPTFLAGS) -o edge1 edge1.o
    
    edge2: edge2.o
            $(CLINKER) $(OPTFLAGS) -o edge2 edge2.o
    .
    .
    .
    
    We ask that you name your base code as edge0 and your optimizations as edge1, edge2, etc. You should specify in your report which optimizations are in each executable.

  • DON'T FORGET: Today is the last day to turn in Programming assignment #2 regrade requests.

  • Programming Assignment #3: The avg overhead time is the sum of the total overhead time spent on each worker divided by the total number of workers. The average computation time is calculated in the same manner.

  • 160 students: The machines considered fast in the uape lab are the ultra sparcs: uape-50 to uape-53.

  • Programming Assignment #3: For the serial time to calculate speedup, use the timings for your parallel program using 1 worker.
5/23/99:
  • If you have received the following message while running your program,
    cpu limit exceeded, cored dumped.
    
    this means that your program has been running for more than 20 minutes (your environment is set up such that each process has a maximum running time of 20 minutes). Given the image and chunk size, your program shouldn't be running this long. Please check your program to see if you can find any inefficiencies that would cause it to run longer than necessary.
  • 160 students: A script is now available in $PUBLIC for checking for leftover processes on a group of machines. This script will take as input your machinefile and the name of your executable. All machines in your machinefile will be checked for leftover processes. Use as follows:
    check_for_processes <machinefile> <executable>
    
    For example,
    check_for_processes machines pedge_detect
    
5/19/99:
5/18/99:
  • All programming assignment #2s have been graded. If you have not received your grade via email, let me know as soon as possible. Also, please read the posted grading criteria...you may want to submit a regrade for a higher score.
5/17/99:
  • The writeup on gnuplot has been extended with information on how to put titles and labels on your graphs.
  • Meaw's presentation on Nile - 5/12/99 is now online + study questions
5/14/99:
  • CHANGE TO ASSIGNMENT #3: Instead of running your experiments with a 2048x2048 image, use 1024x1024 image and chunks sizes of 4x4, 16x16, 256x256 and 512x512. This change is already reflected in the posted assignment, so if you are just starting out then ignore this announcement.

    Here are some suggestions on how to stage your long-running experiments:

    • Use the same machine file for all runs you will be comparing and try to include both fast and slow machines into it.
    • Make sure that your 1-worker case runs on a relatively fast machine (not those slow Sparc 4s and 5s). Otherwise the run with lots of tiny chunks might take quite a while to complete.
    • Make sure there are no "runaway" processes left on any of the systems after you are done.

  • If you have a long run of experiments to do and you don't want to stay logged in for the duration of the run, you can use at command to run your experiments. If you simply put them in the background (with "&" or "bg") some shells will kill the processes if you exit the shell. Here is how to run command my-command immmediately:

    at now
    at> my-command
    at>
    (press Control-D)

    If your program produces anything on standard input you will be notified by mail when the job is done (or killed). If your program does not produce anything on standard input but you still want to be notified by mail then use -m option. See the man pages for further details.

5/13/99:
  • A writeup on gnuplot is now available. This tells you how to quickly generate plots as soon as your experiment finishes.
5/12/99:
  • If you would like a partner for programming assignment #3 and need some help coordinating this, send me some mail and I'll see what I can do to match you up with someone else in the class.
  • Programming assignment #3 is now out. Please get started early on this one and be sure to ask questions if something isn't clear or if you would like to deviate from what is written up.
  • 160 students: Regarding the note below (5/11/99) about leftover processes, check all of the machines that you are running on (i.e. the machines in your host file). That is if the machine you are running on has leftover processes, the other machines you are running on will be likely to have leftover processes as well.
5/11/99:
  • 160 students: ACS has requested that I ask you folks to check for leftover processes when running your MPI programs. I am assuming for some kinds of failures in your MPI programs, not all of the processes exit gracefully. Therefore, if you are seeing MPI errors when running your programs, check to see if there are any leftover processes by running
    ps -u <username>
    
    I have provided a script written by Walfredo Cirne to abort the leftover processes. It is also in your $PUBLIC directory. To use, type
    killn <name of process(es) to be aborted>
    
5/10/99:
  • Extra lab hour: Tuesday May 11 3:30 - 4:30
5/8/99:
  • Late policy on Prog2: Programming assignment #2's late deadline has been extended to Tuesday May 11th at 11:59 pm. Therefore, you will only lose 5% from today until Tuesday. After that, the regular late deadlines will be enforced (i.e. 5% docked for each day the assignment is late).
  • Otto has a fix for forcing MPI to output messages cleanly
5/7/99:
  • More MPI help: I put up another example on the packing page for MPI_Type_vector
5/5/99:
  • Change of lab hours: Lab hours this Friday will be held from 3:30 - 4:30 instead of the regularly scheduled hours. Also, I will be holding extra lab hours tomorrow (Thursday) from 5 - 6:30.
  • Section (4/28/99): In the last section, I was trying to show Amdahl's law but got mixed up on the notation of the equation. It turns out that your book has a nice description of it on page 28. Let me know if you have any questions about it.
5/4/99:
  • The AppLeS Jacobi 2D slides have been posted here
  • Midterm: Sample midterm questions have been posted here
5/2/99:
  • Reminder: midterm is on Monday May 10
4/27/99:
  • I will be away from Thurs(28th) to Sun(2nd). If you have questions about the assignment, email Dmitrii at dzagorod@cs.ucsd.edu.
  • There will be no lab hours on Friday (30th). Instead I will have them on Wed (27th) from 4:30 - 6.
  • PGM viewer for DOS/Windows: Greg McClellan has posted the following:
     http://ieng9.ucsd.edu/~gmcclell/pgm.html
    
4/26/99:
  • Lab Hours today:Because the uAPE lab is full, I am in the APE lab instead (5402). Just knock on the door if you need help.
4/25/99:
  • Turning in prog2 (260 students): Tar up your source code and makefile
    cd <source code directory>
    tar cvf - . > mycode.tar
    
    Then turn in your code by copying it into the turnin directory as done in the last assignment. However, instead of giving group readable permissions, we now have a more secure way of giving Dmitrii and I exclusive access to your code thanks to Otto:
         1. Create the file of interest (<file> in this procedure).
         
         2. Remove group, world permissions:
         
            chmod go-rwx <file>
         
         3. Give Shava and Dmitrii discretionary reading access:
         
            setfacl -m user:ssmallen:r--,user:dzagorod:r--,mask:r-- <file>
    
         4. Check you've done this correctly by retrieving the ACL entries:
    
            getfacl <file>
    
            Make sure that the "effective" permissions for ssmallen and dzagorod are r--.
    
    
    Otto has made a model turnin script which does these operations. If you're interested you can find this at
           ~osievert/class/260/bin/turnin
    
  • 160 students: If you added the class after the first week of school, you probably didn't receive your first programming assignment grade because I hadn't updated my mailing list. Please let me know if you haven't received your grade and I will email it to you.
4/23/99:
  • Turning in prog2 (160 students): Tar up your source code and makefile
    cd <source code directory>
    tar cvf - . > mycode.tar
    
    Then turn in your code
    turnin -c cs160s mycode.tar
    
  • Makefile for prog2: Be sure to link in the math library to your executable. This is required for the rint call.
    edge_detect: edge_detect.o
            cc -o edge_detect edge_detect.o -lm
    
  • There is now a page available that contains information about the MPI_Pack/Unpack and MPI_Type_vector routines that I mentioned in section.
  • mistake in section: In section someone asked if it was alright to check the input of project 2 before calling MPI_Init. At the time I said yes...that is wrong. You shouldn't access the command line arguments before calling MPI_Init.
  • Hint on prog2: It's not a good idea to start project 2 using my serial version of the code as your basis. It is best to start from scratch...generally parallel programs are structured differently than serial programs, so starting from a serial program may be more confusing.
  • Hint on prog2: One good way to get started is to just get the manager and workers coordinated with passing chunk numbers (and not the actual chunk data yet). Then once you get that working, you can focus on how to pack the data, compute the data, and unpack the data.
  • All project 1s have been graded. If you have not received your grade via email, let me know as soon as possible. I will try to post my grading criteria shortly.
  • In order for a process to receive messages from anybody, use MPI_ANY_SOURCE for the source.
  • You can assume that there will only be comments in the pgm file between the format and the width
  • You can assume that the pgm values are small enough to fit within int.
  • To view a pgm file, type
    xv <pgm file name>
    
4/16/99:
4/14/99:
  • 260 students: The $PUBLIC directory now contains edge and images.
4/12/99:
  • There is a typo in the assignment...part 5 supplies two formats. One using 'Receiving' and one using 'Received'. Use either one...I will change my grading scripts to accept both.
4/11/99:


4/10/99:


4/9/99:
  • MPI: Here is a response I got back from the MPICH people regarding how to pass string arguments with spaces:
    Currently, there is no way to send string arguments that contain spaces using
    mpirun.  We are working on fixing this and hope to have it incorporated into
    our next release.  You can get around using mpirun by using a procgroup file.
    By typing
            mpirun -show -np <num processors> <executable>
    you can see how mpirun constructs a procgroup file.  You can use this as an 
    example to create your procgroup file, then type
            <executable> -p4pg <procgroup file name>
    
4/8/99:
  • Typo in Prog1 description: The correct command line option for mpirun to indicate the machine file you want to use is -machinefile and not -m.


4/7/99:
  • 160 students:If any of you have received the following error
    /usr/ucb/cc: language optional software package not installed
    while compiling, this is not a problem with MPI or your program...it's the machine you trying to compile on. So, the fix is to report the problem to ACS and move to another machine (or at least compile on another machine). This error message was seen at uape-28...I don't know if exists elsewhere. Basically, it's complaining that it can't find the regular cc compiler. I already reported this problem to ACS, so hopefully uape-28 will be usable again soon. If anybody discovers when the problem becomes fixed, email me, and I will put it up on this page.
  • Lab Hours: have been extended to 5:30 on Mondays and Fridays
  • 160 students - Environment setup (revisited):If you chose not to use the prep command and followed my advice about setting the variables in your .cshrc file and then followed my advice again when I told you to move the variables to your .login file, please see this page again. Basically, the variables need to be in both depending on whether you are logging in from a remote machine or opening up a window within Xwindows.


4/6/99:
  • MPI:It seems that this version of MPI that we are using (MPICH) does not handle I/O as cleanly as I had thought. So, as most of you who have started the assignment probably already know, messages send to stderr/stdout can be mixed up. So, for example, here is a sample output of the hello_world example when I run with 4 nodes:
    1 of 4:  Hello, World!
    3 of 4:  Hello, World!
    2 of 4:  Hello, World!
    0 of 4:  Hello, World!
    
    I had thought it was enough to prefix messages by their rank to distinguish where messages sent to stdout/stderr were coming from. But, it seems that this is not always the case (i.e. it is possible for messages from different processes to be interspersed with each other). So, it is possible to see something like this in your program:
    1 of 4:  Hello, World!
    3 2 of 4:  Hello, World!
     of 4:  Hello, World! 
    0 of 4:  Hello, World!
    
    As you can see, the message from process 2 started printing in the middle of the message printed out by process 3. And as far as I know, there is no easy way to handle this. If this is something that bothers you, the best solution I have come up with for the time being is to print your messages to files identified by a process's rank rather than to stderr/stdout. So, for example, you could use something like
    FILE * mystdout;
    char filename[MAX_FILENAME_LENGTH];
    
    sprintf( filename, "out%i", rank );
    mystdout = fopen( filename );
    .
    .
    .
    fprintf( mystdout, "%i:  Some output message\n", rank );
    .
    .
    .
    fclose( mystdout );
    
    However, do not turn in your programming assignment #1 using the above formatting of messages...leave all output printed to either stderr or stdout. The above is only something you should do for future assignments or for your own convenience while programming or debugging programming assignment #1.
  • Clarification on prog1: The string should only be passed once around the ring.

4/5/99:
  • It seems that "special note" on the bottom of the ssh page doesn't apply only for student having accounts names prefixed with cs160s. If your home directory also has group writeable permissions, then they need to be removed. To check if your home directory has group writeable permissions, execute
    ls -ld $HOME
    The output of this should look something like
    drwxr-x---  10 cs160szz cs160s      4096 Apr  5 18:53 /home/solaris/ieng9/cs160s/cs160szz
         ^
         |
         ----- if this bit is set to 'w' you have group writeable permissions
    
    To remove the group writeable permissions, execute
    chmod g-w $HOME
  • 160 students - Environment setup:If you chose not to use the prep command and followed my advice about setting the variables in your .cshrc file, please see this page again. Basically, having them in your .cshrc file doesn't do anything because they are overwritten by commands in your .login file. 4/7/99: This information has changed now because this only happens when you are logging in from a remote machine. See the newly posted message on 4/7/99.
  • Clarification on prog1: On part 3, every process should print out the total number of processes in the program.
  • Clarification on ssh setup: In my world, ssh is configured for your account if you can ssh to a machine without typing in your password. Basically, this means if you have never run ssh-keygen before, you do not have ssh configured for your account.
  • 160 students:There is a new Makefile available in the public directory. If you were getting error messages about binding.h, this will fix it.

4/2/99:
  • The book mentioned in lecture, Highly Parallel Computing by Almasi and Gottlieb, is now on reserves in the Geisel library.
  • 160 students:If you didn't have a chance to pick up your account slip, come see me during lab hours or class by the end of next week. Otherwise, I will assume you don't want them and will throw them away.
  • I will email the grades of your programming assignments to your accounts at ieng9.ucsd.edu (or cs.ucsd.edu for 260 students). If you prefer to have your grades emailed to a different account, let me know.
  • You can use the constant MPI_MAX_PROCESSOR_NAME when statically allocating space for the string to be passed into MPI_Get_processor_name.

3/31/99:
  • There is a typo in your book on pg. 405 (for whenever you get your book). The function definition for MPI_Recv should read as follows:
    int MPI_Recv( void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status ) 
  • For 160 students with logins prefixed by cs160s, there is a special note for you on the bottom of the Ssh page
  • 160 students: don't run your programs on ieng9...we don't want to overload the server.