CISC 372 Introduction to Parallel Programming
Frequently Asked Questions

(Fall 2003)
General questions

Q1. What is the purpose of this page?

A1. This page is a list of the most frequently asked questions (hence the name FAQ) received by the instructor/TA for the assignments. Before sending us e-mail with a question regarding specification or implementation details of the assignment, you should check this FAQ page to see if the question has already been answered. If the question is not on the page, or if the explanation on the page is unclear, feel free to e-mail me with the question.
Questions on Lab Assignment 1

Question: I realized that I need to compile the program with the -lmpe -lX11 extensions but I am still getting errors when trying to compile the Mandelbrot program.

12:55:53pm [~/cis372/mandel/]# mpicc mandel.c -o mandel -lmpe -lX11 -lm -L/usr/local/X11R6/lib mandel.o(.text+0x12d): In function `main': : undefined reference to `Manager' mandel.o(.text+0x134): In function `main': : undefined reference to `Worker' collect2: ld returned 1 exit status 12:56:03pm [~/cis372/mandel/]#

Answer: You need to compile all of the .c files that make up mandelbrot, which are located in that directory.

Question: Everytime I try to run the ping pong code for the Double variable type, it performs the first 6 timings, then gives me an error message and the program just hangs.

Answer: Yes, you are most likely running out of memory for the larger data sizes for doubles. Just plot the sizes you can get with double, and explain in your report that no high sizes would run through.

Questions on Lab Assignment 2

Getting consistent timings for 16 processes: I just created a file called machines16 in pollock/372_f03/public which is a machine file that you can try for the 16 process timings. I just tried it several times as:

mpirun -np 16 -machinefile machines16 time2_hello

which is a hello world program with timing. I got consistent results. If you have real work to be done, you might have all processes other than 0 do the work, and let the process 0 which will be mapped to the single processor porsche just be a manager.

Question: On question 3, do we need to duplicate the tree in the pdf verbatim or may we come up with our own numbering scheme? Certainly, when we have 4 processes, we cannot have the same numbering scheme as in the example for levels 1 & 2 (root level 0).

Answer: The numbering for 4 processes would be the left subtree that you see there. The numbering for 2 processes is the left subtree of that subtree. So, you need to figure out what the pattern is for n processes where n is a power of two, so for these it works out to these numberings, and similarly for larger numbers of processes.

Note: I have another call into the staff and they are working on the annoying password problem, which this morning is now prompting for every process! I ran a program this morning with 16 processes and it prompted many annoying times!

For debugging: To get an accurate picture of where things are dying in your program, add a flush(stdout); after every printf. This will make sure all of your print's make it to the screen if execution indeed got that far. Some are seeing only a few print's when in fact their program made it alot farther down the code.

For timings: Just before the first wtime command, put an MPI_Barrier(MPI_COMM_WORLD); to make sure all processes are indeed started and running when you first take the timing.

Questions on Group Assignment 1

Questions on Midterm

Questions on Lab Assignment 3