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 (20)

Comparison of Parallel Algorithms For An Image Processing Problem on Cuda
Comparison of Parallel Algorithms For An Image Processing Problem on CudaComparison of Parallel Algorithms For An Image Processing Problem on Cuda
Comparison of Parallel Algorithms For An Image Processing Problem on Cuda
Seval Çapraz
 
Using parallel programming to improve performance of image processing
Using parallel programming to improve performance of image processingUsing parallel programming to improve performance of image processing
Using parallel programming to improve performance of image processing
Chan Le
 
Accelerating microbiome research with OpenACC
Accelerating microbiome research with OpenACCAccelerating microbiome research with OpenACC
Accelerating microbiome research with OpenACC
Igor Sfiligoi
 
Better performance through Superscalarity
Better performance through SuperscalarityBetter performance through Superscalarity
Better performance through Superscalarity
Mårten Rånge
 
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John MelonakosPT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
AMD Developer Central
 
Solving large sparse linear systems on the GPU
Solving large sparse linear systems on the GPUSolving large sparse linear systems on the GPU
Solving large sparse linear systems on the GPU
Bruno Levy
 
Lrz kurs: gpu and mic programming with r
Lrz kurs: gpu and mic programming with rLrz kurs: gpu and mic programming with r
Lrz kurs: gpu and mic programming with r
Ferdinand Jamitzky
 
CUDA and Caffe for deep learning
CUDA and Caffe for deep learningCUDA and Caffe for deep learning
CUDA and Caffe for deep learning
Amgad Muhammad
 
FINITE DIFFERENCE MODELLING FOR HEAT TRANSFER PROBLEMS
FINITE DIFFERENCE MODELLING FOR HEAT TRANSFER PROBLEMSFINITE DIFFERENCE MODELLING FOR HEAT TRANSFER PROBLEMS
FINITE DIFFERENCE MODELLING FOR HEAT TRANSFER PROBLEMS
roymeister007
 
Gpu workshop cluster universe: scripting cuda
Gpu workshop cluster universe: scripting cudaGpu workshop cluster universe: scripting cuda
Gpu workshop cluster universe: scripting cuda
Ferdinand Jamitzky
 
Introduction to CFD FORTRAN code
Introduction to CFD FORTRAN codeIntroduction to CFD FORTRAN code
Introduction to CFD FORTRAN code
Behnam Bozorgmehr
 
CUDA by Example : Texture Memory : Notes
CUDA by Example : Texture Memory : NotesCUDA by Example : Texture Memory : Notes
CUDA by Example : Texture Memory : Notes
Subhajit Sahu
 
A simple finite element solver for thermo-mechanical problems - margonari eng...
A simple finite element solver for thermo-mechanical problems - margonari eng...A simple finite element solver for thermo-mechanical problems - margonari eng...
A simple finite element solver for thermo-mechanical problems - margonari eng...
Scilab
 
project presentation
project presentationproject presentation
project presentation
Vishesh Gupta
 
CUDA based Iris Detection based on Hough Transform
CUDA based Iris Detection based on Hough TransformCUDA based Iris Detection based on Hough Transform
CUDA based Iris Detection based on Hough Transform
Justas Miseikis
 
Write Python for Speed
Write Python for SpeedWrite Python for Speed
Write Python for Speed
Yung-Yu Chen
 
FrackingPaper
FrackingPaperFrackingPaper
FrackingPaper
Collin Purcell
 
Faster computation with matlab
Faster computation with matlabFaster computation with matlab
Faster computation with matlab
Muhammad Alli
 
Mathematical Modelling of Electrical/Mechanical modellinng in MATLAB
Mathematical Modelling of Electrical/Mechanical modellinng in MATLABMathematical Modelling of Electrical/Mechanical modellinng in MATLAB
Mathematical Modelling of Electrical/Mechanical modellinng in MATLAB
COMSATS Abbottabad
 
MATLAB DEKUT 2019.doc
MATLAB DEKUT 2019.docMATLAB DEKUT 2019.doc
MATLAB DEKUT 2019.doc
LucasMogaka
 
Comparison of Parallel Algorithms For An Image Processing Problem on Cuda
Comparison of Parallel Algorithms For An Image Processing Problem on CudaComparison of Parallel Algorithms For An Image Processing Problem on Cuda
Comparison of Parallel Algorithms For An Image Processing Problem on Cuda
Seval Çapraz
 
Using parallel programming to improve performance of image processing
Using parallel programming to improve performance of image processingUsing parallel programming to improve performance of image processing
Using parallel programming to improve performance of image processing
Chan Le
 
Accelerating microbiome research with OpenACC
Accelerating microbiome research with OpenACCAccelerating microbiome research with OpenACC
Accelerating microbiome research with OpenACC
Igor Sfiligoi
 
Better performance through Superscalarity
Better performance through SuperscalarityBetter performance through Superscalarity
Better performance through Superscalarity
Mårten Rånge
 
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John MelonakosPT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
PT-4054, "OpenCL™ Accelerated Compute Libraries" by John Melonakos
AMD Developer Central
 
Solving large sparse linear systems on the GPU
Solving large sparse linear systems on the GPUSolving large sparse linear systems on the GPU
Solving large sparse linear systems on the GPU
Bruno Levy
 
Lrz kurs: gpu and mic programming with r
Lrz kurs: gpu and mic programming with rLrz kurs: gpu and mic programming with r
Lrz kurs: gpu and mic programming with r
Ferdinand Jamitzky
 
CUDA and Caffe for deep learning
CUDA and Caffe for deep learningCUDA and Caffe for deep learning
CUDA and Caffe for deep learning
Amgad Muhammad
 
FINITE DIFFERENCE MODELLING FOR HEAT TRANSFER PROBLEMS
FINITE DIFFERENCE MODELLING FOR HEAT TRANSFER PROBLEMSFINITE DIFFERENCE MODELLING FOR HEAT TRANSFER PROBLEMS
FINITE DIFFERENCE MODELLING FOR HEAT TRANSFER PROBLEMS
roymeister007
 
Gpu workshop cluster universe: scripting cuda
Gpu workshop cluster universe: scripting cudaGpu workshop cluster universe: scripting cuda
Gpu workshop cluster universe: scripting cuda
Ferdinand Jamitzky
 
Introduction to CFD FORTRAN code
Introduction to CFD FORTRAN codeIntroduction to CFD FORTRAN code
Introduction to CFD FORTRAN code
Behnam Bozorgmehr
 
CUDA by Example : Texture Memory : Notes
CUDA by Example : Texture Memory : NotesCUDA by Example : Texture Memory : Notes
CUDA by Example : Texture Memory : Notes
Subhajit Sahu
 
A simple finite element solver for thermo-mechanical problems - margonari eng...
A simple finite element solver for thermo-mechanical problems - margonari eng...A simple finite element solver for thermo-mechanical problems - margonari eng...
A simple finite element solver for thermo-mechanical problems - margonari eng...
Scilab
 
project presentation
project presentationproject presentation
project presentation
Vishesh Gupta
 
CUDA based Iris Detection based on Hough Transform
CUDA based Iris Detection based on Hough TransformCUDA based Iris Detection based on Hough Transform
CUDA based Iris Detection based on Hough Transform
Justas Miseikis
 
Write Python for Speed
Write Python for SpeedWrite Python for Speed
Write Python for Speed
Yung-Yu Chen
 
Faster computation with matlab
Faster computation with matlabFaster computation with matlab
Faster computation with matlab
Muhammad Alli
 
Mathematical Modelling of Electrical/Mechanical modellinng in MATLAB
Mathematical Modelling of Electrical/Mechanical modellinng in MATLABMathematical Modelling of Electrical/Mechanical modellinng in MATLAB
Mathematical Modelling of Electrical/Mechanical modellinng in MATLAB
COMSATS Abbottabad
 
MATLAB DEKUT 2019.doc
MATLAB DEKUT 2019.docMATLAB DEKUT 2019.doc
MATLAB DEKUT 2019.doc
LucasMogaka
 

More from Assignmentpedia (20)

Transmitter side components
Transmitter side componentsTransmitter side components
Transmitter side components
Assignmentpedia
 
Single object range detection
Single object range detectionSingle object range detection
Single object range detection
Assignmentpedia
 
Sequential radar tracking
Sequential radar trackingSequential radar tracking
Sequential radar tracking
Assignmentpedia
 
Resolution project
Resolution projectResolution project
Resolution project
Assignmentpedia
 
Radar cross section project
Radar cross section projectRadar cross section project
Radar cross section project
Assignmentpedia
 
Radar application project help
Radar application project helpRadar application project help
Radar application project help
Assignmentpedia
 
Network costing analysis
Network costing analysisNetwork costing analysis
Network costing analysis
Assignmentpedia
 
Matlab simulation project
Matlab simulation projectMatlab simulation project
Matlab simulation project
Assignmentpedia
 
Matlab programming project
Matlab programming projectMatlab programming project
Matlab programming project
Assignmentpedia
 
Links design
Links designLinks design
Links design
Assignmentpedia
 
Image processing project using matlab
Image processing project using matlabImage processing project using matlab
Image processing project using matlab
Assignmentpedia
 
Help with root locus homework1
Help with root locus homework1Help with root locus homework1
Help with root locus homework1
Assignmentpedia
 
Transmitter subsystem
Transmitter subsystemTransmitter subsystem
Transmitter subsystem
Assignmentpedia
 
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 help
Assignmentpedia
 
Econometrics Homework Help
Econometrics Homework HelpEconometrics Homework Help
Econometrics Homework Help
Assignmentpedia
 
Video Codec
Video CodecVideo Codec
Video Codec
Assignmentpedia
 
Radar Spectral Analysis
Radar Spectral AnalysisRadar Spectral Analysis
Radar Spectral Analysis
Assignmentpedia
 
Pi Controller
Pi ControllerPi Controller
Pi Controller
Assignmentpedia
 
Help With Digital Communication Project
Help With  Digital Communication ProjectHelp With  Digital Communication Project
Help With Digital Communication Project
Assignmentpedia
 
Transmitter side components
Transmitter side componentsTransmitter side components
Transmitter side components
Assignmentpedia
 
Single object range detection
Single object range detectionSingle object range detection
Single object range detection
Assignmentpedia
 
Sequential radar tracking
Sequential radar trackingSequential radar tracking
Sequential radar tracking
Assignmentpedia
 
Radar cross section project
Radar cross section projectRadar cross section project
Radar cross section project
Assignmentpedia
 
Radar application project help
Radar application project helpRadar application project help
Radar application project help
Assignmentpedia
 
Network costing analysis
Network costing analysisNetwork costing analysis
Network costing analysis
Assignmentpedia
 
Matlab simulation project
Matlab simulation projectMatlab simulation project
Matlab simulation project
Assignmentpedia
 
Matlab programming project
Matlab programming projectMatlab programming project
Matlab programming project
Assignmentpedia
 
Image processing project using matlab
Image processing project using matlabImage processing project using matlab
Image processing project using matlab
Assignmentpedia
 
Help with root locus homework1
Help with root locus homework1Help with root locus homework1
Help with root locus homework1
Assignmentpedia
 
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 help
Assignmentpedia
 
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 Project
Assignmentpedia
 
Ad

Recently uploaded (20)

Module 4 Presentation - Enhancing Competencies and Engagement Strategies in Y...
Module 4 Presentation - Enhancing Competencies and Engagement Strategies in Y...Module 4 Presentation - Enhancing Competencies and Engagement Strategies in Y...
Module 4 Presentation - Enhancing Competencies and Engagement Strategies in Y...
GeorgeDiamandis11
 
Strengthened Senior High School - Landas Tool Kit.pptx
Strengthened Senior High School - Landas Tool Kit.pptxStrengthened Senior High School - Landas Tool Kit.pptx
Strengthened Senior High School - Landas Tool Kit.pptx
SteffMusniQuiballo
 
POS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 SlidesPOS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 Slides
Celine George
 
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_HyderabadWebcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Veera Pallapu
 
Hemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptxHemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptx
Arshad Shaikh
 
What are the benefits that dance brings?
What are the benefits that dance brings?What are the benefits that dance brings?
What are the benefits that dance brings?
memi27
 
How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18
Celine George
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptxOptimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptxPests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Arshad Shaikh
 
Rose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdfRose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdf
kushallamichhame
 
"Hymenoptera: A Diverse and Fascinating Order".pptx
"Hymenoptera: A Diverse and Fascinating Order".pptx"Hymenoptera: A Diverse and Fascinating Order".pptx
"Hymenoptera: A Diverse and Fascinating Order".pptx
Arshad Shaikh
 
Parenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independenceParenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independence
Pooky Knightsmith
 
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptxSEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
PoojaSen20
 
june 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptxjune 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptx
roger malina
 
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
Quiz Club of PSG College of Arts & Science
 
Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..
faizanaltaf231
 
Stewart Butler - OECD - How to design and deliver higher technical education ...
Stewart Butler - OECD - How to design and deliver higher technical education ...Stewart Butler - OECD - How to design and deliver higher technical education ...
Stewart Butler - OECD - How to design and deliver higher technical education ...
EduSkills OECD
 
How to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 SalesHow to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 Sales
Celine George
 
How to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time OffHow to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time Off
Celine George
 
LDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad UpdatesLDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad Updates
LDM & Mia eStudios
 
Module 4 Presentation - Enhancing Competencies and Engagement Strategies in Y...
Module 4 Presentation - Enhancing Competencies and Engagement Strategies in Y...Module 4 Presentation - Enhancing Competencies and Engagement Strategies in Y...
Module 4 Presentation - Enhancing Competencies and Engagement Strategies in Y...
GeorgeDiamandis11
 
Strengthened Senior High School - Landas Tool Kit.pptx
Strengthened Senior High School - Landas Tool Kit.pptxStrengthened Senior High School - Landas Tool Kit.pptx
Strengthened Senior High School - Landas Tool Kit.pptx
SteffMusniQuiballo
 
POS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 SlidesPOS Reporting in Odoo 18 - Odoo 18 Slides
POS Reporting in Odoo 18 - Odoo 18 Slides
Celine George
 
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_HyderabadWebcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Veera Pallapu
 
Hemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptxHemiptera & Neuroptera: Insect Diversity.pptx
Hemiptera & Neuroptera: Insect Diversity.pptx
Arshad Shaikh
 
What are the benefits that dance brings?
What are the benefits that dance brings?What are the benefits that dance brings?
What are the benefits that dance brings?
memi27
 
How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18How to Create a Rainbow Man Effect in Odoo 18
How to Create a Rainbow Man Effect in Odoo 18
Celine George
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptxOptimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptxPests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Arshad Shaikh
 
Rose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdfRose Cultivation Practices by Kushal Lamichhane.pdf
Rose Cultivation Practices by Kushal Lamichhane.pdf
kushallamichhame
 
"Hymenoptera: A Diverse and Fascinating Order".pptx
"Hymenoptera: A Diverse and Fascinating Order".pptx"Hymenoptera: A Diverse and Fascinating Order".pptx
"Hymenoptera: A Diverse and Fascinating Order".pptx
Arshad Shaikh
 
Parenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independenceParenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independence
Pooky Knightsmith
 
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptxSEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
SEXUALITY , UNWANTED PREGANCY AND SEXUAL ASSAULT .pptx
PoojaSen20
 
june 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptxjune 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptx
roger malina
 
Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..Cloud Computing ..PPT ( Faizan ALTAF )..
Cloud Computing ..PPT ( Faizan ALTAF )..
faizanaltaf231
 
Stewart Butler - OECD - How to design and deliver higher technical education ...
Stewart Butler - OECD - How to design and deliver higher technical education ...Stewart Butler - OECD - How to design and deliver higher technical education ...
Stewart Butler - OECD - How to design and deliver higher technical education ...
EduSkills OECD
 
How to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 SalesHow to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 Sales
Celine George
 
How to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time OffHow to Create Time Off Request in Odoo 18 Time Off
How to Create Time Off Request in Odoo 18 Time Off
Celine George
 
LDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad UpdatesLDMMIA Reiki Yoga Next Week Grad Updates
LDMMIA Reiki Yoga Next Week Grad Updates
LDM & Mia eStudios
 
Ad

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, [email protected] 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 [email protected]
  • 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 [email protected] or call us at +1 520 8371215