Array Sparse Matrix Multiply System Test Description
Test Description: This test provides preliminary testing of the sparse matrix multipy capability between two gridded components (GridComps). The first GridComp runs on 4 PETs and defines a 2D source Array of dimensions 100x150. The second GridComp defines a destination Array that is also 100x150 but runs on only 2 PETs. Both GridComps use DELayouts with 1 DE per PET. The decomposition of the source Array is defined as (petCount x 1) = (4 x 1) while the destination Array is decomposed as (1 x petCount) = (1 x 2). The first 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 (CplComp) runs on all 6 PETs and reconciles import and export states which contain source and destination Arrays, respectively. The CplComp then calls ESMF_ArraySMM() using the identity matrix. This amounts to a redistribution of the source Array data onto the destination Array. Finally the second GridComp compares the data stored in the destination Array to the exact solution of the above function as a measure of the correctness of the ESMF_ArraySMM() 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_ArraySMM() 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_ArraySMM() 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_ArraySMM operation.
Destroy
- Deallocates memory for all the created components by calling destroy subroutines.

