From b111adba1f9a34448333c85c55b94dae70d5bc8e Mon Sep 17 00:00:00 2001
From: "W. Trevor King"
Follow the course -notes. +notes.
Your MPI code should do exactly what the serial code does.
diff --git a/assignments/archive/logistic_cuda/index.shtml.itex2MML b/assignments/archive/logistic_cuda/index.shtml.itex2MML index 03951bb..80445bf 100644 --- a/assignments/archive/logistic_cuda/index.shtml.itex2MML +++ b/assignments/archive/logistic_cuda/index.shtml.itex2MML @@ -6,7 +6,8 @@Learn the CUDA language.
-Note: Please identify all your work. + +Note: Please identify all your work.
@@ -69,7 +70,7 @@ that generates a bifurcation diagram for the logistic map. The logistic map is a map of real line to itself given by\[ - x_{i+1} = a â x2_i. + x_{i+1} = a - x_i^2. \]
This mapping is ubiquitous in many problems of practical interest @@ -84,21 +85,21 @@ values of $a$. A plot of the asymptotic values of $x$ verses $a$ is called a bifurcation diagram.
The reason for this terminology is as follows. The asymptotic -behavior often varies smoothly with $a$. For example, for some $a$ -$x_0$ may tend to some fixed point $x^â$ with the value of $x^â$ -varying smoothly with $a$. However, for another $a$ $x_0$ could end up -in a period two orbit, oscillating between two values $x_1^â$ and -$x_2^â$. The values of these two points may also vary smoothly with -$a$, but there is some transition value $\tilde{a}$ where we jump from -the fixed point to the period two orbit. This non-smooth process is -called a bifurcation. The bifurcation diagram then shows all -of these bifurcations on a single plot since we scan over all values -of $a$.
+behavior often varies smoothly with $a$. For for some $a$, $x_0$ may +tend to some fixed point $x^{(1)}$ with the value of $x^{(1)}$ varying +smoothly with $a$. For another $a$, $x_0$ could end up in a period two +orbit, oscillating between two values $x_1^{(2)}$ and $x_2^{(2)}$. The +values of these two points may also vary smoothly with $a$, but there +is some transition value $\tilde{a}$ where we jump from the fixed +point to the period two orbit. This non-smooth process is called a +bifurcation. The bifurcation diagram then shows all of these +bifurcations on a single plot since we scan over all values of +$a$.The serial code loops over a and iterates a random initial
condition THRESH
number of times. This is to let
transients âdie outâ and approach the asymptotic behavior. If an
-iterate leaves the interval $[â2, 2]$ during this time it will
+iterate leaves the interval $[-2, 2]$ during this time it will
eventually escape to $\infty$, so the trajectory is thrown out and
another random initial condition is tried. It is known that positive
measure attracting sets exist for the $a$ values in the program so
@@ -112,7 +113,7 @@ in. This repeats until xRES
number of initial conditions
have been iterated and binned. The bins are then normalized to a
maximum value of one and are then output to the screen. The values in
the bins are essentially the density of iterates around various points
-and plotting them shows the bifurcation structure of the map.
+and plotting them shows the bifurcation structure of the map.
gcc -o logistic logistic.c -lm -./logistic > log.dat +./logistic > log.dat gnuplot -persist log.p@@ -165,12 +166,12 @@ or (Lebesgue almost) every initial condition may excape to $\infty$.
Modify the CUDA program using an extra dimension of block/threads -to assign initial condtions distributed throughout the interval $[â2, +to assign initial condtions distributed throughout the interval $[-2, 2]$ amongst these threads. Have the various threads bin the bounded trajectories together. Solutions that escape the interval should not be binned.
-Test this code on the map $x_{i+1} = aâ(aâx_i^2)^2$ and compare +
Test this code on the map $x_{i+1} = a-(a-x_i^2)^2$ and compare against the original code. Are the results different? Note, this example is the second iterate of the logistic map, so period two orbits of the original become distinct period one orbits of the second diff --git a/assignments/archive/monte_carlo_integration/index.shtml b/assignments/archive/monte_carlo_integration/index.shtml index e0ef591..50d574a 100644 --- a/assignments/archive/monte_carlo_integration/index.shtml +++ b/assignments/archive/monte_carlo_integration/index.shtml @@ -1,7 +1,7 @@
Due Friday, October 30, 2009 +
Due Friday, October 30, 2009
Due Friday, October 16, 2009
+Due Friday, October 16, 2009
gettimeofday()
because it allows timing to
µ-seconds. The gettimeofday
call is described by
-#include@@ -74,7 +74,7 @@ at)?+#include <time.h> int gettimeofday(struct timeval *tv, struct timezone *tz);
Write a parallel version of the bubble sort code. Use an algorithm
that leaves the task of ordering the sub-lists to processes 1
-to size-1
(size
being the number of
+to
size-1
(size
being the number of
processes), using process 0 to merge back the ordered sub-lists into
an ordered large one and performing a check (sum of members) on the
sort.