This message is a test of the mailing list for my cs3366 class. If you are not in this class, please let me know and I will remove you from the list. (If you are in the class, there's no need to reply.)
I talked to Dr. Pitts, and *he* thought he already had scheduled the course to meet in a reasonable-size room, namely HAS 228. Somehow in the process of transferring the schedule from his whiteboard to the registrar's database or whatever, someone must have goofed!
Anyway, we'll start meeting in HAS 228 Tuesday.
A detailed description is now available on the Web; see http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/assignments.html (also linked from the main page at http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/info.html).
I recommend that you start this assignment early; if you have not previously written and run MPI programs, you may run into difficulties learning to use the compiler, etc., and these will be easier and less stressful to resolve if you allow time for doing so.
I said in the writeup for homework 1 that you could write your MPI programs in C, Fortran, or C++. If you choose C (or Fortran), good documentation on how to call the MPI functions is not hard to find -- in the textbook, via the "mpiman" command, etc. If you choose C++, good documentation seems to be a lot more difficult to find -- so far I'm not finding anything really good online (so if you can suggest where to look, please do!). In the meantime, if you want to use C++, see the simple sample programs linked from http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/samplepgms.html; they should be enough to get you started.
If you have had problems getting the directory for the MPI commands added to your search path, and you are using csh ("echo $SHELL" responds "/bin/csh"), look again at the instructions in http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/tips-mpi.html. The previous instructions did not work with our local setup; the ones I've just posted should (but let me know if you encounter problems). Note that to make any of these search-path changes take effect, you must log out and log in again.
FYI: I've revised/simplified the class Web site, home page at http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/index.html. In particular, there's now an "announcements" page that records/archives all the messages I send to the class mailing list (except trivial ones).
A preliminary description of the next homework is available; see http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/assignments.html. Additional details and/or instructions will be provided next week, but this should be enough to get you started. More detailed instructions and/or hints may be provided next week, depending on student demand. I will also consider allowing students to work in groups of two on this assignment if there is sufficient interest.
A final description of the next homework is available; see http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/assignments.html. (Not much has changed since the previously-posted "preliminary" version -- I added an explanation of the optional command-line arguments to the writeup and added "START OF SECTION TO CHANGE" comments to the starter program code.)
For any of you who are printing out the PDF or PostScript versions of homework assignments rather than browsing the HTML versions online: The HTML versions contain hyperlinks to source code, example programs, etc.; the PDF and PostScript versions don't. This was a source of confusion to a student in another course, so I have updated the PDF and PostScript versions to indicate where the hyperlinks are and where they point.
By popular demand, the first cs3366 exam has been postponed until *next* Thursday (the 22nd). Also, the due date for homework #2 has been extended to this Thursday (the 15th).
A review sheet for Thursday's exam and sample solutions for the homeworks are available linked from the assignments page at http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/assignments.html.
Just an FYI: I graded homework 1 yesterday and sent out grades and comments by e-mail. If you think you turned something in but didn't get a grade, let me know as soon as you can and we'll try to figure out what went wrong.
A description of the next homework is available at last; see http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/assignments.html.
This homework is due the Thursday after spring break, March 22.
Note that for this assignment you are allowed to work in pairs (or, of course, individually). This is an extension of the usual rule that you may discuss the assignment with others but must program individually; for this assignment, you can also do the actual programming together with a partner.
I just mailed out grades for homework 2; if you think you turned something in but didn't get a grade by e-mail today (mailed to your trinity.edu address), then something has gone wrong somewhere, and you should let me know right away so we can figure out what to do.
A couple of y'all have asked about this, or been tripped up by it, so let me remind/tell everyone ....:
The first two parameter of MPI_Recv() specify a buffer and a length. You might think that the length gets filled in when you do the receive, which would be very useful if you don't know exactly how big the message is going to be, but in fact that's not how things work. You need to set the length, before calling MPI_Recv(), to the maximum length of the message to receive (usually the size of the buffer). This works as a sort of safety check -- if you specify a maximum length of 100, for example, and the actual message is bigger, MPI will only copy 100 elements into your program's buffer, avoiding possible overruns.
So what do you do if you don't know how big the message is going to be? Well, when you call MPI_Send(), you specify the actual length (which may or may not be the same as the size of the sender's buffer). And then on the receiving side -- that's (part of) what that "status" variable is for. MPI puts the message's actual length, plus its tag and sender, in this "status" object. You can get the actual length of the message like this (in a C++ program; the C syntax is a little different), assuming the message contains integers:
int msglength = status.Get_count(MPI::INTEGER);(You'd replace MPI::INTEGER with something else if you were sending doubles or characters or whatever.)
Hope this helps.
In class last week I reminded those present that one of the requirements for this course (mentioned in the syllabus) is completion of a project, which more or less replaces the final exam. We talked a little in class about project topics and requirements, and I said I would post details to the Web soon. I've now done so; see the assignments page at http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/assignments.html (look for "Guidelines and Requirements for Projects").
Please read the requirements carefully, including the descriptions of what is due and when. Notice that all topics must be approved by the instructor, and part of your project grade is based on submitting an approved topic by April 10. (This is to encourage you not to put off the whole thing until the last minute. Otherwise that's all too easy to do!)
We agreed in class today to move the date of the next exam to April 19. I hope this is not a problem for anyone who was not in class (let me know if so).
Also, I've added to the sample programs page (at http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/SamplePrograms/) the examples I've been doing in class of programs using threads.
(A reply to a student's question, cc'd to everyone.)
>> I was wondering how I would be able to use the program that shows >> the status of the processors on a particular machine.
Is this the "xcpustate" I've been using in class? If so (and I think I'll Cc this to your classmates, some of whom also might be interested), here's what you do:
If you're at the console of machine YouAreHere and want to show the status of its processors, just type the command "xcpustate &" in a terminal window (the "&" starts the command in the background, so it doesn't tie up your terminal window).
If you're at the console of machine YouAreHere and want to show the status of the processors on machine OtherMachine, and you were going to remotely log into OtherMachine anyway (e.g., to run a program), do this:
(1) On machine YouAreHere, type the command "xhost +OtherMachine".
(2) Remotely log into OtherMachine (using rlogin/ssh/telnet/etc.).
(3) On OtherMachine, first set environment variable DISPLAY. If you're using bash (you'll know this if the command "echo $SHELL" responds with "/bin/bash"), type the command:
export DISPLAY=YouAreHere:0.0If you're using csh (you'll know this if the command "echo $SHELL" responds with "/bin/csh"), type the command:
setenv DISPLAY YouAreHere:0.0
(4) On OtherMachine, start xcpustate by typing "xcpustate &".
If you just want to run xcpustate on OtherMachine, do step (1) above and then:
(2a) In a terminal window on YouAreHere, type one of the following commands. If you're using bash:
rsh OtherMachine "(export DISPLAY=YouAreHere:0.0; /usr/X11R6/bin/xcpustate)" &If you're using csh (and I'm not positive about this one, because I'm too lazy to make the changes needed to test it, but I think it should work):
rsh OtherMachine "(setenv DISPLAY YouAreHere:0.0; /usr/X11R6/bin/xcpustate)" &
You should be able to use the short forms of the various machine names (xena01, dwarf1, etc.); if that doesn't work, try their long forms (xena01.cs.trinity.edu, dwarf1.cs.trinity.edu, etc.). Let me know how this works.
A description of the next homework is available at last; see http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/assignments.html.
This homework is due a week from next Tuesday, April 22. (This is a later deadline than I mentioned in class.)
Note that for this assignment I'm asking you to work individually, so that everyone gets some exposure to multi-threaded programming.
Those present in class today also agreed to the following schedule changes:
(*) Project proposals are due (via e-mail) today, April 12, by midnight. (They were originally due April 10, so this is an extension. If you miss the deadline, you should still turn something in, but I'll feel free to deduct points.) See the writeup about projects, also linked from the assignments page at http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/assignments.html, for details of what I mean by "project proposal".
(*) Slightly more detailed project plans are due next Thursday, April 19. Again see the writeup about projects for details.
(*) The second and last exam will take place in class April 26. If this time is impossible for you, please let me know in advance.
I've just posted to the sample programs page (URL below) new versions of several of the multithreaded C++ programs, plus (finally) the bounded-buffer example from class a while back. I've also posted Java versions of several of the examples, plus a "ThreadsTimer" class, for comparison purposes and/or for the benefit of anyone who wants to do homework 4 in Java.
You can find this sample programs page at http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/SamplePrograms/index.html. I've also added some links for Java to the "useful links" page at http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/links.html. (Of course you should be able to track down any of these pages starting at my home page, http://www.cs.trinity.edu/~bmassing/).
For those of you who were in class today: Please do read the paper I handed out copies of; I've added it to the class reading list in http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/assignments.html.
For those of you who were not in class: You can download a copy from from the above Web page, or I have several extra copies in my office.
A short review sheet for Thursday's exam is available linked from the assignments page at http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/assignments.html
Basically, the format of the exam will be the same as Exam 1 (open book, open notes), and the questions will focus on material covered since Exam 1 (so, chapters 5 through 8).
I just mailed out grades for homework 3; if you think you turned something in but didn't get a grade by e-mail today (mailed to your trinity.edu address), then something has gone wrong somewhere, and you should let me know as soon as possible so we can figure out what to do.
I've mailed you all grades for homework 4 and your projects. If there are questions and/or complaints, let me know right away; I will probably have already turned in a grade for you (I need to meet the deadline for graduating seniors), but we can do a grade change if necessary.
For anyone who's curious, there are sample solutions for all the homework assignment linked from the assignments page at http://www.cs.trinity.edu/~bmassing/Classes/CS3366_2001spring/HTML/assignments.html.
Stay tuned for more mail giving final averages and letter grades ....