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 Results
- Test Programming Language: Fortran90
- Number of PETs: 6
- Communications Method: MPI
The main program of the test application consists of the following sections.
- 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.
- Registers the initialize, run and finalize entry points for the two GridComps.
- Registers the initialize, run and finalize entry points for the CplComp.
- 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.
- 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.
- Calls ESMF_GridCompFinalize() for the GridComp comp1, which:
- Destroys the source Array.
- Destroys the destination Array.
- Releases the RouteHandle for the ESMF_ArraySMM operation.
- Deallocates memory for all the created components by calling destroy subroutines.