Skip to content

Commit

Permalink
Some memory optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
william-dawson committed Nov 24, 2023
1 parent 95b3ba3 commit b2ea759
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Source/Fortran/distributed_algebra_includes/MatrixMultiply.f90
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,14 @@
& duplicate_offset_column * (JJ2 - 1)),&
& AdjacentABlocks(II, JJ2))
END DO
!! Then Do A Local Gather
!! Then Do A Local Gather and Cleanup
CALL ComposeMatrixColumns(AdjacentABlocks(II, :), &
& LocalRowContribution(II))
DO JJ2 = 1, &
& matAB%process_grid%number_of_blocks_columns / &
& matAB%process_grid%num_process_slices
CALL DestructMatrix(AdjacentABlocks(II, JJ2))
END DO
ATasks(II) = SendSizeA
!$OMP END TASK
CASE(SendSizeA)
Expand Down Expand Up @@ -156,9 +161,13 @@
& duplicate_offset_row * (II2 - 1), JJ), &
& TransposedBBlocks(II2, JJ))
END DO
!! Then Do A Local Gather
!! Then Do A Local Gather and Cleanup
CALL ComposeMatrixColumns(TransposedBBlocks(:, JJ), &
& LocalColumnContribution(JJ))
DO II2 = 1, matAB%process_grid%number_of_blocks_rows / &
& matAB%process_grid%num_process_slices
CALL DestructMatrix(TransposedBBlocks(II2, JJ))
END DO
BTasks(JJ) = SendSizeB
!$OMP END TASK
CASE(SendSizeB)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@
END IF

CALL DestructMatrix(local_matrix)
CALL DestructTripletList(shifted)
CALL DestructTripletList(sorted_tlist)

0 comments on commit b2ea759

Please sign in to comment.