Homewor5 Comments
April 20, 2014
Problem 1 (30 points)
/ Generate row comm & col comm , g e t row rank & c o l r a n k .
int c o l o r ;
c o l o r=rank / nproc row ;
MPI Comm split (MPI COMM WORLD, c o l o r , rank ,&row comm ) ;
c o l o r=rank0proc row ;
Homework1
March 3, 2014
Problem 1
The trivial implementation suggested in the question is as follows:
double local_sum[MAX_NUM_THREADS];
/Initialize local_sum[i]=0;
#pragma omp parallel for shared (h,a,n) private(x,tid)
for(i=1;i<n;i+)cfw_
tid=omp_get_thr
CS 525 Parallel Computing
Spring 2014
Homework 3
Given: Feb. 13, 2014; Due: Feb. 27, 2014 11:50 A.M.
(Before class begins)
I would like you to work on Homework problems on your own without help from other students. If you are stuck on a problem, please as
Homework2
March 3, 2014
Problem 1&2
A sample code is as below:
double* pageRank(int n, double *matrix, int* mindex, int *cindex)cfw_
double *vold;
double *vnew;
double *vtmp;
double tol=0.00001;
int stopflag=0;
int iter=0;
vold=(double*)malloc(n*sizeof(do
Homework4 Solution
March 24, 2014
Problem 1&2
Ping-Pong Test
int i;
MPI_Status status;
if (myid=0)cfw_
for(i=0;i<ROUNDS;i+)cfw_
MPI_Send(buf,size,MPI_DOUBLE,1,99,MPI_COMM_WORLD);
MPI_Recv(buf2,size,MPI_DOUBLE,1,MPI_ANY_TAG,MPI_COMM_WORLD, &status);
else
CS 525 Parallel Computing
Spring 2014
Homework 4
Given: Feb. 27, 2014; Due: March 13, 2014 11:50 A.M.
(Before class begins)
I would like you to work on Homework problems on your own without help from other students. If you are stuck on a problem, please a
Homewor5 Comments
April 28, 2014
Problem 1 (30 points)
int s o r t ( int data , int np , int rank , int nproc ) cfw_
int i ;
/ Quick /Merge S o r t L o c a l l y
l o c a l M e r g e S o r t ( data , np ) ;
/ S e l e c t&Bcast s p l i t t e r s
int s =( in
CS 525 Parallel Computing
Spring 2014
Homework 2
Given: Jan. 30, 2014; Due: Feb. 12, 2014 11:50 A.M.
(Before class begins)
I would like you to work on Homework problems on your own without help from other students. If you are stuck on a problem, please as
CS 525 Parallel Computing
Spring 2014
Homework 5
Given: March 29, 2014; Due: April 10, 2014 11:50 A.M.
(Before class begins)
I would like you to work on Homework problems on your own without help from other students. If you are stuck on a problem, please
Homework3 Comments
March 13, 2014
Problem 1
A sample code is as below:
double* cg(int n, double *value, int* colind, int* rbegin, double *b, int rank, int nproc)cfw_
int np=n/nproc;
int i,j,k,l;
int counter=0;
double *answer=NULL;
double *x=(double*)mallo
PA G E R A N K
David F. Gleich
February 19, 2013
There are quite a few ways of deriving the PageRank equation. Kleinberg and Tardos
describes what I call the two fixes approach. I prefer the random surfer derivation, which
is what Ill present in class.
Th
Notes on HW 5: Foxs Algorithm for Matrix Multiplication
March 28, 2014
Foxs Algorithm
Foxs algorithm computes the product of two matrices, C = A B.
Lets assume that the three matrices are square of order n. Assume that the number of processes
is P , and t
Parallel Coloring Algorithms
on Distributed-Memory Pla8orms
Assefaw Gebremedhin
CS525, Spring 2014
Feb 20, 2014
In Last Lecture:
Introduced graph coloring
Saw examples of applicaJons
Introduced compressed adjacency
Problem 1:
1 point for correct judgement. 1 point for the reason. Any reasonable explain would get the point.
(1) True. If this variable (loop index) would otherwise be shared, it is implicitly made private in the loop
construct. (From OpenMp specication)
Sorting Algorithms
Ananth Grama, Anshul Gupta, George Karypis, and Vipin Kumar
To accompany the text `Introduction to Parallel Computing',
Addison Wesley, 2003.
Topic Overview
Issues in Sorting on Parallel Computers
Sorting Networks
Bubble Sort and its
CS 525 Parallel Computing
Spring 2014
Homework 1
Given: Jan. 21, 2014; Due: Jan. 30, 2014 11:50 A.M.
(Before class begins)
I would like you to work on Homework problems on your own without help from other students. If you are stuck on a problem, please as
CS 525 Parallel Computing
Problem Set 7 Spring 2014
Given: April 29, 2014; NOT DUE!
This Problem Set covers mostly material that was taught since HW 6 was given, and it overlaps
a bit with material from HW6. Solving these problems will help you prepare fo
Parallel Coloring Algorithms
on Shared-Memory Pla6orms
Assefaw Gebremedhin
CS525, Spring 2014
Feb 18 2014
Graph coloring
A vertex coloring of a graph G=(V,E) is a mapping
f: V -> cfw_1, 2, ,