solving linear systems

上传人:aa****6 文档编号:52123788 上传时间:2018-08-18 格式:PPT 页数:70 大小:725KB
返回 下载 相关 举报
solving linear systems_第1页
第1页 / 共70页
solving linear systems_第2页
第2页 / 共70页
solving linear systems_第3页
第3页 / 共70页
solving linear systems_第4页
第4页 / 共70页
solving linear systems_第5页
第5页 / 共70页
点击查看更多>>
资源描述

《solving linear systems》由会员分享,可在线阅读,更多相关《solving linear systems(70页珍藏版)》请在金锄头文库上搜索。

1、Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Parallel Programming in C with MPI and OpenMPMichael J. QuinnCopyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Chapter 12Solving Linear SystemsCopyright The McGraw-Hill C

2、ompanies, Inc. Permission required for reproduction or display.OutlinenTerminologynBack substitutionnGaussian eliminationnJacobi methodnConjugate gradient methodCopyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.TerminologynSystem of linear equationsuSolve Ax =

3、 b for xnSpecial matricesuSymmetrically bandeduUpper triangularuLower triangularuDiagonally dominantuSymmetricCopyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Symmetrically Banded42-10003-4560016324002-2092007387000402Semibandwidth 2Copyright The McGraw-Hill

4、Companies, Inc. Permission required for reproduction or display.Upper Triangular42-15920-4560-4003246000092000087000002Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Lower Triangular4000000000005430002623008-20180-357952Copyright The McGraw-Hill Companies,

5、Inc. Permission required for reproduction or display.Diagonally Dominant19022060-1520-305422-104232130-55-201160-35535-32Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Symmetric3022060743-35540-10423-190-50-30055654-55-3Copyright The McGraw-Hill Companies,

6、Inc. Permission required for reproduction or display.Back SubstitutionnUsed to solve upper triangular system Tx = b for xnMethodology: one element of x can be immediately computednUse this value to simplify system, revealing another element that can be immediately computednRepeatCopyright The McGraw

7、-Hill Companies, Inc. Permission required for reproduction or display.Back Substitution1x0+1x11x2+4x38= 2x13x2+1x35=2x2 3x30=2x34=Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Back Substitution1x0+1x11x2+4x38= 2x13x2+1x35=2x2 3x30=2x34=x3 = 2Copyright The

8、McGraw-Hill Companies, Inc. Permission required for reproduction or display.Back Substitution1x0+1x11x20= 2x13x23=2x26=2x34=Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Back Substitution1x0+1x11x20= 2x13x23=2x26=2x34=x2 = 3Copyright The McGraw-Hill Compan

9、ies, Inc. Permission required for reproduction or display.Back Substitution1x0+1x13= 2x112=2x26=2x34=Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Back Substitution1x0+1x13= 2x112=2x26=2x34=x1 = 6Copyright The McGraw-Hill Companies, Inc. Permission require

10、d for reproduction or display.Back Substitution1x09= 2x112=2x26=2x34=Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Back Substitution1x09= 2x112=2x26=2x34=x0 = 9Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Pseudo

11、codefor i n 1 down to 1 do x i b i / a i, i for j 0 to i 1 do b j b j x i a j, i endfor endfor Time complexity: (n2)Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Data Dependence DiagramWe cannot execute the outer loop in parallel. We can execute the inner

12、loop in parallel.Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Row-oriented AlgorithmnAssociate primitive task with each row of A and corresponding elements of x and bnDuring iteration i task associated with row j computes new value of bjnTask i must compu

13、te xi and broadcast its valuenAgglomerate using rowwise interleaved striped decompositionCopyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Interleaved DecompositionsRowwise interleaved striped decompositionColumnwise interleaved striped decompositionCopyright

14、The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Complexity AnalysisnEach process performs about n / (2p) iterations of loop j in allnA total of n -1 iterations in allnComputational complexity: (n2/p)nOne broadcast per iterationnCommunication complexity: (n log p)Copyr

15、ight The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Column-oriented AlgorithmnAssociate one primitive task per column of A and associated element of xnLast task starts with vector bnDuring iteration i task i computes xi, updates b, and sends b to task i -1nIn other w

16、ords, no computational concurrencynAgglomerate tasks in interleaved fashionCopyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.Complexity AnalysisnSince b always updated by a single process, computational complexity same as sequential algorithm: (n2)nSince elements of b passed from one process to another each iteration, communi

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > PPT模板库 > 教育/培训/课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号