overview and demonstration of the community surface ... · tool called babel, rpc support, a...

27
Overview and Demonstration of the Community Surface Dynamics Modeling System CSDMS Terrestrial Working Group Mee6ng February 2, 2009. Boulder, CO. Scott Peckham

Upload: others

Post on 05-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Overview and Demonstration of the Community Surface Dynamics Modeling System

CSDMSTerrestrialWorkingGroupMee6ng

February2,2009.Boulder,CO.

Scott Peckham

Page 2: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

A Request (or Your Homework)

On our website, please have a look at our:

CSDMS Handbook for Code Contributors : A Guide to Concepts and Protocols

It was written specifically to help code contributors understand the CSDMS approach to model coupling and to provide overviews and examples of key concepts. (But we don’t expect anyone to absorb all of it on a first reading.)

It also contains links to a large number of useful articles and papers on component technology.

It is a work in progress and we welcome your feedback.

Page 3: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Two Powerful Tools for Component-Based Modeling

A component architecture standard (or framework standard) that supports high-performance, scientific computing.

Provides a language-interoperability tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting components within the Ccaffeine framework.

A component interface standard designed for numerical models of the type where arrays of values march forward in time.

Provides tools for passing data between models that may use different computational grids, different dimensionality, units, etc.

Page 4: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

“Underemployed” Models Manysurfacedynamicsmodelshavebeendevelopedbyourcommunitybuttheytendtobeunderu6lized.Theydifferinanumberofways,whichmakesitdifficultforthemtobelinkedtogetherorusedinterchangeably.

Forexample,theymay:

• bewriCenindifferentlanguages• usedifferentgrids(triangles,rectangles)• havedifferentdimensionality(1D,2D,3D)• usedifferentformatsforinput/output

Theideabehindcomponent‐basedmodelingistotransformorwrapthesemodelssothattheycanbeusedinaplug‐and‐playmanner.

Componentsarelikepeople,inthatthey:

• havepar6cularsetsofskillsorabili6es• speaksomelanguage• communicatewithothercomponents• worktogethertosolveproblems• makerequestsofoneanother• accessand/orrequirecertainservices• needtobe“connected”toworktogether

Buthowdowedealwiththesedifferences?

Page 5: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

The Need for Interface Standards Werequirepeoplewhodo“missioncri6cal”jobssuchaselectricians,lawyers,doctorsandairlinepilotstobecer:fiedorlicensed.

Thisrequiresstandardizedtrainingandacer6fica6onthattheyhavecanperformcertainrequiredskills.Similarly,tobeviewedasinterchangeableinagivencontext,twocomponentsmustbeabletoperformthesamenamedsetoffunc6ons.

Withoutsomekindofstandardizedinterface,modelscannoteasilybeusedinotherseSngsandtendtoremain“underemployed”.

Justasemployersrequireevidencethatapersonhasapar6cularskillset,soUwaredevelopersrequirecomponentsthatmeetcertaininterfacestandards.

OpenMIisanopensourceinterfacestandardformodelsthatallowsthemtorequestdatafromoneanotheraccordingtospecificrules.

Page 6: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

The Basic “IRF” Interface Inthecontextofcomponen6zedsoUware,aninterfaceisanamedsetofmemberfunc0onsthatprovideacallerwithaccesstoitscapabili6es.(Thatis,namesanddatatypesofallarguments&returnvaluesarecompletelyspecified.

Abasic“IRFinterface”issomethingthatvirtuallyallmodelcouplingeffortshaveincommon(e.g.ESMF,OMSandOpenMI).IRFstandsfor“Ini6alize,Run_Step,Finalize”.Wewantcontributorstoprovidethisinterface.

Run_Model() Ini0alize() whilenot(DONE):Update() Finalize()

Ini6alize()=>Openfiles,read/computeini6alvalues,allocatememory,etc.Run_step()orUpdate()=>Updateallofthecomputedvalues(onestepforward)Cancallotherfunc6ons,e.g.Update_Q,Update_v.Finalize()=>Closefiles,printreport,freememory.

Page 7: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Recruiting Models to CSDMS

CSDMSseekstobringopen‐sourcemodelstogetherandtorepackagethemascomponentsthatcanbeeasilyreusedandconnectedtoothercomponentsinordertosolveabroadrangeofsurfacedynamicsproblems.

CSDMSrequeststhatcodecontributorsmakeafew,rela0velysmallchangestotheirmodel’sstructuresothatwecanmoreeasilyprovideitwithastandardinterface.

CSDMSalsorequiresthatcontributedmodelscanbecompiledwithastandard,open‐sourcecompiler.Wedon’thavetheresourcestosupportallcompilers.

Page 8: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Training Models with Bocca

BoccaisatoolintheCCAtoolchainthatthesoUwareengineerscanuseinordertopreparecomponentsfordeploymentinaCCAframework.

Thisprepara6onhasmainlytodowithprovidingcomponentswithstandardinterfaces(e.g.OpenMI)sotheyareinterchangeableandcanworktogether.

BoccareliesonanotherCCAtoolcalledBabeltocreatelanguagebindingsthatarenecessarysothatcomponentswriCenindifferentlanguagescancommunicateorcalloneanother.

Page 9: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Helping Components Communicate BabelisapowerfultoolthatcanprovidelanguageinteroperabilityforcomponentsinaCCAframework.Thismeansthatthereisnoneedtoconvertallofourmodelstoacommonlanguage.Contributorscankeepworkinginwhateverlanguagetheywant.

ComponentswriCenindifferentlanguagescanberapidlylinkedinHPCapplica6onswithhardlyanyperformancecost.Thisalsoallowsusto“shop”foropen‐sourcesolu6ons(e.g.libraries),letsusmixproceduralandobject‐orientedstrategies,andallowsustoaddgraphics&GUIs.

Page 10: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Providing Components with Tools Componentsmayalsobeprovidedwith“toolkits”oru6li6esthatareneededinorderto“exercisetheirskillset.”

Thisissimilartoalicensedelectricianordoctorneedingatoolbagthatcontainsthe“toolsoftheirtrade.”

Aninterfacestandard,likeOpenMI,mayincludeasoCwaredevelopmentkitorSDKthatperformsthelow‐leveltasksthatarenecessaryinordertoprovideacomponentwithanimplementa6onofthatinterface.

Page 11: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Deploying Models in a CCA Framework

Themaindifferencebetweensubrou6nesandcomponentsisthatcomponentsaredeployedandconnectedwithinaframework.

Ifcomponentsarepeople,thenaframeworkisavenuewherepeopleworktogetheronacommongoal,suchasaboardroom,concerthall,sportsarena,baClefieldorconstruc6onsite.

Theframeworkprovidesaplacetoworkbutalsotypicallyprovidesasetofservicesthatareaccessibletoeverycomponent.ItmayalsoprovidelanguageinteroperabilitywithatoollikeBabel.

Frameworkservicesareanalogoustoservicesthatthevenueprovides,suchaswirelessinternet,electricity,projectors,telephones,heat,lightandcatering.

Page 12: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Requirements for Code Contributors

1.  CodemustbeinaBabel‐supportedlanguage.

2.  CodemustcompilewithaCSDMS‐supported,open‐sourcecompiler(e.g.gcc,gfortran,etc.)

3.  RefactorsourcecodetohaveabasicIRFinterface4.  Providedescrip6onsofallinput&outputexchangeitems5.  Includesuitabletes:ngproceduresanddata6.  Includeauser’sguideoratleastbasicdocumenta6on7.  Specifywhatopen‐sourcelicenseappliestoyourcode8.  UsestandardorgenericfileformatswheneverpossibleforI/O

9.  ApplyaCSDMSautomatedwrappingtool

Page 13: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Non-requirements for Contributors 1.  Youdon’tneedtolearnhowtouseCCA’sBabeltool.2.  Youprobablydon’tneedtolearnhowtouseCCA’sBoccatool,

butifyoudecideto,itispreCyuser‐friendly.

3.  Youdon’tneedtolearnthedetailsoftheOpenMIinterfacestandard,butcodecontributorsshouldknowwhyabasic“IRFinterface”isrequiredforlinkingmodelsorcomponents.

4.  YouwillneedtolearnhowtousetheCcaffeineGUIorhowtowritesimpleCcaffeinescriptsifyouwanttolinkCSDMScomponentstocreatenewmodels.WeareworkingonaclientversionoftheCcaffeineGUIthatdoesnotrequireyoutoinstallthefullsetoftoolsintheCCAtoolchain.ThisGUIwillletyoubuildandrunmodelsonthenewCSDMSsupercomputer.

Page 14: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Example 1: Using the GUI for a CCA

framework called Ccaffeine to create a new model from

GC2D and Flexure components

GC2D is a glacier dynamics model developed by Mark Kessler and Bob Anderson.

Page 15: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

An Ice Model called GC2D

Page 16: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting
Page 17: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Results of GC2D + Flexure

If the flexure parameter is set to a very small (unrealistic) value, results converge to those of Airy subsidence where cells subside independently.

Page 18: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Results of GC2D + Flexure

Page 19: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Results of GC2D + Flexure

Page 20: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Results of GC2D + Flexure

Page 21: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Results of GC2D + Flexure

Page 22: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Example 2: Using the GUI for a CCA

framework called Ccaffeine to create a new model from Sedflux and Airy subsidence

components

SedFlux is a seafloor stratigraphy model developed by Eric Hutton, James Syvitski and others.

Page 23: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting
Page 24: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Without Subsidence, the delta progrades approximately 7 km

Page 25: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

With Airy subsidence, the delta progrades approximately 5 km

Page 26: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

With Flexure, the delta is similar to the case with no subsidence at all

Page 27: Overview and Demonstration of the Community Surface ... · tool called Babel, RPC support, a component project management tool called Bocca, and a graphical interface for connecting

Summary CSDMS employs a component-based modeling approach.

CSDMS authors contribute models with an “IRF interface”, and in a Babel supported language (C, C++, Fortran, Python, Java)

CSDMS staff assists with converting models to plug-and-play components that have a standardized OpenMI interface.

CSDMS users can then assemble new models from these components in a CCA-compliant framework. The Ccaffeine GUI can be used locally to assemble a model and then the model can be run remotely on the CSDMS supercomputer.

CCA Babel takes care of language issues, while the OpenMI SDK takes care of other differences between models such as grid type and dimensionality.

This CSDMS approach has been demonstrated with prototypes.