SlideShare a Scribd company logo
PARALLEL COMPUTING (SAMPLE ASSIGNMENT)
Our online Tutors are available 24*7 to provide Help with Help with Parallel Computing
Homework/Assignment or a long term Graduate/Undergraduate Help with Parallel
Computing Project. Our Tutors being experienced and proficient in Help with Parallel
Computing ensure to provide high quality Help with Parallel Computing Homework Help.
Upload your Help with Parallel Computing Assignment at ‘Submit Your Assignment’
button or email it to . You can use our ‘Live
Chat’ option to schedule an Online Tutoring session with our Help with Parallel
Computing Tutors.
Finite difference equation
This sample assignment Compares the speed of the parallel computing toolbox functions vs
CPU for finite difference
test_gpu_array3.m
% script to test the speed of finite difference calculations on gpu vs cpu
% Mark Ward, University of Birmingham, r.m.ward@bham.ac.uk
LoopVals=500*(1:2); % how many times we want to loop the calculations for timing
NVals=1000*(1:4); % what array edge sizes we want to try
myPerf=zeros(length(LoopVals)+1,length(NVals)+1); % somewhere to store a table of
performance numbers
myPerf(2:end,1)=LoopVals; % record the loop sizes
myPerf(1,2:end)=NVals; % and array sizes
%======================
iGPU=true % true to run on GPU, false for CPU
%======================
for iLoopVals=1:length(LoopVals)
for iNVals=1:length(NVals)
N=NVals(iNVals);
% set up arrays for the finite difference calculation
if iGPU,
clear g1 iicentre
pause(0.5)
g=gpuDevice(1);
reset(g);
pause(0.5)
g1=gpuArray.zeros(N,N); %,'single');
iicentre=2:N-1;
iicentre=gpuArray(iicentre); %(int32(iicentre)) isn't noticeably
info@assignmentpedia.com
faster on average
iiup=iicentre+1;
iidown=iicentre-1;
else
g1=zeros(N,N);
iicentre=2:N-1; % indices to point to the array away from the
edges
iiup=iicentre+1; % and the edges
iidown=iicentre-1;
end
ii=round(0.4*N):round(0.6*N);g1(ii,ii)=1; % make the array hotter in the
centre
iLoop=LoopVals(iLoopVals);
fprintf('About to run %g loops of %g^2 2D finite difference
calculationn',iLoop,N)
tic % start timing
for ii=1:iLoop, % simplified finite difference. Should also have
temperature-dependent material properties.
if iGPU % run gpu code using arrayfun as it's faster than
overloading the normal syntax
g1(iicentre,iicentre)=arrayfun(@heat_eqn_fdiff,g1(iicentre,iicentre), ...
g1(iiup,iicentre),g1(iidown,iicentre), ...
g1(iicentre,iiup),g1(iicentre,iidown));
else % cpu is quicker using matrix operations, not arrayfun
g1(iicentre,iicentre)= 0.2*g1(iicentre,iicentre)+0.2* ...
(g1(iiup,iicentre)+g1(iidown,iicentre)+g1(iicentre,iiup)+g1(iicentre,iidown));
end
end
if iGPU,
g_res=gather(g1); % bring the results back from the gpu
else
g_res=g1;
end
t=toc; % stop timing after gathering the results back to main memory
myPerf(iLoopVals+1,iNVals+1)=N^2*iLoop/t/1e6 % speed in millions of fd
operations per second
imagesc(g_res,[0 1]);axis image;drawnow;pause(0.1) % show the
"temperature" plot
end
end
clear g1
g=gpuDevice(1);
reset(g);
% GTX580, arrayfun, indices as gpu arrays, single precision
% myPerf =
% 0 1000 2000 3000 4000
% 500 606.6 1332.2 1331.2 1222.8
% 1000 1000.6 1358.1 1342.7 1228.7
% all double precision below here:
% GTX580, arrayfun, indices as gpu arrays
% myPerf =
% 0 1000 2000 3000 4000
% 500 775.89 829.07 783.14 685.37
% 1000 813.41 831.59 803.56 688.19
% GTX580, arrayfun, indices on the cpu
% myPerf =
% 0 1000 2000 3000 4000
% 500 707.77 731.84 716.49 623.03
% 1000 733.92 741.25 720.24 596.46
% GTX 580, normal matlab syntax operating on gpu arrays
% myPerf =
% 0 1000 2000 3000 4000
% 500 551.02 568.05 537.08 500.59
% 1000 564.13 571.14 538.36 502.32
%cpu i5-2500K @ 4.2 GHz
% myPerf =
% 0 1000 2000 3000 4000
% 500 37.401 38.362 0 0
% 1000 0 0 0 0
visit us at www.assignmentpedia.com or email us at info@assignmentpedia.com or call us at +1 520 8371215

More Related Content

Similar to Parallel computing homework help

Faster computation with matlab
Faster computation with matlabFaster computation with matlab
Faster computation with matlab
Muhammad Alli
 
Aosd2009 adams
Aosd2009 adamsAosd2009 adams
Aosd2009 adamsSAIL_QU
 
ICML2013読み会 Large-Scale Learning with Less RAM via Randomization
ICML2013読み会 Large-Scale Learning with Less RAM via RandomizationICML2013読み会 Large-Scale Learning with Less RAM via Randomization
ICML2013読み会 Large-Scale Learning with Less RAM via RandomizationHidekazu Oiwa
 
Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16
Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16
Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16
MLconf
 
NYAI - Scaling Machine Learning Applications by Braxton McKee
NYAI - Scaling Machine Learning Applications by Braxton McKeeNYAI - Scaling Machine Learning Applications by Braxton McKee
NYAI - Scaling Machine Learning Applications by Braxton McKee
Rizwan Habib
 
Distributed Radar Tracking Simulation Project
Distributed Radar Tracking Simulation ProjectDistributed Radar Tracking Simulation Project
Distributed Radar Tracking Simulation ProjectAssignmentpedia
 
Distributed Radar Tracking Simulation Project
Distributed Radar Tracking Simulation ProjectDistributed Radar Tracking Simulation Project
Distributed Radar Tracking Simulation ProjectAssignmentpedia
 
6. Implementation
6. Implementation6. Implementation
Process synchronization(deepa)
Process synchronization(deepa)Process synchronization(deepa)
Process synchronization(deepa)Nagarajan
 
Introduction to MPI
Introduction to MPIIntroduction to MPI
Introduction to MPI
yaman dua
 
Data Analytics and Simulation in Parallel with MATLAB*
Data Analytics and Simulation in Parallel with MATLAB*Data Analytics and Simulation in Parallel with MATLAB*
Data Analytics and Simulation in Parallel with MATLAB*
Intel® Software
 
MAtrix Multiplication Parallel.ppsx
MAtrix Multiplication Parallel.ppsxMAtrix Multiplication Parallel.ppsx
MAtrix Multiplication Parallel.ppsx
BharathiLakshmiAAssi
 
matrixmultiplicationparallel.ppsx
matrixmultiplicationparallel.ppsxmatrixmultiplicationparallel.ppsx
matrixmultiplicationparallel.ppsx
Bharathi Lakshmi Pon
 
Operating System
Operating SystemOperating System
Operating System
Subhasis Dash
 
Big Data Helsinki v 3 | "Distributed Machine and Deep Learning at Scale with ...
Big Data Helsinki v 3 | "Distributed Machine and Deep Learning at Scale with ...Big Data Helsinki v 3 | "Distributed Machine and Deep Learning at Scale with ...
Big Data Helsinki v 3 | "Distributed Machine and Deep Learning at Scale with ...
Dataconomy Media
 
GPU Parallel Computing of Support Vector Machines as applied to Intrusion Det...
GPU Parallel Computing of Support Vector Machines as applied to Intrusion Det...GPU Parallel Computing of Support Vector Machines as applied to Intrusion Det...
GPU Parallel Computing of Support Vector Machines as applied to Intrusion Det...
IJCSIS Research Publications
 
CH05.pdf
CH05.pdfCH05.pdf
CH05.pdf
ImranKhan880955
 
A peek on numerical programming in perl and python e christopher dyken 2005
A peek on numerical programming in perl and python  e christopher dyken  2005A peek on numerical programming in perl and python  e christopher dyken  2005
A peek on numerical programming in perl and python e christopher dyken 2005
Jules Krdenas
 

Similar to Parallel computing homework help (20)

Code Tuning
Code TuningCode Tuning
Code Tuning
 
genalg
genalggenalg
genalg
 
Faster computation with matlab
Faster computation with matlabFaster computation with matlab
Faster computation with matlab
 
Aosd2009 adams
Aosd2009 adamsAosd2009 adams
Aosd2009 adams
 
ICML2013読み会 Large-Scale Learning with Less RAM via Randomization
ICML2013読み会 Large-Scale Learning with Less RAM via RandomizationICML2013読み会 Large-Scale Learning with Less RAM via Randomization
ICML2013読み会 Large-Scale Learning with Less RAM via Randomization
 
Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16
Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16
Braxton McKee, CEO & Founder, Ufora at MLconf NYC - 4/15/16
 
NYAI - Scaling Machine Learning Applications by Braxton McKee
NYAI - Scaling Machine Learning Applications by Braxton McKeeNYAI - Scaling Machine Learning Applications by Braxton McKee
NYAI - Scaling Machine Learning Applications by Braxton McKee
 
Distributed Radar Tracking Simulation Project
Distributed Radar Tracking Simulation ProjectDistributed Radar Tracking Simulation Project
Distributed Radar Tracking Simulation Project
 
Distributed Radar Tracking Simulation Project
Distributed Radar Tracking Simulation ProjectDistributed Radar Tracking Simulation Project
Distributed Radar Tracking Simulation Project
 
6. Implementation
6. Implementation6. Implementation
6. Implementation
 
Process synchronization(deepa)
Process synchronization(deepa)Process synchronization(deepa)
Process synchronization(deepa)
 
Introduction to MPI
Introduction to MPIIntroduction to MPI
Introduction to MPI
 
Data Analytics and Simulation in Parallel with MATLAB*
Data Analytics and Simulation in Parallel with MATLAB*Data Analytics and Simulation in Parallel with MATLAB*
Data Analytics and Simulation in Parallel with MATLAB*
 
MAtrix Multiplication Parallel.ppsx
MAtrix Multiplication Parallel.ppsxMAtrix Multiplication Parallel.ppsx
MAtrix Multiplication Parallel.ppsx
 
matrixmultiplicationparallel.ppsx
matrixmultiplicationparallel.ppsxmatrixmultiplicationparallel.ppsx
matrixmultiplicationparallel.ppsx
 
Operating System
Operating SystemOperating System
Operating System
 
Big Data Helsinki v 3 | "Distributed Machine and Deep Learning at Scale with ...
Big Data Helsinki v 3 | "Distributed Machine and Deep Learning at Scale with ...Big Data Helsinki v 3 | "Distributed Machine and Deep Learning at Scale with ...
Big Data Helsinki v 3 | "Distributed Machine and Deep Learning at Scale with ...
 
GPU Parallel Computing of Support Vector Machines as applied to Intrusion Det...
GPU Parallel Computing of Support Vector Machines as applied to Intrusion Det...GPU Parallel Computing of Support Vector Machines as applied to Intrusion Det...
GPU Parallel Computing of Support Vector Machines as applied to Intrusion Det...
 
CH05.pdf
CH05.pdfCH05.pdf
CH05.pdf
 
A peek on numerical programming in perl and python e christopher dyken 2005
A peek on numerical programming in perl and python  e christopher dyken  2005A peek on numerical programming in perl and python  e christopher dyken  2005
A peek on numerical programming in perl and python e christopher dyken 2005
 

More from Assignmentpedia

Transmitter side components
Transmitter side componentsTransmitter side components
Transmitter side componentsAssignmentpedia
 
Single object range detection
Single object range detectionSingle object range detection
Single object range detectionAssignmentpedia
 
Sequential radar tracking
Sequential radar trackingSequential radar tracking
Sequential radar trackingAssignmentpedia
 
Radar cross section project
Radar cross section projectRadar cross section project
Radar cross section projectAssignmentpedia
 
Radar application project help
Radar application project helpRadar application project help
Radar application project helpAssignmentpedia
 
Network costing analysis
Network costing analysisNetwork costing analysis
Network costing analysisAssignmentpedia
 
Matlab simulation project
Matlab simulation projectMatlab simulation project
Matlab simulation projectAssignmentpedia
 
Matlab programming project
Matlab programming projectMatlab programming project
Matlab programming projectAssignmentpedia
 
Image processing project using matlab
Image processing project using matlabImage processing project using matlab
Image processing project using matlabAssignmentpedia
 
Help with root locus homework1
Help with root locus homework1Help with root locus homework1
Help with root locus homework1Assignmentpedia
 
Computer Networks Homework Help
Computer Networks Homework HelpComputer Networks Homework Help
Computer Networks Homework Help
Assignmentpedia
 
Theory of computation homework help
Theory of computation homework helpTheory of computation homework help
Theory of computation homework helpAssignmentpedia
 
Econometrics Homework Help
Econometrics Homework HelpEconometrics Homework Help
Econometrics Homework Help
Assignmentpedia
 
Help With Digital Communication Project
Help With  Digital Communication ProjectHelp With  Digital Communication Project
Help With Digital Communication ProjectAssignmentpedia
 

More from Assignmentpedia (20)

Transmitter side components
Transmitter side componentsTransmitter side components
Transmitter side components
 
Single object range detection
Single object range detectionSingle object range detection
Single object range detection
 
Sequential radar tracking
Sequential radar trackingSequential radar tracking
Sequential radar tracking
 
Resolution project
Resolution projectResolution project
Resolution project
 
Radar cross section project
Radar cross section projectRadar cross section project
Radar cross section project
 
Radar application project help
Radar application project helpRadar application project help
Radar application project help
 
Network costing analysis
Network costing analysisNetwork costing analysis
Network costing analysis
 
Matlab simulation project
Matlab simulation projectMatlab simulation project
Matlab simulation project
 
Matlab programming project
Matlab programming projectMatlab programming project
Matlab programming project
 
Links design
Links designLinks design
Links design
 
Image processing project using matlab
Image processing project using matlabImage processing project using matlab
Image processing project using matlab
 
Help with root locus homework1
Help with root locus homework1Help with root locus homework1
Help with root locus homework1
 
Transmitter subsystem
Transmitter subsystemTransmitter subsystem
Transmitter subsystem
 
Computer Networks Homework Help
Computer Networks Homework HelpComputer Networks Homework Help
Computer Networks Homework Help
 
Theory of computation homework help
Theory of computation homework helpTheory of computation homework help
Theory of computation homework help
 
Econometrics Homework Help
Econometrics Homework HelpEconometrics Homework Help
Econometrics Homework Help
 
Video Codec
Video CodecVideo Codec
Video Codec
 
Radar Spectral Analysis
Radar Spectral AnalysisRadar Spectral Analysis
Radar Spectral Analysis
 
Pi Controller
Pi ControllerPi Controller
Pi Controller
 
Help With Digital Communication Project
Help With  Digital Communication ProjectHelp With  Digital Communication Project
Help With Digital Communication Project
 

Recently uploaded

Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 

Recently uploaded (20)

Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 

Parallel computing homework help

  • 1. PARALLEL COMPUTING (SAMPLE ASSIGNMENT) Our online Tutors are available 24*7 to provide Help with Help with Parallel Computing Homework/Assignment or a long term Graduate/Undergraduate Help with Parallel Computing Project. Our Tutors being experienced and proficient in Help with Parallel Computing ensure to provide high quality Help with Parallel Computing Homework Help. Upload your Help with Parallel Computing Assignment at ‘Submit Your Assignment’ button or email it to . You can use our ‘Live Chat’ option to schedule an Online Tutoring session with our Help with Parallel Computing Tutors. Finite difference equation This sample assignment Compares the speed of the parallel computing toolbox functions vs CPU for finite difference test_gpu_array3.m % script to test the speed of finite difference calculations on gpu vs cpu % Mark Ward, University of Birmingham, r.m.ward@bham.ac.uk LoopVals=500*(1:2); % how many times we want to loop the calculations for timing NVals=1000*(1:4); % what array edge sizes we want to try myPerf=zeros(length(LoopVals)+1,length(NVals)+1); % somewhere to store a table of performance numbers myPerf(2:end,1)=LoopVals; % record the loop sizes myPerf(1,2:end)=NVals; % and array sizes %====================== iGPU=true % true to run on GPU, false for CPU %====================== for iLoopVals=1:length(LoopVals) for iNVals=1:length(NVals) N=NVals(iNVals); % set up arrays for the finite difference calculation if iGPU, clear g1 iicentre pause(0.5) g=gpuDevice(1); reset(g); pause(0.5) g1=gpuArray.zeros(N,N); %,'single'); iicentre=2:N-1; iicentre=gpuArray(iicentre); %(int32(iicentre)) isn't noticeably info@assignmentpedia.com
  • 2. faster on average iiup=iicentre+1; iidown=iicentre-1; else g1=zeros(N,N); iicentre=2:N-1; % indices to point to the array away from the edges iiup=iicentre+1; % and the edges iidown=iicentre-1; end ii=round(0.4*N):round(0.6*N);g1(ii,ii)=1; % make the array hotter in the centre iLoop=LoopVals(iLoopVals); fprintf('About to run %g loops of %g^2 2D finite difference calculationn',iLoop,N) tic % start timing for ii=1:iLoop, % simplified finite difference. Should also have temperature-dependent material properties. if iGPU % run gpu code using arrayfun as it's faster than overloading the normal syntax g1(iicentre,iicentre)=arrayfun(@heat_eqn_fdiff,g1(iicentre,iicentre), ... g1(iiup,iicentre),g1(iidown,iicentre), ... g1(iicentre,iiup),g1(iicentre,iidown)); else % cpu is quicker using matrix operations, not arrayfun g1(iicentre,iicentre)= 0.2*g1(iicentre,iicentre)+0.2* ... (g1(iiup,iicentre)+g1(iidown,iicentre)+g1(iicentre,iiup)+g1(iicentre,iidown)); end end if iGPU, g_res=gather(g1); % bring the results back from the gpu else g_res=g1; end t=toc; % stop timing after gathering the results back to main memory myPerf(iLoopVals+1,iNVals+1)=N^2*iLoop/t/1e6 % speed in millions of fd operations per second imagesc(g_res,[0 1]);axis image;drawnow;pause(0.1) % show the "temperature" plot end end
  • 3. clear g1 g=gpuDevice(1); reset(g); % GTX580, arrayfun, indices as gpu arrays, single precision % myPerf = % 0 1000 2000 3000 4000 % 500 606.6 1332.2 1331.2 1222.8 % 1000 1000.6 1358.1 1342.7 1228.7 % all double precision below here: % GTX580, arrayfun, indices as gpu arrays % myPerf = % 0 1000 2000 3000 4000 % 500 775.89 829.07 783.14 685.37 % 1000 813.41 831.59 803.56 688.19 % GTX580, arrayfun, indices on the cpu % myPerf = % 0 1000 2000 3000 4000 % 500 707.77 731.84 716.49 623.03 % 1000 733.92 741.25 720.24 596.46 % GTX 580, normal matlab syntax operating on gpu arrays % myPerf = % 0 1000 2000 3000 4000 % 500 551.02 568.05 537.08 500.59 % 1000 564.13 571.14 538.36 502.32 %cpu i5-2500K @ 4.2 GHz % myPerf = % 0 1000 2000 3000 4000 % 500 37.401 38.362 0 0 % 1000 0 0 0 0 visit us at www.assignmentpedia.com or email us at info@assignmentpedia.com or call us at +1 520 8371215