Grid Computing Assignment 1 Discrete Fourier Transform ...
Grid Computing Assignment 1 Discrete Fourier Transform ...
Grid Computing Assignment 1 Discrete Fourier Transform ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
sinarg = sin(k * arg);<br />
x2[i2] += (x1[k] * cosarg y1[k] * sinarg);<br />
y2[i2] += (x1[k] * sinarg + y1[k] * cosarg);<br />
}<br />
}<br />
// Copy the data back<br />
for( i = 0; i < blockSize; i++ )<br />
{<br />
x1[i] = x2[i];<br />
y1[i] = y2[i];<br />
}<br />
free(x2);<br />
free(y2);<br />
return(1);<br />
}<br />
where blockSize and offset fields are decided by Total Tasks and Current Task No<br />
parameters and is given by:<br />
blockSize = samples / TotalTasks;<br />
offset = CurrentTask * blockSize;<br />
Execution Procedure<br />
The following shows various files required for parallelization of DFT computation of a 1024<br />
sample data file using 4 grid nodes<br />
1. data.txt : Input data file<br />
2. param0.data : Parameter file for task 0<br />
3. param1.data : Parameter file for task 1<br />
4. param2.data : Parameter file for task 2<br />
5. param3.data : Parameter file for task 3<br />
6. metafile.txt : Configuration file which specifies the arguments to each subtask.<br />
Content of the file ‘param0.dat’<br />
4 (No of Tasks)<br />
0 (current task no)<br />
1024 (total samples)<br />
Content of the file ‘param1.dat’<br />
4 (No of Tasks)<br />
1 (current task no)<br />
1024 (total samples)