I've been tagged by Jane for this end-of-the-year meme. I am pretty bad about doing things when people have tagged me (I have at least two outstanding tags that I haven't done), but the timing is right this time, so here goes.
1. Will you be looking for a new job?
Nope. Not unless something unexpected happens. I just got a new job, I like my new boss and colleagues, and they like me too.
2. Will you be looking for a new relationship?
I'm always open to making new friends, but I'm not looking for a new relationship per se. Something I'd like to do is to further cultivate the friendships I have developed with some of my female colleagues.
3. New house?
No, thankfully. It would take a lot for me to move again. And if we ever do move again, as frustrating as movers are, they are less frustrating than doing it yourself.
4. What will you do differently in 08?
Now that I've found this martial arts club at work, and Jeff and I have found another enjoyable exercise activity (I may blog about it at some point), I think I will be able to "move more" (as they call exercise in Weight Watchers) and keep my body in better shape.
5. New Years resolution?
I like Jane's/Profgrrl's idea of a new years theme. I think I'd like to have a theme of "happy and healthy," highlighting the need for me to move more and to continue to eat right and spend quality time with my husband and son.
6. What will you not be doing in 08?
There are a lot of things, such as smoking, that I have never done and will continue to not do in 2008.
7. Any trips planned?
Yes. March is busy: I'll be going to a conference, going to a planning meeting for SC08, and going to my sister Laura's dissertation defense celebration. There are two more planning meetings and the actual conference to go to. Jeff and I are planning a fun getaway for the two of us this summer, in celebration of our tenth wedding anniversary. There's the annual family reunion, although I don't know if we'll have the energy to go to that too.
8. Wedding plans?
Been there, done that. I wouldn't mind attending a wedding, though :)
9. Major thing on your calendar?
There are lots of looming deadlines and so forth, but I'd say the biggest thing, the project I've never done before, is this conference committee work.
10. What can’t you wait for?
I'm pretty excited about a lot of things. I'm looking forward to my sister's dissertation celebration. I can't wait for Vinny to walk (he may get around to it just before New Year's). I can't wait for him to really start talking.
11. What would you like to see happen differently?
I'd like the political world around me to stop going to hell. Eight years ago, we were a respected world superpower with a strong military, known for our commitment to human rights. Today, anti-American sentiment is at an all-time high, the dollar is at its weakest level in my lifetime, our beleaguered military is stretched thin, and we use torture on our enemies and egregiously violate the rights of even our own citizens. These developments are entirely our fault, and I hope that the next president (who will be elected next year, although not yet in office) will be able to turn things around for us.
12. What about yourself will you be changing?
I'm always working on becoming more confident and this year will be no exception.
13. What happened in 07 that you didn’t think would ever happen?
I got a "real job."
14. Will you be nicer to the people you care about?
There is always room for improvement in my behavior towards my loved ones, and I definitely will continue to do my best to be aware of their needs and be considerate towards them.
15. Will you dress differently this year than you did in 07?
I hope to shed the last 20 lbs of maternity weight and be able to get back into the clothes I wore in 2005, and maybe some new clothes too.
16. Will you start or quit drinking?
I don't drink alcoholic beverages, and I don't plan to start. I do, however, need to drink more water during the day :)
17. Will you better your relationship with your family?
There's always room for improvement in my existing family relationships, and in my non-existing family relationships, for that matter! But I don't anticipate that the status of any of these relationships will change.
18. Will you do charity work?
That's one thing I really haven't made time for in the past. As Vinny grows older, I hope that we will introduce him to charity work and cultivate compassion in him.
19. Will you go to bars?
No, probably not.
20. Will you be nice to people you don’t know?
Of course. Even evil atheists know the golden rule :)
21. Do you expect 08 to be a good year for you?
Yes. I think it will be a good year both personally and professionally.
22. How much did you change from this time last year till now?
I changed a lot. I lost a lot of weight, the pregnancy hormones wore off, I felt like I was once again on top of things at work, I had elbow surgery (a funnybone-ectomy, as one of my colleagues called it), I got a new job, and I watched my little baby grow (which, as Jane says, really does change your life).
23. Do you plan on having a child?
I don't anticipate having another child in 2008, but we might make an addition to the family in 2009.
24. Will you still be friends with the same people you are friends with now?
Yes, I think so.
25. Major lifestyle changes?
Not that I know of.
26. Will you be moving?
Not if I can help it!
27. What will you make sure doesn’t happen in 08 that happened in 07?
I didn't publish any papers or present at any conferences in 2007 (although others did, and included my name as an author). I'm already signed up for a conference in March, and my former boss is currently reviewing a paper that I've prepared about our work, which we will submit to a journal.
28. What are your New Years Eve plans?
My dad and bonus mom are going to be here. I think we will ring in the new year with sparkling juice, like we did last year.
29. Will you have someone to kiss at midnight?
Yup. Jeff will be there.
30. One wish for 08?
That common sense may prevail throughout the world.
Now I have to tag people. I'm with Jane, I hate tagging people. So I'm going to tag people who love me in real life and will forgive me if they're unhappy with being tagged. My sisters Rachel and Laura are obvious first targets, as are my favorite sister-in-law in the entire blogosphere, Ginger, and my better half, Jeff. And my cousin Susie, who won't be overtaxed or sleep-deprived until sometime in January ;)
Anyone else who wants to play, consider yourself tagged!
Saturday, December 29, 2007
Friday, December 28, 2007
Think Pink?
By some twist of fate, our beloved son has a significant number of sippy cups in hues generally associated with the female gender. He has three pink ones, and one lavender purple sippy.
The wavelength of the light reflected by the sippy cup doesn't bother him in the least. The liquid inside tastes just as good no matter what pigment is used to decorate the cup!
Sometimes I take him out in public with one of those cups. We get some looks, my camo-clad*, pink sippy-clutching lad and I. But I have to laugh, because one hundred years ago, pink was preferred for boys, because of its strong, masculine qualities. The author of the Bad Science blog quotes the fashion authorities of the time:
I felt a smile spread across my face when I read of someone else fighting against gender essentialism in a similar manner: Jeff from Feminist Allies carries a pink cell phone, and discusses the reactions his carrying of it elicits. I say, go Feminist Allies Jeff, go! It's a small thing but it makes people think about gender.
* Choices for 18-month-size boy's pants: forest camouflage (green), water camouflage (blue), desert camouflage (tan), khaki (usually cargo-style), jeans. My inner pacifist prefers the last two choices, however, I (not to mention my inner pacifist!) was not the one who purchased the majority of his clothes, and furthermore, there are more important things to worry about than the pattern on his pants. Plus, the contrast between the ultra-masculine camo and the ultra-feminine pink with purple accents sippy cup makes the act of being seen with both feel that much more subversive!
The wavelength of the light reflected by the sippy cup doesn't bother him in the least. The liquid inside tastes just as good no matter what pigment is used to decorate the cup!
Sometimes I take him out in public with one of those cups. We get some looks, my camo-clad*, pink sippy-clutching lad and I. But I have to laugh, because one hundred years ago, pink was preferred for boys, because of its strong, masculine qualities. The author of the Bad Science blog quotes the fashion authorities of the time:
“There has been a great diversity of opinion on the subject, but the generally accepted rule is pink for the boy and blue for the girl. The reason is that pink being a more decided and stronger color is more suitable for the boy, while blue, which is more delicate and dainty, is prettier for the girl.” (Ladies' Home Journal, 1918)and
“If you like the color note on the little one’s garments, use pink for the boy and blue for the girl, if you are a follower of convention.” (The Sunday Sentinel, 1914)Somehow these colors got reversed around the time of World War II.
I felt a smile spread across my face when I read of someone else fighting against gender essentialism in a similar manner: Jeff from Feminist Allies carries a pink cell phone, and discusses the reactions his carrying of it elicits. I say, go Feminist Allies Jeff, go! It's a small thing but it makes people think about gender.
* Choices for 18-month-size boy's pants: forest camouflage (green), water camouflage (blue), desert camouflage (tan), khaki (usually cargo-style), jeans. My inner pacifist prefers the last two choices, however, I (not to mention my inner pacifist!) was not the one who purchased the majority of his clothes, and furthermore, there are more important things to worry about than the pattern on his pants. Plus, the contrast between the ultra-masculine camo and the ultra-feminine pink with purple accents sippy cup makes the act of being seen with both feel that much more subversive!
Tuesday, December 25, 2007
Merry Christmas to All, and to All a Good Night!
Hopefully the little man in the red hat with the puckish grin brought you everything you wished for as you were sleeping last night. Best wishes to you and yours, and enjoy the day!
--Rebecca et al.
Monday, December 24, 2007
Holiday Fun for All (Including the Godless)
Some people may be wondering how I, an atheist, can possibly enjoy the holiday season. After all, the alleged reason for the season is the birth of the founder of a religion in which I do not believe.
The short answer to that question is that I'm not a misanthrope. The Christmas holidays herald time off work to spend with family, holiday parties, delicious seasonal foods, beautiful seasonal music, and gift-giving and receiving. Belief in Jesus or any kind of higher power is not required in order to enjoy these holiday treats. Like every human being, I experience love and enjoy spending time with others, I savor the sensation of delicious foods on my tastebuds and beautiful music vibrating in my ears, and I feel good when I am generous and when others are generous to me.
You might be surprised to learn that I like Christmas music. Actually, if you knew my taste in music, it would be no surprise. I listen to a lot of Early Music (Medieval and Renaissance), 90% of which is religious in nature. This does not bother me in the least, because I am listening to the melody (or the polyphony!), not the words. They could be singing complete nonsense syllables for all I care.
I enjoy singing Christmas carols. The singing of carols reminds me of fond memories of childhood, times when we as a family would gather together and sing. So what if I disagree with what the lyrics are saying? I disagree with the lyrics of plenty of secular songs too: for example, I prefer red doors over black ones, but that doesn't stop me from enjoying the Rolling Stones' song Paint It Black.
In summary, I, along with plenty of other atheists, enjoy the holiday season. It doesn't make us hypocritical; we don't believe in any gods but we do believe in loving our fellow human beings and having a good time.
The short answer to that question is that I'm not a misanthrope. The Christmas holidays herald time off work to spend with family, holiday parties, delicious seasonal foods, beautiful seasonal music, and gift-giving and receiving. Belief in Jesus or any kind of higher power is not required in order to enjoy these holiday treats. Like every human being, I experience love and enjoy spending time with others, I savor the sensation of delicious foods on my tastebuds and beautiful music vibrating in my ears, and I feel good when I am generous and when others are generous to me.
You might be surprised to learn that I like Christmas music. Actually, if you knew my taste in music, it would be no surprise. I listen to a lot of Early Music (Medieval and Renaissance), 90% of which is religious in nature. This does not bother me in the least, because I am listening to the melody (or the polyphony!), not the words. They could be singing complete nonsense syllables for all I care.
I enjoy singing Christmas carols. The singing of carols reminds me of fond memories of childhood, times when we as a family would gather together and sing. So what if I disagree with what the lyrics are saying? I disagree with the lyrics of plenty of secular songs too: for example, I prefer red doors over black ones, but that doesn't stop me from enjoying the Rolling Stones' song Paint It Black.
In summary, I, along with plenty of other atheists, enjoy the holiday season. It doesn't make us hypocritical; we don't believe in any gods but we do believe in loving our fellow human beings and having a good time.
Happy Holidays!
I hope you are all having fantastic holidays. We are enjoying the time together as a family. On Saturday, Adam and Jody came over for the afternoon and evening, and we had a wonderful time together. Today, we had a turkey breast with potatoes, homemade rolls, and some gingerbread cake with lemon sauce for dessert. I'm planning to make some cinnamon rolls for Christmas morning, and we're going to use the leftover turkey to make some turkey tetrazzini for dinner.
Happy holidays to you all!
Happy holidays to you all!
Friday, December 21, 2007
Supercomputing Course: Example Performance Evaluation
I bet you thought I'd never post the final installments of the supercomputing course. It's been how long? Too long! Well, I didn't forget, I just had to wait until I had the right software to make just the right graph. Enjoy!
If you examine the graph you made in the performance evaluation, you may be unpleasantly surprised by your program's performance. Alternatively, you may be quite pleased with your program's performance, but your boss or your dissertation committee want to know how you got such good results. It may be unclear as to what exactly is going on. In order to clarify things, you will want to perform a least-squares fit of your data (performance timings) to an equation that models the performance of your code.
There are three main categories into which everything that your program does will fit: communication, computation, and idle/serial. These categories are mostly self-explanatory. When you are sending and receiving data, that falls into the communication category; when you are crunching numbers, that falls into the computation category; and when one processor is doing an inherently serial operation, or when a processor is waiting for others to finish, then these actions are in the idle/serial category. We can classify each major piece of the algorithm into one of the three categories, and use this information to develop an equation that models the performance of our parallel program.
Suppose we had written a program that finds the numerical integral of a program using Monte Carlo quadrature. The idea of Monte Carlo quadrature is that we can approximate the area under a curve (in 1-D) or the volume under a surface (in 2-D) or the hypervolume under a hypersurface (in n-D) as a function of the average value of the function sampled over the problem domain. In math notation, that's ∫V f(x) dV = V/P ∑i=1P f(xi). The accuracy of the integral is proportional to 1/√P, where P is the number of times we evaluate the function. In order to understand this example, all you really need to know is that we want to compute P different values of the function f(x), and at the end we're going to do something with them.
What follows this paragraph is some C-like pseudocode for this Monte Carlo quadrature program. When I write a program, I generally write out on a piece of paper* a basic algorithm in a code style that is similar to C but that may not be syntactically correct and that may have some commands missing (because I can't remember the exact syntax, or because I don't feel like writing them out). Notes in red are notes to the reader that I would not normally put in my pseudocode. (I also wouldn't put so many comments in my own pseudocode since I mostly know what I'm talking about already.) I recommend writing pseudocode before tackling anything but the simplest of programs.
#include <mpi.h>
#include <stdio.h>
int main(int argc, char **argv) {
// declaration of variables
int me, np;
long P; /* number of function evaluations */
double my_result;
MPI_Status status;
// initialization and environmental inquiry
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &me);
MPI_Comm_size(MPI_COMM_WORLD, &np);
if (me == 0) {
// manager process
// receive input from user as to accuracy we want
double tol;
// tol = input (this is not proper C syntax but I will find the right syntax later)
P = (long) 1./(tol*tol); (the (long) coerces the type, forcing it to go from type double to type long)
long Psend = P/np; // everybody does one npth of the work
for (int i = 1; i < np; i++) {
// send Psend to all worker processors
MPI_Send(&Psend, 1, MPI_LONG, i, me, MPI_COMM_WORLD);
}
// now, do my own Monte Carlo
my_result = monte_carlo(Psend);
double final_result = my_result/np;
for (int i = 1; i < np; i++) {
// receive results from worker processors
double tmp_result;
MPI_Recv(&tmp_result, 1, MPI_DOUBLE, i, i, MPI_COMM_WORLD, &status);
final_result += tmp_result;
}
printf("final result of quadrature, for tol=%g, integral=%g", tol, final_result);
} else {
// worker process
MPI_Recv(&P, 1, MPI_LONG, 0, 0, MPI_COMM_WORLD, &status);
my_result = monte_carlo(P);
my_result /= np;
MPI_Send(&my_result, 1, MPI_DOUBLE, me, me, MPI_COMM_WORLD);
}
return 0;
}
double monte_carlo(long P) {
double answer = 0;
for (long i = 0; i < P; i++) {
// evaluate function at pseudorandom point
// add it divided by P to answer (avoid overflow)
}
return answer;
}
Let's examine this code for the different classes of operations. We could make a table detailing what basic operations occur, which processor performs them, and how many of them take place.
The total walltime is the sum of the time spent computing, communicating, and in serial activities. So we could work out a formula that would approximate the performance of the algorithm. Let's start with the computation.
TNcomputation = TNmonte-carlo + TNsum.
We can break this down further, because the time it takes to do the Monte Carlo part of the computation is proportional to the total number of Monte Carlo points (P = 1/tol2) and inversely proportional to the number of processors (N). The amount of time required to perform the sum is insignificant, so we can treat it as a constant. So we have
TNcomputation = P/N tmonte-carlo + tsum
= 1/(N tol2) tmonte-carlo + tsum,
where tmonte-carlo is the amount of time for a single Monte Carlo point to be computed.
As for the communication, we do N sends and then N receives. They are all done sequentially, and it is reasonable to assume that they each take the same amount of time, so
TNcommunication = 2N tcommunication.
The cost of communication is equal to the startup cost plus the bandwidth cost. But since we are dealing with such small messages (a single long or double) we can neglect the bandwith cost, so tcommunication = tstartup.
Finally, the third category takes all remaining operations into consideration.
TNserial = Tinit/finalize + Tserial.
There's actually no way to distinguish between the tasks in this category in terms of time, since they do not vary with N. So our final equation looks like this:
TN = TNcomputation + TNcommunication + TNnon-parallel
= 1/(N tol2) tmonte-carlo + tsum + 2N tstartup + tserial.
We would want to do a strong scaling study to provide some data to which we can fit this equation. We would run the program on different numbers of processors (most conveniently, powers of two), running it at least three times and taking the average run time for each N. Suppose we got the following timings** from our strong scaling study, for tol = 10-4:
We could make a log-log plot of the results, and see that the algorithm scales pretty well. (You can see this without making a plot by looking at the numbers, and observing that 30.0 is close to one half of 58.6, 15.2 is close to one half of 30.0, etc.) We are not too far off from ideal. The big difference appears to be at the tail end, where the walltime doesn't halve when the processor count is doubled. Let's see how well we can fit these timings to our formula. We have to solve the non-negative least-squares problem
I solved it using Matlab's lsqnonneg function (non-negative least squares), and obtained
We can graph all these results and see how the algorithm performed and how well our function fits the results. The figure shows a log-log plot of number of processors versus walltime. The solid blue line with the blue dots shows the actual performance data. The dashed red line shows our least-squares fit, and the turquoise dotted line shows ideal scaling.
As the number of processors grows, the computation time is not quite halved. We would expect this because the amount of communication is proportional to the number of processors, so doubling the number of processors doubles the amount of communication required. So as the number of processors grows, the amount of work per processor shrinks and the amount of communication per processor grows, and time spent in communication begins to dominate the wall time.
*pre-arm trouble. Nowadays I either minimally sketch it on a piece of paper, or I type pseudocode into a Word document on my laptop and print it out before coding the real thing on my desktop Linux box.
** These numbers were pulled from my posterior. Yes, I totally made them up. Trust me, gubmint auditors, I did not waste valuable computing resources on a blog entry!
Next topic: More on scalability
If you examine the graph you made in the performance evaluation, you may be unpleasantly surprised by your program's performance. Alternatively, you may be quite pleased with your program's performance, but your boss or your dissertation committee want to know how you got such good results. It may be unclear as to what exactly is going on. In order to clarify things, you will want to perform a least-squares fit of your data (performance timings) to an equation that models the performance of your code.
There are three main categories into which everything that your program does will fit: communication, computation, and idle/serial. These categories are mostly self-explanatory. When you are sending and receiving data, that falls into the communication category; when you are crunching numbers, that falls into the computation category; and when one processor is doing an inherently serial operation, or when a processor is waiting for others to finish, then these actions are in the idle/serial category. We can classify each major piece of the algorithm into one of the three categories, and use this information to develop an equation that models the performance of our parallel program.
Suppose we had written a program that finds the numerical integral of a program using Monte Carlo quadrature. The idea of Monte Carlo quadrature is that we can approximate the area under a curve (in 1-D) or the volume under a surface (in 2-D) or the hypervolume under a hypersurface (in n-D) as a function of the average value of the function sampled over the problem domain. In math notation, that's ∫V f(x) dV = V/P ∑i=1P f(xi). The accuracy of the integral is proportional to 1/√P, where P is the number of times we evaluate the function. In order to understand this example, all you really need to know is that we want to compute P different values of the function f(x), and at the end we're going to do something with them.
What follows this paragraph is some C-like pseudocode for this Monte Carlo quadrature program. When I write a program, I generally write out on a piece of paper* a basic algorithm in a code style that is similar to C but that may not be syntactically correct and that may have some commands missing (because I can't remember the exact syntax, or because I don't feel like writing them out). Notes in red are notes to the reader that I would not normally put in my pseudocode. (I also wouldn't put so many comments in my own pseudocode since I mostly know what I'm talking about already.) I recommend writing pseudocode before tackling anything but the simplest of programs.
#include <mpi.h>
#include <stdio.h>
int main(int argc, char **argv) {
// declaration of variables
int me, np;
long P; /* number of function evaluations */
double my_result;
MPI_Status status;
// initialization and environmental inquiry
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &me);
MPI_Comm_size(MPI_COMM_WORLD, &np);
if (me == 0) {
// manager process
// receive input from user as to accuracy we want
double tol;
// tol = input (this is not proper C syntax but I will find the right syntax later)
P = (long) 1./(tol*tol); (the (long) coerces the type, forcing it to go from type double to type long)
long Psend = P/np; // everybody does one npth of the work
for (int i = 1; i < np; i++) {
// send Psend to all worker processors
MPI_Send(&Psend, 1, MPI_LONG, i, me, MPI_COMM_WORLD);
}
// now, do my own Monte Carlo
my_result = monte_carlo(Psend);
double final_result = my_result/np;
for (int i = 1; i < np; i++) {
// receive results from worker processors
double tmp_result;
MPI_Recv(&tmp_result, 1, MPI_DOUBLE, i, i, MPI_COMM_WORLD, &status);
final_result += tmp_result;
}
printf("final result of quadrature, for tol=%g, integral=%g", tol, final_result);
} else {
// worker process
MPI_Recv(&P, 1, MPI_LONG, 0, 0, MPI_COMM_WORLD, &status);
my_result = monte_carlo(P);
my_result /= np;
MPI_Send(&my_result, 1, MPI_DOUBLE, me, me, MPI_COMM_WORLD);
}
return 0;
}
double monte_carlo(long P) {
double answer = 0;
for (long i = 0; i < P; i++) {
// evaluate function at pseudorandom point
// add it divided by P to answer (avoid overflow)
}
return answer;
}
Let's examine this code for the different classes of operations. We could make a table detailing what basic operations occur, which processor performs them, and how many of them take place.
Compu- tation | Communi- cation | Initialization/ Serial/Idle | Which Processor? (how many times) |
---|---|---|---|
MPI_Init, MPI_Comm_rank, MPI_Comm_size | All (1) | ||
Receive input, compute how much work each processor does | Manager (1) | ||
MPI_Send | Manager (N) | ||
MPI_Recv | Workers (1 each) | ||
monte_carlo | All (1) | ||
MPI_Send | Workers (1 each) | ||
MPI_Recv | Manager (N) | ||
Compute integral (sum results from all processors) | Manager (1) | ||
MPI_Finalize | All (1) |
The total walltime is the sum of the time spent computing, communicating, and in serial activities. So we could work out a formula that would approximate the performance of the algorithm. Let's start with the computation.
TNcomputation = TNmonte-carlo + TNsum.
We can break this down further, because the time it takes to do the Monte Carlo part of the computation is proportional to the total number of Monte Carlo points (P = 1/tol2) and inversely proportional to the number of processors (N). The amount of time required to perform the sum is insignificant, so we can treat it as a constant. So we have
TNcomputation = P/N tmonte-carlo + tsum
= 1/(N tol2) tmonte-carlo + tsum,
where tmonte-carlo is the amount of time for a single Monte Carlo point to be computed.
As for the communication, we do N sends and then N receives. They are all done sequentially, and it is reasonable to assume that they each take the same amount of time, so
TNcommunication = 2N tcommunication.
The cost of communication is equal to the startup cost plus the bandwidth cost. But since we are dealing with such small messages (a single long or double) we can neglect the bandwith cost, so tcommunication = tstartup.
Finally, the third category takes all remaining operations into consideration.
TNserial = Tinit/finalize + Tserial.
There's actually no way to distinguish between the tasks in this category in terms of time, since they do not vary with N. So our final equation looks like this:
TN = TNcomputation + TNcommunication + TNnon-parallel
= 1/(N tol2) tmonte-carlo + tsum + 2N tstartup + tserial.
We would want to do a strong scaling study to provide some data to which we can fit this equation. We would run the program on different numbers of processors (most conveniently, powers of two), running it at least three times and taking the average run time for each N. Suppose we got the following timings** from our strong scaling study, for tol = 10-4:
N | Average Wall Time (s) |
---|---|
4 | 30.0 |
16 | 15.2 |
32 | 7.7 |
64 | 3.9 |
128 | 2.1 |
We could make a log-log plot of the results, and see that the algorithm scales pretty well. (You can see this without making a plot by looking at the numbers, and observing that 30.0 is close to one half of 58.6, 15.2 is close to one half of 30.0, etc.) We are not too far off from ideal. The big difference appears to be at the tail end, where the walltime doesn't halve when the processor count is doubled. Let's see how well we can fit these timings to our formula. We have to solve the non-negative least-squares problem
I solved it using Matlab's lsqnonneg function (non-negative least squares), and obtained
We can graph all these results and see how the algorithm performed and how well our function fits the results. The figure shows a log-log plot of number of processors versus walltime. The solid blue line with the blue dots shows the actual performance data. The dashed red line shows our least-squares fit, and the turquoise dotted line shows ideal scaling.
As the number of processors grows, the computation time is not quite halved. We would expect this because the amount of communication is proportional to the number of processors, so doubling the number of processors doubles the amount of communication required. So as the number of processors grows, the amount of work per processor shrinks and the amount of communication per processor grows, and time spent in communication begins to dominate the wall time.
*pre-arm trouble. Nowadays I either minimally sketch it on a piece of paper, or I type pseudocode into a Word document on my laptop and print it out before coding the real thing on my desktop Linux box.
** These numbers were pulled from my posterior. Yes, I totally made them up. Trust me, gubmint auditors, I did not waste valuable computing resources on a blog entry!
Next topic: More on scalability
Just What I've Been Missing
The thing I miss the most about Illinois is my karate class.* As a child, I'd always harbored a secret desire to study the martial arts, and I was able to fulfill my dream by taking shito-ryu karate through the park district. I was a very slow learner, but I was determined, and by the end of my three-year tenure, not only did I have a brown belt, but I was teaching children's karate and even giving belt tests. Not bad for a person who used to trip over her own shadow!
One of the most disappointing things about moving down here was that I really couldn't find a replacement for that class. Nobody taught anything that resembled shito-ryu, so if I took a class I would essentially have to start over completely. But then, life got in the way (baby, elbow surgery) and I gave up my quest for the perfect martial arts class.
On Monday, I looked in my workplace's weekly newsletter, and saw that there was going to be a women's self-defense class offered by the Other Division Martial Arts Club (where Other Division is the name of another division in the lab). Why had I never heard of this club in the 2+ years I've been here? And, I saw that the instructor for said self-defense class was a man with many martial arts credentials, including a 4th-degree black belt in shito-ryu karate! I thought I was going to die of excitement!
So I emailed the instructor for the class, introduced myself and my martial arts background, and inquired about the martial arts club (in particular, was it open to people outside that division?). He replied that it was open to everyone at the lab and he invited me to come to one of their classes, which was held at noon yesterday, where he was to be teaching muay thai.
So I went. I don't think I've had that much fun in a long time! It's not that blocking, punching, and kicking are a barrel of monkeys, exactly; it's just that moving my body in predefined sets of offensive and defensive moves is something that has been missing in my life for over two years. As the endorphins rushed through my body, I felt a certain bliss that I had nearly forgotten existed.
They meet on other days and at other times, and some of the other members teach different martial arts at those times, including kung fu and some flavor of karate. So I definitely plan to go back again, and sample some of those other classes, and maybe pick two that are my favorites and go with them.
* A close second is missing my aunt and uncle and their kids, but this is lessened by the fact that we have Vinny's godparents in town, who may as well be family.
One of the most disappointing things about moving down here was that I really couldn't find a replacement for that class. Nobody taught anything that resembled shito-ryu, so if I took a class I would essentially have to start over completely. But then, life got in the way (baby, elbow surgery) and I gave up my quest for the perfect martial arts class.
On Monday, I looked in my workplace's weekly newsletter, and saw that there was going to be a women's self-defense class offered by the Other Division Martial Arts Club (where Other Division is the name of another division in the lab). Why had I never heard of this club in the 2+ years I've been here? And, I saw that the instructor for said self-defense class was a man with many martial arts credentials, including a 4th-degree black belt in shito-ryu karate! I thought I was going to die of excitement!
So I emailed the instructor for the class, introduced myself and my martial arts background, and inquired about the martial arts club (in particular, was it open to people outside that division?). He replied that it was open to everyone at the lab and he invited me to come to one of their classes, which was held at noon yesterday, where he was to be teaching muay thai.
So I went. I don't think I've had that much fun in a long time! It's not that blocking, punching, and kicking are a barrel of monkeys, exactly; it's just that moving my body in predefined sets of offensive and defensive moves is something that has been missing in my life for over two years. As the endorphins rushed through my body, I felt a certain bliss that I had nearly forgotten existed.
They meet on other days and at other times, and some of the other members teach different martial arts at those times, including kung fu and some flavor of karate. So I definitely plan to go back again, and sample some of those other classes, and maybe pick two that are my favorites and go with them.
* A close second is missing my aunt and uncle and their kids, but this is lessened by the fact that we have Vinny's godparents in town, who may as well be family.
Thursday, December 20, 2007
Fun with Granny and Granddad
This past weekend, Jeff's parents came down for a whirlwind visit. They were bringing Christmas presents for their favorite baby grandson (and a few for his parents, too!). They arrived late Friday night, and returned home on Sunday, so really we had only one full day with them.
Jeff and I cooked them a delicious breakfast that morning (I had to get those pancakes in there somehow). There were various activities throughout the day. We had them open their Christmas presents from us. They were thrilled by the fleece blanket with a picture of Vinny on it (for Granny) and the tie with one-inch pictures of Vinny on it (for Granddad). Jeff and his dad went to pick out a Christmas tree for us. They brought home a very nice Frasier fir. Meanwhile, Vinny and his Granny played a lot together. Granny also fed Vinny his lunch.
That evening, we went out to dinner at a restaurant by the river. The view was great, the food was delicious, and the company was fantastic. It was a good ending to a great day.
When Granny and Granddad left the next day, Vinny was distraught. He cried for about ten minutes because he was so sad that they had left. This is a new development for him. He cries when Jeff or I leave the room, but he's never cried for anyone other than us. But I can definitely understand why he did, because his grandparents are just crazy about him and showed him a lot of attention while they were here.
Jeff and I cooked them a delicious breakfast that morning (I had to get those pancakes in there somehow). There were various activities throughout the day. We had them open their Christmas presents from us. They were thrilled by the fleece blanket with a picture of Vinny on it (for Granny) and the tie with one-inch pictures of Vinny on it (for Granddad). Jeff and his dad went to pick out a Christmas tree for us. They brought home a very nice Frasier fir. Meanwhile, Vinny and his Granny played a lot together. Granny also fed Vinny his lunch.
That evening, we went out to dinner at a restaurant by the river. The view was great, the food was delicious, and the company was fantastic. It was a good ending to a great day.
When Granny and Granddad left the next day, Vinny was distraught. He cried for about ten minutes because he was so sad that they had left. This is a new development for him. He cries when Jeff or I leave the room, but he's never cried for anyone other than us. But I can definitely understand why he did, because his grandparents are just crazy about him and showed him a lot of attention while they were here.
Thursday, December 13, 2007
Wikimania
This week I decided, since my workload was a bit less demanding, that it would be a good time to get a little more organized. I got the idea from reading some messages from some other women scientists that maybe a wiki would be a good thing to try using.
I realized through the discussions that it would make a good centralized repository for all my bright ideas. Back in the days before arm trouble, I used to have a three-ring binder in which I placed all the papers I had scrawled my brilliant plans on. Usually I would take paper from the recycle bin that had printing only on one side, punch holes in it, and write on the blank side. I organized everything chronologically, making sure to put the date on every page. I still have several notebooks full of my notes from graduate school.
When I was a postdoc, I used Word documents rather than handwritten pages. This saved my hand from the torture that was writing, but otherwise it was a system a lot like the one I had in graduate school. Instead of a three-ring binder with pages in chronological order, I had a directory in which I stored my musings. I still have those documents, which I transferred to my new laptop when I changed jobs.
Both of these methods were useful at the time, but a wiki has distinct advantages over them both. First, it is more searchable than the binders or Word documents. It has a built-in search feature, so I don't have to remember when I did the work or what I entitled the document in order to find it. Second, it's inter-linkable, so I can link pages together and organize them in multiple ways. There are different types of wiki pages that you can create: one of them is an index page, so all you have to do is have a link to the index page in every page that you want to show up on that page. So for example, I have a Software Tips page, that has links to all the pages on software. So I have a page on PETSc, and a page on TotalView, for example, and each of those is automagically indexed by this Software Tips page.
I'm using the Desktop Wiki version of MoinMoin, and so far I'm pretty happy with it. I set it up so that when I log in, MoinMoin automatically starts and launches a browser window with my wiki in it. I had fun learning about creating Mac applications, and getting everything all set up on my machine.
I realized through the discussions that it would make a good centralized repository for all my bright ideas. Back in the days before arm trouble, I used to have a three-ring binder in which I placed all the papers I had scrawled my brilliant plans on. Usually I would take paper from the recycle bin that had printing only on one side, punch holes in it, and write on the blank side. I organized everything chronologically, making sure to put the date on every page. I still have several notebooks full of my notes from graduate school.
When I was a postdoc, I used Word documents rather than handwritten pages. This saved my hand from the torture that was writing, but otherwise it was a system a lot like the one I had in graduate school. Instead of a three-ring binder with pages in chronological order, I had a directory in which I stored my musings. I still have those documents, which I transferred to my new laptop when I changed jobs.
Both of these methods were useful at the time, but a wiki has distinct advantages over them both. First, it is more searchable than the binders or Word documents. It has a built-in search feature, so I don't have to remember when I did the work or what I entitled the document in order to find it. Second, it's inter-linkable, so I can link pages together and organize them in multiple ways. There are different types of wiki pages that you can create: one of them is an index page, so all you have to do is have a link to the index page in every page that you want to show up on that page. So for example, I have a Software Tips page, that has links to all the pages on software. So I have a page on PETSc, and a page on TotalView, for example, and each of those is automagically indexed by this Software Tips page.
I'm using the Desktop Wiki version of MoinMoin, and so far I'm pretty happy with it. I set it up so that when I log in, MoinMoin automatically starts and launches a browser window with my wiki in it. I had fun learning about creating Mac applications, and getting everything all set up on my machine.
Sunday, December 09, 2007
More on Names
I've had a lot of good comments on my post on naming. Here are some more thoughts.
It seems like a given that Lenna should be retired, but "promiscuous" and "master-slave" are both descriptive, so why should we given them up? I'm going to focus on "master-slave" for the sake of simplicity; a similar argument against promiscuous exists.
First, there is an equally-descriptive, oppression-neutral term that can be used: "manager-worker." Sure, managers sometimes oppress their workers, but theoretically speaking, workers can go find other jobs. And in cases like factory workers in third world countries who work for pennies and owe their employers for the privilege of working there, that's actually slave labor being relabeled as free labor. Slavery still exists in this world, there is no getting around that fact.
Second, the problem is not that using the "master-slave" terminology causes conscious bias; the problem is that it elicits subconscious bias. I'm not saying that anyone hears the term "master-slave" and starts spouting racial epithets! I'm saying that just as god-thoughts and civic-minded thoughts have a positive influence upon social behavior, thoughts of injustice negatively influence social behavior. According to the study referenced in the link above, the subjects of the experiment didn't even have to believe in god for the god-thoughts to have a positive influence upon their generosity. Likewise, you don't have to believe in the inferiority of other races for "master-slave" to have an adverse impact on your social behavior.
It seems like a given that Lenna should be retired, but "promiscuous" and "master-slave" are both descriptive, so why should we given them up? I'm going to focus on "master-slave" for the sake of simplicity; a similar argument against promiscuous exists.
First, there is an equally-descriptive, oppression-neutral term that can be used: "manager-worker." Sure, managers sometimes oppress their workers, but theoretically speaking, workers can go find other jobs. And in cases like factory workers in third world countries who work for pennies and owe their employers for the privilege of working there, that's actually slave labor being relabeled as free labor. Slavery still exists in this world, there is no getting around that fact.
Second, the problem is not that using the "master-slave" terminology causes conscious bias; the problem is that it elicits subconscious bias. I'm not saying that anyone hears the term "master-slave" and starts spouting racial epithets! I'm saying that just as god-thoughts and civic-minded thoughts have a positive influence upon social behavior, thoughts of injustice negatively influence social behavior. According to the study referenced in the link above, the subjects of the experiment didn't even have to believe in god for the god-thoughts to have a positive influence upon their generosity. Likewise, you don't have to believe in the inferiority of other races for "master-slave" to have an adverse impact on your social behavior.
Saturday, December 08, 2007
Exercise and Moving More
My sister Rachel has a post up about exercise. She says that exercise doesn't actually make you feel better; what it does is keep you from feeling bad.
You can tell that Rachel and I are sisters. We both hate exercise, but we enjoy certain activities despite the fact that they involve exercise. Rachel enjoys dancing. I loved karate because it was so much fun (and incidentally, I got exercise). I hate to sweat, but I would do it for karate because I enjoyed it so much.
I haven't found a suitable form of exercise since I moved to Tennessee. Part of that is the fact that I have much less free time. And part of it is my $%&*# elbow. But most of it is just plain inertia.
I was thinking of taking up belly dancing, or tai chi, or kung fu, but that would involve taking the initiative and finding a class, and then signing up for it, and then going to it. And I feel bad enough about all the time I spend away from my family because of my job, and I would hate to take even more time away from them just to do something like that. So I have plenty of good excuses not to exercise.
Our Weight Watchers leader encourages us to just move more. I do the small things, like parking farther from the store entrance and taking the stairs. Every day I climb a huge hill to get into my car for the drive home. Also, there's a circuit I take whenever I get up to use the restroom or to talk to my boss or the secretary, so anytime I get up I walk a tenth of a mile. It's not much, but it's better than nothing.
I realize that this low level of exercise is not helping with my weight loss. Last time I was in Weight Watchers, I was getting an average of six hours of exercise a week, because twice a week, I taught children's karate and took the adult class, and then I also walked to school at least once a week. I really need to figure out a way to move more.
You can tell that Rachel and I are sisters. We both hate exercise, but we enjoy certain activities despite the fact that they involve exercise. Rachel enjoys dancing. I loved karate because it was so much fun (and incidentally, I got exercise). I hate to sweat, but I would do it for karate because I enjoyed it so much.
I haven't found a suitable form of exercise since I moved to Tennessee. Part of that is the fact that I have much less free time. And part of it is my $%&*# elbow. But most of it is just plain inertia.
I was thinking of taking up belly dancing, or tai chi, or kung fu, but that would involve taking the initiative and finding a class, and then signing up for it, and then going to it. And I feel bad enough about all the time I spend away from my family because of my job, and I would hate to take even more time away from them just to do something like that. So I have plenty of good excuses not to exercise.
Our Weight Watchers leader encourages us to just move more. I do the small things, like parking farther from the store entrance and taking the stairs. Every day I climb a huge hill to get into my car for the drive home. Also, there's a circuit I take whenever I get up to use the restroom or to talk to my boss or the secretary, so anytime I get up I walk a tenth of a mile. It's not much, but it's better than nothing.
I realize that this low level of exercise is not helping with my weight loss. Last time I was in Weight Watchers, I was getting an average of six hours of exercise a week, because twice a week, I taught children's karate and took the adult class, and then I also walked to school at least once a week. I really need to figure out a way to move more.
Thursday, December 06, 2007
What's in a Name?
What's in a name? that which we call a rose
By any other name would smell as sweet;
So Romeo would, were he not Romeo call'd,
Retain that dear perfection which he owes
Without that title....
-- Juliet, in Romeo and Juliet, Act II Scene 2
I work in a heavily male-dominated field. Few people are crazy enough to get a Ph.D. in computer science, and a minority of those who are that crazy are women. The applied math area has more women than other computer science fields, but that's not saying a lot.
Because of the male-dominated nature of the field, there are overlooked areas of bias. For example, Lenna, the picture that everyone in the image processing field uses to test their image processing algorithms, is from Playboy. Sure, it's just a cropped piece of the full-page spread and we don't get to see anything work-unsafe, but just the same, this seminal picture originated in a magazine that reinforces the objectification and commoditization of women.
There are plenty of other "politically-incorrect" standards in computer science, too. A process that accepts messages from any other process is known as promiscuous. An algorithm that involves one process assigning work to other processes is known as a master-slave algorithm (although thankfully, master-slave is being replaced by manager-worker).
Why should I care about the picture of Lenna? I'm not being objectified. Why should I care about so-called promiscuous processes? After all, I don't sleep around. And why would I (a white woman) or even anyone who's African-American give two hoots about calling an algorithm a master-slave algorithm? After all, none of us are in bonds.
The reason is because Juliet was wrong. Names do matter. If there were a machine that could perform an objective measurement of sweetness of scent, then sure, a rose would always have the same number of sweetness units, no matter if we called it a rose or a skunk.
But it's not machines that are determining the sweetness! It's people, and if they have preconceived notions about the object they are about to smell, they won't measure the sweetness the same way.
For example, if I come up to you with two paper bags and I say, "smell this rose" and begin moving one of the bags towards your face, you will react very differently than if I say, "smell this dirty diaper" and move the other bag towards your face. Even if both bags really contain roses, you will probably turn your head and try to avoid smelling the one labeled "dirty diaper." And if both bags actually contain dirty diapers, you will be unpleasantly surprised when taking a whiff if it was the bag that I had claimed held a rose.
Similarly, our preconceived notions about others will impact the way in which we view them. We are all marinated in the brine of modern-day society, so even if we don't hold the prevailing beliefs about women and minorities, we are aware of them, and they can distract us from thinking about others or even ourselves in an objective way.
So even if we do not believe that women are sex objects, Lenna reminds us that they are. And even if we believe that having multiple sex partners has the same moral value whether it's done by men or women, the term promiscuous, which is applied overwhelmingly to women, reminds us of that double standard. And even if we believe in the value of all people regardless of their skin color, master-slave terminology reminds us of the fact that some people in this country were once forced to work against their wills and were considered inferior, based on their skin color.
I wish that Juliet's youthful idealism could prevail. I used to think that she was right, but I have seen too much evidence to the contrary. I can only hope that as our society advances, all people will be viewed as human, independent of their gender, color, ancestry, religion, class, etc.
Saturday, December 01, 2007
All about Vinny
I realized that I haven't written much about Vinny lately. This is not because he hasn't done anything interesting; it has more to do with my lack of spare time. Anyhow, the purpose of this entry is to remedy that oversight.
Vinny is growing bigger and taller every day. I was away from him for a week when I was at the supercomputing conference, and when I came home I hardly recognized him because he had changed so much in just that short time! He isn't walking yet, but I think it is just a matter of time. He can go from sitting to standing without holding on to anything, and he can stand unassisted for a while, but he's kind of like Wyle E. Coyote in that once he realizes that he's standing, he falls.
He hates to wear socks or shoes or anything on his feet. Footed sleepers work only because he can't pull the feet off. So we have invested in several of those for the "cold" "winter" nights. (The nights aren't that cold, but it can get chilly if you're an active sleeper like he is, and don't have any blankets over your body.)
He has the sweetest, most generous heart I've ever seen in a thirteen-month-old. He recently realized that when he bites me, it hurts me. Ever since then, he has stuck my finger in his mouth, but he has only nibbled on it, rather than clamping down really hard like he used to. Also, he's been very generous with his food and drink for several months now. He'll feed himself a cheerio then offer one to me. He drinks some milk from his sippy cup and then offers it to me. And he is so overjoyed when you accept his generosity. A smile grows across his face and he claps his hands.
The exception to this generosity is when there's an apple involved. He has a lot of teeth (13!) so I let him eat some pieces of raw apple (peel removed) one day almost a month ago when I was making baked apples. He really enjoyed it, and ate every single piece I offered him. Then, last weekend, I was eating an apple while he was sitting on my lap, and he was really interested in it. So at first I pulled off some chunks and fed them to him, but that was not enough for him. I let him bite some apple off the core for himself, and he loved that. I ate the entire outside of the apple, but he ate most of the (edible) interior.
Today, I got an apple from the bowl of fruit and he looked at me with excitement. He was very impatient as I washed it off, and he immediately wanted to bite into it himself. But I told him that I had to eat the peel layer, but he could eat from the interior. We sat down together and he immediately grabbed my wrist with both his little hands, the wrist of the hand that was holding the apple. He tried to pull it towards himself, and I had to move my head forward to sneak in a bite before he brought the apple to his own mouth. I turned it around to a part where he could eat, and let him take a bite. Periodically, when his mouth was sufficiently full, he would loosen his grip on my wrist and deign to allow me a bite of the apple. But when he wanted more, he pulled it right back. So he may be generous with his milk, his cereal, and his crackers, but not with apples!
Not only is he a generous baby (with the exception of apples) but he is incredibly happy, too. The only time he is cranky is when he gets really tired or if he is in pain. He is going through some separation anxiety and will cry when either of his parents leave the room, even if the other one is still there, but he gets over it quickly. But otherwise, he is almost always as happy as can be. I took him shopping at Kmart today, and there were so many interesting things to see, and so many people to watch, that he couldn't have been happier!
He brings a lot of joy to everyone's lives, and mine is no exception. I was kind of nervous about the idea of having a baby, but I'm so glad that we did!
Vinny is growing bigger and taller every day. I was away from him for a week when I was at the supercomputing conference, and when I came home I hardly recognized him because he had changed so much in just that short time! He isn't walking yet, but I think it is just a matter of time. He can go from sitting to standing without holding on to anything, and he can stand unassisted for a while, but he's kind of like Wyle E. Coyote in that once he realizes that he's standing, he falls.
He hates to wear socks or shoes or anything on his feet. Footed sleepers work only because he can't pull the feet off. So we have invested in several of those for the "cold" "winter" nights. (The nights aren't that cold, but it can get chilly if you're an active sleeper like he is, and don't have any blankets over your body.)
He has the sweetest, most generous heart I've ever seen in a thirteen-month-old. He recently realized that when he bites me, it hurts me. Ever since then, he has stuck my finger in his mouth, but he has only nibbled on it, rather than clamping down really hard like he used to. Also, he's been very generous with his food and drink for several months now. He'll feed himself a cheerio then offer one to me. He drinks some milk from his sippy cup and then offers it to me. And he is so overjoyed when you accept his generosity. A smile grows across his face and he claps his hands.
The exception to this generosity is when there's an apple involved. He has a lot of teeth (13!) so I let him eat some pieces of raw apple (peel removed) one day almost a month ago when I was making baked apples. He really enjoyed it, and ate every single piece I offered him. Then, last weekend, I was eating an apple while he was sitting on my lap, and he was really interested in it. So at first I pulled off some chunks and fed them to him, but that was not enough for him. I let him bite some apple off the core for himself, and he loved that. I ate the entire outside of the apple, but he ate most of the (edible) interior.
Today, I got an apple from the bowl of fruit and he looked at me with excitement. He was very impatient as I washed it off, and he immediately wanted to bite into it himself. But I told him that I had to eat the peel layer, but he could eat from the interior. We sat down together and he immediately grabbed my wrist with both his little hands, the wrist of the hand that was holding the apple. He tried to pull it towards himself, and I had to move my head forward to sneak in a bite before he brought the apple to his own mouth. I turned it around to a part where he could eat, and let him take a bite. Periodically, when his mouth was sufficiently full, he would loosen his grip on my wrist and deign to allow me a bite of the apple. But when he wanted more, he pulled it right back. So he may be generous with his milk, his cereal, and his crackers, but not with apples!
Not only is he a generous baby (with the exception of apples) but he is incredibly happy, too. The only time he is cranky is when he gets really tired or if he is in pain. He is going through some separation anxiety and will cry when either of his parents leave the room, even if the other one is still there, but he gets over it quickly. But otherwise, he is almost always as happy as can be. I took him shopping at Kmart today, and there were so many interesting things to see, and so many people to watch, that he couldn't have been happier!
He brings a lot of joy to everyone's lives, and mine is no exception. I was kind of nervous about the idea of having a baby, but I'm so glad that we did!
Subscribe to:
Posts (Atom)