如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
第10章分布并行程序设计•程序设计语言•程序设计方法•PVM1§1程序设计语言0.系统结构模型PRAM、LogP、MPMD、…1.设计方法–全新–编译识别(SGIPFA:PowerFortranAccelerator)–补丁2.语言类别(1)通信方式–基于共享存储–基于消息传递(2)并行方式–数据并行:各种Fortran–任务并行:Linda,PVM2§1程序设计语言3.分布/并行语言功能–标识并行执行的开始–使参与并行执行的进程共享数据–使参与并行执行的进程建立私有数据副本–同步各进程4.消息传递标准(1)PVM(2)MPI5.几种语言–PCFFortan(共享存储)–HPF–PVM–Express(Caltech)–Linda(Yale)3§2程序设计方法1.向量机并行程序设计–重点:向量化2.共享存储器多机系统并行程序设计–任务分解–任务同步3.消息传递–fork–send–receive–join4§3PVM1.概况PVMManualbyORNL,Current:V3.4.5+XPVM早期:Unix,现在:WINDOWS•PVM(ParallelVirtualMachine)isabyproductofaheterogeneousnetworkcomputingresearchproject•Thegeneralgoals:toinvestigateissuesin,anddevelopsolutionsfor,heterogeneousconcurrentcomputing.•PVMisanintegratedsetofsoftwaretoolsandlibrariesthatemulatesageneral-purpose,flexible,heterogeneousconcurrentcomputingframeworkoninterconnectedcomputersofvariedarchitecture.•TheoverallobjectiveofthePVMsystemistoenablesuchacollectionofcomputerstobeusedcooperativelyforconcurrentorparallelcomputation.5§3PVMTheprinciplesuponwhichPVMisbasedincludethefollowing:•User-configuredhostpool:Theapplication'scomputationaltasksexecuteonasetofmachinesthatareselectedbytheuserforagivenrunofthePVMprogram.•Translucentaccesstohardware:viewthehardwareenvironmentasanattributelesscollectionofvirtualprocessingelements.•Process-basedcomputation:TheunitofparallelisminPVMisatask(oftenbutnotalwaysaUnixprocess),anindependentsequentialthreadofcontrolthatalternatesbetweencommunicationandcomputation.•Explicitmessage-passingmodel:Messagesizeislimitedonlybytheamountofavailablememory.•Heterogeneitysupport:ThePVMsystemsupportsheterogeneityintermsofmachines,networks,andapplications.•Multiprocessorsupport:PVMusesthenativemessage-passingfacilitiesonmultiprocessorstotakeadvantageoftheunderlyinghardware.6§3PVM2.组成•控制台程序PVM、端口监控程序(daemon)pvmd、运行库(libpvm.a----C,libfpvm3.a----Fortran,libgpvm3.a----进程组)•pvm,xpvm:用户界面•库提供进程控制、消息传递与缓冲功能•用户将程序分成多个部分,并以程序的形式表示(可执行文件),作为进