关闭

关闭

关闭

封号提示

内容

首页 Matlab2015a并行计算工具箱用户指南

Matlab2015a并行计算工具箱用户指南.pdf

Matlab2015a并行计算工具箱用户指南

MarcoPolochina 2017-09-10 评分 0 浏览量 0 0 0 0 暂无简介 简介 举报

简介:本文档为《Matlab2015a并行计算工具箱用户指南pdf》,可适用于IT/计算机领域,主题内容包含ParallelComputingToolboxtradeUser#sGuideRaHowtoContactMathWorksLatestnews:符等。

ParallelComputingToolboxtradeUser#sGuideRaHowtoContactMathWorksLatestnews:wwwmathworkscomSalesandservices:wwwmathworkscomsalesandservicesUsercommunity:wwwmathworkscommatlabcentralTechnicalsupport:wwwmathworkscomsupportcontactusPhone:TheMathWorks,IncAppleHillDriveNatick,MAParallelComputingToolboxtradeUser#sGuidecopyCOPYRIGHTndashbyTheMathWorks,IncThesoftwaredescribedinthisdocumentisfurnishedunderalicenseagreementThesoftwaremaybeusedorcopiedonlyunderthetermsofthelicenseagreementNopartofthismanualmaybephotocopiedorreproducedinanyformwithoutpriorwrittenconsentfromTheMathWorks,IncFEDERALACQUISITION:ThisprovisionappliestoallacquisitionsoftheProgramandDocumentationby,for,orthroughthefederalgovernmentoftheUnitedStatesByacceptingdeliveryoftheProgramorDocumentation,thegovernmentherebyagreesthatthissoftwareordocumentationqualifiesascommercialcomputersoftwareorcommercialcomputersoftwaredocumentationassuchtermsareusedordefinedinFAR,DFARSPart,andDFARSAccordingly,thetermsandconditionsofthisAgreementandonlythoserightsspecifiedinthisAgreement,shallpertaintoandgoverntheuse,modification,reproduction,release,performance,display,anddisclosureoftheProgramandDocumentationbythefederalgovernment(orotherentityacquiringfororthroughthefederalgovernment)andshallsupersedeanyconflictingcontractualtermsorconditionsIfthisLicensefailstomeetthegovernment#sneedsorisinconsistentinanyrespectwithfederalprocurementlaw,thegovernmentagreestoreturntheProgramandDocumentation,unused,toTheMathWorks,IncTrademarksMATLABandSimulinkareregisteredtrademarksofTheMathWorks,IncSeewwwmathworkscomtrademarksforalistofadditionaltrademarksOtherproductorbrandnamesmaybetrademarksorregisteredtrademarksoftheirrespectiveholdersPatentsMathWorksproductsareprotectedbyoneormoreUSpatentsPleaseseewwwmathworkscompatentsformoreinformationRevisionHistoryNovemberOnlineonlyNewforVersion(ReleaseSP)MarchOnlineonlyRevisedforVersion(ReleaseSP)SeptemberOnlineonlyRevisedforVersion(ReleaseSP)NovemberOnlineonlyRevisedforVersion(ReleaseSP)MarchOnlineonlyRevisedforVersion(Releasea)SeptemberOnlineonlyRevisedforVersion(Releaseb)MarchOnlineonlyRevisedforVersion(Releasea)SeptemberOnlineonlyRevisedforVersion(Releaseb)MarchOnlineonlyRevisedforVersion(Releasea)OctoberOnlineonlyRevisedforVersion(Releaseb)MarchOnlineonlyRevisedforVersion(Releasea)SeptemberOnlineonlyRevisedforVersion(Releaseb)MarchOnlineonlyRevisedforVersion(Releasea)SeptemberOnlineonlyRevisedforVersion(Releaseb)AprilOnlineonlyRevisedforVersion(Releasea)SeptemberOnlineonlyRevisedforVersion(Releaseb)MarchOnlineonlyRevisedforVersion(Releasea)SeptemberOnlineonlyRevisedforVersion(Releaseb)MarchOnlineonlyRevisedforVersion(Releasea)SeptemberOnlineonlyRevisedforVersion(Releaseb)MarchOnlineonlyRevisedforVersion(Releasea)OctoberOnlineonlyRevisedforVersion(Releaseb)MarchOnlineonlyRevisedforVersion(Releasea)vContentsGettingStartedParallelComputingToolboxProductDescriptionKeyFeaturesParallelComputingwithMathWorksProductsKeyProblemsAddressedbyParallelComputingRunParallelforLoops(parfor)ExecuteBatchJobsinParallelPartitionLargeDataSetsIntroductiontoParallelSolutionsInteractivelyRunaLoopinParallelRunaBatchJobRunaBatchParallelLoopRunScriptasBatchJobfromtheCurrentFolderBrowserDistributeArraysandRunSPMDDetermineProductInstallationandVersionsParallelforLoops(parfor)IntroductiontoparforparforLoopsinMATLABDecidingWhentoUseparforCreateaparforLoopComparingforLoopsandparforLoopsviContentsReductions:CumulativeValuesUpdatedbyEachIterationparforProgrammingConsiderationsMATLABPathErrorHandlingparforLimitationsInputsandOutputsinparforLoopsFunctionswithInteractiveInputsDisplayingOutputObjectsandHandlesinparforLoopsUsingObjectsinparforLoopsHandleClassesSlicedVariablesReferencingFunctionHandlesNestingandFlowinparforLoopsNestedFunctionsNestedLoopsNestedspmdStatementsBreakandReturnStatementsPCodeScriptsVariablesandTransparencyinparforLoopsUnambiguousVariableNamesTransparencyStructureArraysinparforLoopsScalarExpansionwithSlicedOutputsGlobalandPersistentVariablesClassificationofVariablesinparforLoopsNotesaboutRequiredandRecommendedGuidelinesLoopVariableSlicedVariablesCharacteristicsofaSlicedVariableSlicedInputandOutputVariablesBroadcastVariablesviiReductionVariablesBasicRulesforReductionVariablesFurtherConsiderationswithReductionVariablesExample:UsingaCustomReductionFunctionTemporaryVariablesUninitializedTemporariesTemporaryVariablesIntendedasReductionVariablesImprovingparforPerformanceWheretoCreateArraysSlicingArraysOptimizingonLocalvsClusterWorkersParallelPoolsWhatIsaParallelPoolAutomaticallyStartandStopaParallelPoolAlternativeWaystoStartandStopPoolsPoolSizeandClusterSelectionConvertNestedforLoopstoparforSingleProgramMultipleData(spmd)ExecuteSimultaneouslyonMultipleDataSetsIntroductionWhentoUsespmdDefineanspmdStatementDisplayOutputAccessWorkerVariableswithCompositesIntroductiontoCompositesCreateCompositesinspmdStatementsVariablePersistenceandSequencesofspmdCreateCompositesOutsidespmdStatementsDistributeArraysDistributedVersusCodistributedArraysCreateDistributedArraysviiiContentsCreateCodistributedArraysProgrammingTipsMATLABPathErrorHandlingLimitationsInteractiveParallelComputationwithpmodepmodeVersusspmdRunCommunicatingJobsInteractivelyUsingpmodeParallelCommandWindowRunningpmodeInteractiveJobsonaClusterPlottingDistributedDataUsingpmodepmodeLimitationsandUnexpectedResultsUsingGraphicsinpmodepmodeTroubleshootingConnectivityTestingHostnameResolutionSocketConnectionsMathwithCodistributedArraysNondistributedVersusDistributedArraysIntroductionNondistributedArraysCodistributedArraysixWorkingwithCodistributedArraysHowMATLABSoftwareDistributesArraysCreatingaCodistributedArrayLocalArraysObtaininginformationAbouttheArrayChangingtheDimensionofDistributionRestoringtheFullArrayIndexingintoaCodistributedArrayDimensionalDistributionLoopingOveraDistributedRange(fordrange)ParallelizingaforLoopCodistributedArraysinafordrangeLoopMATLABFunctionsonDistributedandCodistributedArraysProgrammingOverviewHowParallelComputingProductsRunaJobOverviewToolboxandServerComponentsLifeCycleofaJobCreateSimpleIndependentJobsProgramaJobonaLocalClusterParallelPreferencesClustersandClusterProfilesClusterProfileManagerDiscoverClustersImportandExportClusterProfilesCreateandModifyClusterProfilesValidateClusterProfilesApplyClusterProfilesinClientCodeApplyCallbackstoMJSJobsandTasksxContentsJobMonitorJobMonitorGUIManageJobsUsingtheJobMonitorIdentifyTaskErrorsUsingtheJobMonitorProgrammingTipsProgramDevelopmentGuidelinesCurrentWorkingDirectoryofaMATLABWorkerWritingtoFilesfromWorkersSavingorSendingObjectsUsingclearfunctionsRunningTasksThatCallSimulinkSoftwareUsingthepauseFunctionTransmittingLargeAmountsofDataInterruptingaJobSpeedingUpaJobControlRandomNumberStreamsDifferentWorkersClientandWorkersClientandGPUWorkerCPUandWorkerGPUProfilingParallelCodeIntroductionCollectingParallelProfileDataViewingParallelProfileDataBenchmarkingPerformanceHPCChallengeBenchmarksTroubleshootingandDebuggingObjectDataSizeLimitationsFileAccessandPermissionsNoResultsorFailedJobConnectionProblemsBetweentheClientandMJSSFTPError:ReceivedMessageTooLongRunmapreduceonaParallelPoolStartParallelPoolCompareParallelmapreducexiRunmapreduceonaHadoopClusterClusterPreparationOutpormatandOrderCalculateMeanDelayPartitionaDatastoreinParallelProgramIndependentJobsProgramIndependentJobsProgramIndependentJobsonaLocalClusterCreateandRunJobswithaLocalClusterLocalClusterBehaviorProgramIndependentJobsforaSupportedSchedulerCreateandRunJobsManageObjectsintheSchedulerShareCodewiththeWorkersWorkersAccessFilesDirectlyPassDatatoandfromWorkerSessionsPassMATLABCodeforStartupandFinishProgramIndependentJobsforaGenericSchedulerOverviewMATLABClientSubmitFunctionExamplemdashWritetheSubmitFunctionMATLABWorkerDecodeFunctionExamplemdashWritetheDecodeFunctionExamplemdashProgramandRunaJobintheClientSuppliedSubmitandDecodeFunctionsManageJobswithGenericSchedulerSummaryxiiContentsProgramCommunicatingJobsProgramCommunicatingJobsProgramCommunicatingJobsforaSupportedSchedulerSchedulersandConditionsCodetheTaskFunctionCodeintheClientProgramCommunicatingJobsforaGenericSchedulerIntroductionCodeintheClientFurtherNotesonCommunicatingJobsNumberofTasksinaCommunicatingJobAvoidDeadlockandOtherDependencyErrorsGPUComputingGPUCapabilitiesandPerformanceCapabilitiesPerformanceBenchmarkingEstablishArraysonaGPUTransferArraysBetweenWorkspaceandGPUCreateGPUArraysDirectlyExaminegpuArrayCharacteristicsRunBuiltInFunctionsonaGPUMATLABFunctionswithgpuArrayArgumentsExample:FunctionswithgpuArrayInputandOutputSparseArraysonaGPUConsiderationsforComplexNumbersRunElementwiseMATLABCodeonGPUMATLABCodevsgpuArrayObjectsRunYourMATLABFunctionsonaGPUxiiiExample:RunYourMATLABCodeSupportedMATLABCodeIdentifyandSelectaGPUDeviceExample:SelectaGPURunCUDAorPTXCodeonGPUOverviewCreateaCUDAKernelObjectRunaCUDAKernelCompleteKernelWorkflowRunMEXFunctionsContainingCUDACodeWriteaMEXFileContainingCUDACodeSetUpforMEXFileCompilationCompileaGPUMEXFileRuntheResultingMEXFunctionsComparisontoaCUDAKernelAccessComplexDataMeasureandImproveGPUPerformanceBasicWorkflowforImprovingPerformanceAdvancedToolsforImprovingPerformanceBestPracticesforImprovingPerformanceMeasurePerformanceontheGPUVectorizeforImprovedGPUPerformancexivContentsObjectsmdashAlphabeticalListFunctionsmdashAlphabeticalListGlossaryGettingStartedbullldquoParallelComputingToolboxProductDescriptionrdquoonpagebullldquoParallelComputingwithMathWorksProductsrdquoonpagebullldquoKeyProblemsAddressedbyParallelComputingrdquoonpagebullldquoIntroductiontoParallelSolutionsrdquoonpagebullldquoDetermineProductInstallationandVersionsrdquoonpageGettingStartedParallelComputingToolboxProductDescriptionPerformparallelcomputationsonmulticorecomputers,GPUs,andcomputerclustersParallelComputingToolboxletsyousolvecomputationallyanddataintensiveproblemsusingmulticoreprocessors,GPUs,andcomputerclustersHighlevelconstructsmdashparallelforloops,specialarraytypes,andparallelizednumericalalgorithmsmdashletyouparallelizeMATLABregapplicationswithoutCUDAorMPIprogrammingYoucanusethetoolboxwithSimulinkregtorunmultiplesimulationsofamodelinparallelThetoolboxletsyouusethefullprocessingpowerofmulticoredesktopsbyexecutingapplicationsonworkers(MATLABcomputationalengines)thatrunlocallyWithoutchangingthecode,youcanrunthesameapplicationsonacomputerclusteroragridcomputingservice(usingMATLABDistributedComputingServertrade)YoucanrunparallelapplicationsinteractivelyorinbatchKeyFeaturesbullParallelforloops(parfor)forrunningtaskparallelalgorithmsonmultipleprocessorsbullSupportforCUDAenabledNVIDIAGPUsbullFulluseofmulticoreprocessorsonthedesktopviaworkersthatrunlocallybullComputerclusterandgridsupport(withMATLABDistributedComputingServer)bullInteractiveandbatchexecutionofparallelapplicationsbullDistributedarraysandspmd(singleprogrammultipledata)forlargedatasethandlinganddataparallelalgorithmsParallelComputingwithMathWorksProductsParallelComputingwithMathWorksProductsInadditiontoParallelComputingToolboxprovidingalocalclusterofworkersforyourclientmachine,MATLABDistributedComputingServersoftwareallowsyoutorunasmanyMATLABworkersonaremoteclusterofcomputersasyourlicensingallowsMostMathWorksproductsletyoucodeinsuchawayastorunapplicationsinparallelForexample,Simulinkmodelscanrunsimultaneouslyinparallel,asdescribedinldquoRunParallelSimulationsrdquoMATLABCompilertradeandMATLABCompilerSDKtradesoftwareletyoubuildanddeployparallelapplications,asshowninSeveralMathWorksproductsnowofferbuiltinsupportfortheparallelcomputingproducts,withoutrequiringextracodingForthecurrentlistoftheseproductsandtheirparallelfunctionality,see:http:wwwmathworkscomproductsparallelcomputingbuiltinparallelsupporthtmlGettingStartedKeyProblemsAddressedbyParallelComputingInthissectionldquoRunParallelforLoops(parfor)rdquoonpageldquoExecuteBatchJobsinParallelrdquoonpageldquoPartitionLargeDataSetsrdquoonpageRunParallelforLoops(parfor)Manyapplicationsinvolvemultiplesegmentsofcode,someofwhicharerepetitiveOftenyoucanuseforloopstosolvethesecasesTheabilitytoexecutecodeinparallel,ononecomputeroronaclusterofcomputers,cansignificantlyimproveperformanceinmanycases:bullParametersweepapplicationsbullManyiterationsmdashAsweepmighttakealongtimebecauseitcomprisesmanyiterationsEachiterationbyitselfmightnottakelongtoexecute,buttocompletethousandsormillionsofiterationsinserialcouldtakealongtimebullLongiterationsmdashAsweepmightnothavealotofiterations,buteachiterationcouldtakealongtimetorunTypically,theonlydifferencebetweeniterationsisdefinedbydifferentinputdataInthesecases,theabilitytorunseparatesweepiterationssimultaneouslycanimproveperformanceEvaluatingsuchiterationsinparallelisanidealwaytosweepthroughlargeormultipledatasetsTheonlyrestrictiononparallelloopsisthatnoiterationsbeallowedtodependonanyotheriterationsbullTestsuiteswithindependentsegmentsmdashForapplicationsthatrunaseriesofunrelatedtasks,youcanrunthesetaskssimultaneouslyonseparateresourcesYoumightnothaveusedaforloopforacasesuchasthiscomprisingdistinctlydifferenttasks,butaparforloopcouldofferanappropriatesolutionParallelComputingToolboxsoftwareimprovestheperformanceofsuchloopexecutionbyallowingseveralMATLABworkerstoexecuteindividualloopiterationssimultaneouslyForexample,aloopofiterationscouldrunonaclusterofMATLABworkers,sothatsimultaneously,theworkerseachexecuteonl

用户评论(0)

0/200

精彩专题

上传我的资料

每篇奖励 +1积分

资料评分:

/656
2下载券 下载 加入VIP, 送下载券

意见
反馈

立即扫码关注

爱问共享资料微信公众号

返回
顶部

举报
资料