Presentation is loading. Please wait.

Presentation is loading. Please wait.

Components and Concurrency in ESMF Nancy Collins 2005 Community Meeting July 21, 2005 GMAO Seasonal.

Similar presentations


Presentation on theme: "Components and Concurrency in ESMF Nancy Collins 2005 Community Meeting July 21, 2005 GMAO Seasonal."— Presentation transcript:

1 Components and Concurrency in ESMF Nancy Collins nancy@ucar.edu nancy@ucar.edu 2005 Community Meeting July 21, 2005 http://www.esmf.ucar.edu GMAO Seasonal Forecast NCAR/LANL CCSM NCEP Forecast GFDL FMS Suite MITgcm NASA GSFC GSI

2 Current Status Starting with ESMF release 2.1.0 ESMF Components can be executed concurrently as well as serially. Child components can be created on a subset of the parent component’s PETs (new petList argument to the ESMF_ComponentCreate() call) The main loop looks very much the same, but a new Blocking flag can be set to return immediately on all PETs which do not run the component. They can then start another component. Ensemble runs are now supported as well.

3 Sequential vs Concurrent

4 ESMF_StateReconcile() New ESMF_State call ESMF Communications are all computed in parallel by each PET. Each PET computes independently what data needs to be sent and to who, and what data will be received and from whom. The reconcile process ensures all PETs have the global grid information for all data items, even those without local data. Then they can compute who they will be receiving data from, or to whom they need to send data.

5 Creating Ensembles Multiple Components running the same module code. Each can compute with a different set of input parameters.

6 Ensembles seem: But they are:

7 Get/SetInternalState Each component derived type maintains a private pointer to an allocated user data block. Think shared vs private variables in OpenMP, for example.

8 Futures: Threading Threads allow a single processor to have more than one stream of execution. Threading is enabled in the Child component at SetServices time by making a VM Set call.

9

10

11

12

13

14

15

16

17 Sequential Execution All PETs run the same component at the same time -- but each component is still computing in parallel.

18 Sequential Execution Details The Framework has a thin code layer between actual calls from one Component to the other. The Parent Component controls the execution sequencing.

19 Concurrent Execution Concurrency means different PETs are executing different Components.

20 Concurrent Details (1) The Parent Component decides how to allocate resources for the Child Components at Component Create time by giving each Child a list of PETs. It also controls the execution sequence of Child components.

21 Concurrent Details (2) The Framework tracks which PETs are supposed to run a Component. If the Component Run routine is called with the Blocking flag set to Non-Blocking, the Run call returns immediately on those PETS which should not be executing the Component.

22 Concurrent with Blocking If Component Run is called with the Blocking flag on, the red lines show where the Framework adds Barriers on all PETs to ensure the Component has finished before any Child returns.

23 Communications: Redist Basics Redistribution is used when the exact same grid is decomposed in different ways in different components. Running sequentially, the source, destination, and coupler all access the same data with no problems. Each PET computes the intersection between grids independently and stores the send and receive sizes and offsets.

24 Redist on same set of PETs The communication code in ESMF is a “me-centric” model. Each PET computes what data it needs to send and to who, and what data is expects to receive and from who. This scales well as number of processors grows. It does require each PET has the same information about the global grid and its decomposition.

25 Redist on Exclusive PETs What happens when the coupler tries to couple Components which do not run on exactly the same number of PETs, or exclusive PET sets.

26 After ESMF_StateReconcile() After calling ESMF_StateReconcile(), all PETs have the same global grid information, even if they contain no local data for that Field/Grid. Now the communication code can determine if it will be receiving data from a remote grid, or if it needs to send data to a remote grid.

27 Creating Ensembles Ensembles are running the same code with different parameter settings.

28 Ensemble Details ESMF ensembles running in the same executable look much like exclusive Components which do not communicate between themselves.

29 How Ensembles Seem What you might think you have when you create multiple components using the same module and entry points.

30 How Ensembles Are But in reality the two instances of the same component share both code and module global data. If one Component modifies the global data, all Components see the change.

31 SetInternalState at Init Time During Init, allocate a local derived type and store the pointer in the framework. There will be a separate pointer per instance of each component.

32 GetInternalState at Run Time During Run, retrieve the InternalState pointer from the framework. Using data inside that derived type, determine any per-instance settings, variables, local data, etc.

33 Futures: Transforms Transforms allow communication without returning to the calling Component. It weakens the isolation between Components by introducing communication sequencing dependencies.


Download ppt "Components and Concurrency in ESMF Nancy Collins 2005 Community Meeting July 21, 2005 GMAO Seasonal."

Similar presentations


Ads by Google