Thinking Parallel

A Blog on Parallel Programming and Concurrency by Michael Suess

Homework

Red LightI always like it, when my readers contact me directly. Thats why I have put up a whole page for that reason alone: to make it easy for you to get in touch with me, to share your thoughts and to tell me what you liked or where I have screwed up. Therefore, it was a happy day for me when one of my readers (I care about privacy, therefore let’s just call him/her Hans) wrote me this nice request:

hellow michael
i have a c++ program about matrix, which has to be written in openmp.
is there any time for you to write that.
thank you

When my readers inquire so nicely (thanks again, Hans!) and even send me a more detailed description of the assignment in a second mail before I even get the chance to answer, I have no choice but to obey. So here it is, the one and only (TM) true solution (patent pending) to this extraordinarily well written and precise specification:

#include
#include

int main (int argc, char* argv[])
{
#pragma omp parallel
{
#pragma omp critical
{
std::cout << "Matrix!" << std::endl; } } } [/cpp] Figuring out how to compile and run it is left as an exercise for the reader (I always wanted to say that :lol:). Or in other words: Hans, I am sorry to disappoint you, but I don’t have the time to do your homework, course-work or work. If you really do want me to develop software for you, I may be available for contract work, but only if you have a serious business proposition to make (homework does not count, even if you offer to pay me for it)!

I normally do try to treat my readers with utmost respect, but chose to make an exception here. He-whose-name-cannot-be-disclosed-and-is-therefore-called-Hans, when you read through this blog you will find many clues that I am working at a university myself (the strongest one on my About-page, where I explicitly mention it in the second paragraph!). I am teaching students regularly. Did you actually think I would help you to cheat??

Still, I offer you my apologies for answering you in this unconventional way. I hope it at least helped to get my message across.

One Response to Homework »»


Comments

  1. Comment by Chris | 2006/11/27 at 19:05:24

    Meh, at least this student didn’t hit on you. That was always my favourite when teaching.


Leave a Reply

HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>