Engineering

A Revised Proposal for a Sparse BLAS Toolkit

Description
A Revised Proposal for a Sparse BLAS Toolkit
Categories
Published
of 31
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Transcript
  ARevisedProposalforaSparseBLASToolkit  SPARKERWorkingNote  #  3  SandraCarney   ,MichaelA.Heroux  y ,GuangyeLi y ; KeshengWu   March1994  Abstract Thispaperdescribesaproposalfora\toolkit"ofkernelroutinesforsomeofthebasicoperationsin(iterative)sparsenumericalmethods.Inparticular,wedescribeaninterfaceforroutineswhichperform(i)sparsematrixtimesdensematrixproduct,(ii)thesolution ofasparsetriangularsystemwithmultipleright-hand-sides,(iii)therightpermutationofasparsematrixand(iv)acheckfortheintegrityofasparsematrixrepresentation.Theinterfacesforthesefouroperationsaredenedforavarietyofcommondatastructuresandasetofguidelinesisgiventodeneinterfacesfornewdatastructures.Theprimary purposeofthistoolkitistoprovideasetofbasicroutinesuponwhichthe\UserLevelSparseBLAS,"asdescribedin9],canbebuilt.Thispaperisarevisionoftheoriginalproposalfoundin12]. Keywords Sparsematrices,sparsedatastructures,programmingstandards,sparseBLAS. 1Introduction  Standardinterfacesfornumericallinearalgebrasoftwarehavebeenshowntobevery usefuliftheinterfaceissimpleyetexibleenoughforawidevarietyofusers.ExamplesofsuccessfulinterfacesaretheLevel1,Level2andLevel3BLAS14,7,6],LINPACK 5]andEISPACK17],andmorerecently,LAPACK1].However,withtheexception ofperhapstheLINPACKbandedstoragescheme,widelyadoptedsoftwarestandardsfornumericallinearalgebrahavebeenalmostexclusivelyfordenselinearsystems.TherearesparseextensionstotheLevel1BLAS(see4])whichembodyusefulfunctionality.However,weneedtoconsiderhigherlevelfunctionalitytoadequatelyaddresstheneedsofmostiterativeschemes.Severaleortshavebeenmadeatstandardsforsparselinearsystems,butthetaskismuchmoredicult.Attheheartofthisdicultyisthefactthatthereisnosinglewidelyaccepteddatastructureforsparsematrices.Infact,therearemanywell-known   DepartmentofComputerScience,UniversityofMinnesota.WorksupportedinpartbytheArmyCenterforHighPerformanceComputing. y CrayResearch,Inc.,655LoneOakDr.Eagan,MN55121USA. 1   datastructuresforsparsematricesandforeachbasicstructuretherearetypicallyseveralminorvariations.Anystandardwhichwouldallowonlyasingledatastructurewould severelylimitthenumberofusersthatcouldeectivelyutilizethestandard.Therefore,attemptsatstandardsforsparselinearalgebrasoftwarehavetriedtoaccommodatea varietyofdatastructures.Oneapproachtostandardizedsoftwareforsparselinearsystemsistoprovidea\toolkit",orcollection,ofroutineswhichperformcommonoperations,suchassparsematrix-vectorproduct,usingavarietyofcommondatastructures.Somewell-knownexamplesofthisareSPARSKITbySaad16]andtheIterativeBLASofOppeandKincaid15].TheproposaldescribedhereissimilartotheabovetwoexamplesbutisexpresslydevelopedtosupporttheUserLevelSparseBLASproposedin9].BeyondthisexplicitrelationshiptotheUserLevelSparseBLAS,wewanttoemphasizethatthesekernelsaregenerallyusefulforotherhighlevelinterfaces.Inparticular,for\object-oriented"interfacessuchasthosedescribedin18,10,13],thesparseBLAStoolkitroutinescanserveastheprimarycomputationalkernels.Also,foriterativetoolkitssuch asthe\templates"describedin3],thesparseBLAStoolkitcanprovideacomplimentary setofkernels. 1.1Goals  Thecurrentgoalsofthisproposalaretodeneaninitialsetofbasic,data-structure-dependentkernelroutinesforsparseiterativenumericalmethodsandtoestablisha frameworkforextendingthisinitialsetasnewdatastructuresandoperationsareadded.ThepurposeofthesekernelroutinesistoprovidetheprimaryfoundationfortheUserLevelSparseBLASdescribedin9],i.e.,totheextentpossible,theUserLevelSparseBLASwillbewrittenusingkernelsfromthesparseBLAStoolkit.TheultimategoalistoeventuallyhavetheUserLevelSparseBLASandSparseBLAS Toolkitbecome defacto  standardsinmuchthesameasthedenseBLAS.Weanticipatethathardwarevendorsandsoftwaredeveloperswillprovideoptimizedversionsof(some)thekernelroutinespresentedhereasappropriateforthetargetedscienticapplicationsandhardwareplatforms.Applicationdeveloperscanthen,viacallstotheUserLevelSparseBLAS,attainhighperformance,withoutcodemodications,onawidevarietyofarchitectures. 1.2Deliverables  Thenalproductsofthisproposalwillbe:1.Thesetofkernelroutinesforsparsematrix-densematrixproduct,solutionofsparsetriangularsystems,therightpermutationofasparsematrixandthecheckfortheintegrityofasparsematrixrepresentationasdescribedinthisproposal.TheseroutineswillbewritteninFORTRAN77.2.Acomprehensivetestsuite,alsoinFORTRAN77,fortheaboveroutines.2   1.3GeneralOverview  IntheremainderofthisproposalwedenethedetailsoftheSparseBLASToolkit.In Section2wedenethebasicoperations,independentofdatastructures.Wealsodiscussournamingandargumentconventions.Thus,thissectiondenestheinterfacesforthecurrentsetofroutinesintheSparseBLASToolkitandalsoprovidesaframeworkforfutureextensions.InSection3wedenethesupporteddatastructuresindetail.Theprecisedenitionofdatastructuresisveryimportantforthisproposalsincemanyvarietiesofthebasicdata structuresexist.Ineect,thisproposalisattemptingtostandardizethedenitionofthesedatastructures.Section4discussesourrationaleforthedesign.Inthissectionweattempttojustifywhatis,andisnot,includedinourproposal.Wealsoattempttoillustratesomeoftheintended usesforthesekernels.Finally,inSection5wepresentsomeissueswhichareopenforfurtherdiscussion. 2ScopeoftheSparseBLASToolkit  ThepresentscopeoftheSparseBLASToolkitcoversmatrix-matrixproductoperations,thesolutionoftriangularsystemswithmultipleright-hand-sides,permutationsofsparsematrices,andtheintegritycheckofasparsematrixrepresentation.Morepreciselywehave:1.Matrix-matrixproducts: C    AB  +  C C    A  T  B  +  C  2.Solutionoftriangularsystems(supportedforallbuttheCOOandBCOdata structures): C    DA  ?  1 B  +  C C    DA  ?  T  B  +  C C    A  ?  1 DB  +  C C    A  ?  T  DB  +  C  3.Rightpermutationofasparsematrix(presentlyforJADdatastructureonly): A    AP A    AP  T  4.Integritycheckofasparsematrixrepresentation:(NERR)   A  3   where   and    arescalars, B  and  C  arerectangularmatrices,Disa(block)diagonalmatrix,and  A  issparsematrix.Thesparsematrix  A  canbestoredinoneofavariety ofsparsedatastructuresasdescribedinSection3.NERRistheintegervaluewhich returnsinformationabouttheintegrityofasparsematrixrepresentation.Eachoftheaboveoperationsisavailableforsingleanddoubleprecision,realandcomplexdataasappropriate. 2.1NamingConventionsforSparseBLASToolkit EachSparseBLASToolkitsubroutinehasasix-characternamethatisafunctionofthedatatype,thedatastructureofthesparsematrixandthetypeofoperation.Moreprecisely,eachnameisoftheformXYYYZZwhere   Xindicatesthedatatype: {  S-Single-precisionreal {  C-Single-precisioncomplex  {  D-Double-precisionreal {  Z-Double-precisioncomplex    YYYindicatesthedatastructureofthesparsematrix:(Note:Thislistmaychange.SeeSection3.) {  Pointentry:   COO-Coordinate   CSC-Compressedsparsecolumn    CSR-Compressedsparserow    DIA-Sparsediagonal   ELL-Ellpack/Itpack    JAD-Jaggeddiagonal   SKY-Skyline {  Blockentry:   BCO-Blockcoordinate   BSC-Blockcompressedsparsecolumn    BSR-Blockcompressedsparserow    BDI-Blocksparsediagonal   BEL-BlockEllpack/Itpack    VBR-Variableblockcompressedsparserow    ZZindicatesthetypeofoperation: {  MM-Matrix-matrixproduct {  SM-Solutionofatriangularsystemwithmultipleright-hand-sides {  RP-Rightpermutationofasparsematrix(presentlyforJADdatastructureonly) {  CK-Integritycheckofasparsematrixrepresentation.4   2.2ArgumentConventionsforSparseBLASToolkit TheargumentconventionsfollowthespiritofthedenseBLAS.Thegeneralorderofargumentsis:1.Argumentsspecifyingoptions.2.Argumentsspecifyingproblemdimensions.3.Inputscalarassociatedwithinputmatrices.4.Descriptionofsparseinputmatrices( args(  A  ) ,describedbelow).5.Descriptionofdenseinputmatrices.6.Inputscalarassociatedwithinput-outputmatrix.7.Descriptionofinput-outputmatrix.8.Errorprocessinginformation.9.Workspace.10.Lengthofworkspace.Inparticular,wehave   Pointentrymatrix-matrixproduct:XYYYMM(TRANSA,M,N,K,ALPHA, args(  A  ) ,B,LDB,BETA,C,LDC,WORK,LWORK)   Blockentrymatrix-matrixproduct:XYYYMM(TRANSA,MB,N,KB,ALPHA, args(  A  ) ,B,BLDB,BETA,C,BLDC,WORK,LWORK)   Pointentrysolutionoftriangularsystem:XYYYSM(TRANSA,M,N,UNITD,DV,ALPHA, args(  A  ) ,B,LDB,BETA,C,LDC,WORK,LWORK)   Blockentrysolutionoftriangularsystem:XYYYSM(TRANSA,MB,N,UNITD,DV,ALPHA, args(  A  ) ,B,BLDB,BETA,C,BLDC,WORK,LWORK)   Rightpermutationofasparsematrix:XYYYRP(TRANSP,M,K, args(  A  ) ,IPERM,]WORK,LWORK)   Pointentryintegritycheckofasparsematrixrepresentation:XYYYCK(TRANSA,M,K, args(  A  ) ,NERR,WORK,LWORK)   Blockentryintegritycheckofasparsematrixrepresentation:XYYYCK(TRANSA,MB,KB, args(  A  ) ,NERR,WORK,LWORK)5 
Search
Similar documents
View more...
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks