0% found this document useful (0 votes)
20 views2 pages

Parallel Computing I Homework 1: Getting Started: Task 1 (2 Points)

This document outlines the tasks for the first homework assignment in a parallel computing course. It includes 3 tasks: 1) Analyze four factors that influence a program's runtime and rate their influence. 2) Modify an existing C program to automatically vary input sizes and plot the results to describe how runtime is affected. 3) Measure message passing latency by varying message sizes between processes on one and two nodes, and evaluate the results.

Uploaded by

linchi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

Parallel Computing I Homework 1: Getting Started: Task 1 (2 Points)

This document outlines the tasks for the first homework assignment in a parallel computing course. It includes 3 tasks: 1) Analyze four factors that influence a program's runtime and rate their influence. 2) Modify an existing C program to automatically vary input sizes and plot the results to describe how runtime is affected. 3) Measure message passing latency by varying message sizes between processes on one and two nodes, and evaluate the results.

Uploaded by

linchi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Parallel Computing I

Homework 1: Getting started


Thorsten Grahs, Andres Rodriguez
23. April 2015
This will be your first homework in the exercise parallel computing. Send your solution to
[email protected] until April 30th 23:55. Prepare a pdf file for
your written text and attach the source code of your program to the mail.
You have to hand in your homework in groups of 2 students. Groups has to be formed
before the first exercise and cant be changed

Task 1 (2 Points)
Think about four factors influencing the run time of a program. Rate their influence (e.g. high,
normal, low) and reason your decision.

Task 2 (5 Points)
Download the c-program task2.c and open it with a text editor. Try to understand the function
of the program. You can compile the program with a c-compiler, for example gcc. You can use
the jobfile jobtask2.pbs to submit the compiled code to the cluster.
In this task you are going to extend the code and measure the time needed for calculation
the sum for different sizes n and s.
Initialize the array x with random numbers.
Modify the code so it automatically varies
n (e.g. 1000, 10.000... 10.000.000)
and s (1, 2, 4... 10)
Plot the results in a graph and describe them

Task 3 (5 Points)
Download the c-program task3.c and open it with a text editor. The program sends a message
from one process to another and back. The time needed is called round-trip latency.
In this task you are going to measure the time needed for messages of different size size.
Vary the size of the message and plot the time needed for transferring a message from
one process to another.
To submit the code to the cluster you can use the jobfile jobtask3.pbs
Currently we are requesting one node and two processors per node. Change the jobfile in
order to request two nodes and one processor per node. Now repeat your measurements.
Evaluate the result.

Task 3 (8 Points)
Consider the exaples from pthread-programming in the lecture and in the exercise. Study the
pthread tutorial in following the additional reading links.
Program a matrix-matrix multiplication with pthreads
Explain in words, what your program is doing!

You might also like