2D Array Redist System Test Description
Two Gridded Components and one Coupler Component, one-way coupling.
The first Gridded Component runs on 4 PETs and defines a 2D source Array of 100x150. The second Gridded Component defines a destination Array also of 100x150, but runs on only 2 PETs. Both Gridded Components use DELayouts with 1 DE per PET. The decomposition of the source Array is defined as (petCount x 1), i.e. (4 x 1) while the destination Array is decomposed as (1 x petCount), i.e. (1 x 2).
The first Gridded Component initializes the source Array to a geometric function:
10.0 + 5.0*sin((I/Imax)*pi) + 2.0*sin((J/Jmax)*pi)
The Coupler Component runs on all 6 PETs and reconciles import and export States, which contain the source and destination Arrays, respectively. The Coupler Component then calls ArrayRedist() to redistribute the source Array data onto the destination Array.
Finally the second Gridded Component compares the data stored in the destination Array to the analytic solution of the above function as a measure of the accuracy of the ArrayRedist() method.
Test ResultsTest Configuration
- Test Programming Language: Fortran90
- Number of PETs: 6
- Communications Method: MPI
Sections
The main program of the test application consists of the following sections.
- Create
- Register
- Initialize
- Run
- Finalize
- Destroy
Create
- Creates a GridComp, "user model 1" on PET 0,1,2,3.
- Creates a GridComp, "user model 2" on PET 4,5.
- Creates a CplComp, "user one-way coupler", from "user model 1" to "user model 2" on 6 PETs.
Register
- Registers the initialize, run and finalize entry points for the two GridComps.
- Registers the initialize, run and finalize entry points for the CplComp.
Initialize
- Creates the c1exp State.
- Initializes "user model 1" GridComp, comp1, which:
- Creates and adds the source Array to State c1exp.
- Creates the c2imp State.
- Initializes "user model 2" GridComp, comp2, which:
- Creates and adds the destination Array to State c2imp.
- Reconciles States c1exp and c2imp,
- Precomputes the ESMF_ArrayRedist() operation between source and destination Arrays.
Run
- Calls ESMF_GridCompRun() for the GridComp comp1, which:
- Fills the source Array according to the test function.
- Performs ESMF_Redist() between source and destination Arrays.
- Checks the content of the destination Array against the exact solution of the test function.
Finalize
- Calls ESMF_GridCompFinalize() for the GridComp comp1, which:
- Destroys the source Array.
- Destroys the destination Array.
- Releases the RouteHandle for the ESMF_Redist operation.
Destroy
- Deallocates memory for all the created components by calling destroy subroutines.

