From 2036cc867ee6580b415e0fb91d6355995e22e158 Mon Sep 17 00:00:00 2001 From: William Dawson Date: Wed, 15 Nov 2023 12:06:56 +0900 Subject: [PATCH] Make comm parameters intent in --- Source/Fortran/MatrixReduceModule.F90 | 54 +++++++++++++-------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/Source/Fortran/MatrixReduceModule.F90 b/Source/Fortran/MatrixReduceModule.F90 index 78b8ce64..7f2d3aaf 100644 --- a/Source/Fortran/MatrixReduceModule.F90 +++ b/Source/Fortran/MatrixReduceModule.F90 @@ -89,9 +89,9 @@ MODULE MatrixReduceModule SUBROUTINE ReduceAndComposeMatrixSizes_lsr(matrix, comm, gathered_matrix, & & helper) !> The matrix to send. - TYPE(Matrix_lsr), INTENT(IN) :: matrix + TYPE(Matrix_lsr), INTENT(IN) :: matrix !> The communicator to send along. - INTEGER, INTENT(INOUT) :: comm + INTEGER, INTENT(IN) :: comm !> The matrix we are gathering. TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix !> The helper associated with this gather. @@ -107,9 +107,9 @@ END SUBROUTINE ReduceAndComposeMatrixSizes_lsr SUBROUTINE ReduceAndComposeMatrixSizes_lsc(matrix, comm, gathered_matrix, & & helper) !! The matrix to send. - TYPE(Matrix_lsc), INTENT(IN) :: matrix + TYPE(Matrix_lsc), INTENT(IN) :: matrix !! The communicator to send along. - INTEGER, INTENT(INOUT) :: comm + INTEGER, INTENT(IN) :: comm !> The matrix we are gathering. TYPE(Matrix_lsc), INTENT(INOUT) :: gathered_matrix !! The helper associated with this gather. @@ -126,11 +126,11 @@ END SUBROUTINE ReduceAndComposeMatrixSizes_lsc SUBROUTINE ReduceAndComposeMatrixData_lsr(matrix, comm, gathered_matrix, & & helper) !> The matrix to send. - TYPE(Matrix_lsr), INTENT(IN) :: matrix + TYPE(Matrix_lsr), INTENT(IN) :: matrix !> The communicator to send along. - INTEGER, INTENT(INOUT) :: comm + INTEGER, INTENT(IN) :: comm !> The matrix we are gathering. - TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix + TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix !> The helper associated with this gather. TYPE(ReduceHelper_t), INTENT(INOUT) :: helper #ifdef NOIALLGATHER @@ -157,11 +157,11 @@ END SUBROUTINE ReduceAndComposeMatrixData_lsr SUBROUTINE ReduceAndComposeMatrixData_lsc(matrix, comm, gathered_matrix, & & helper) !> The matrix to send. - TYPE(Matrix_lsc), INTENT(IN) :: matrix + TYPE(Matrix_lsc), INTENT(IN) :: matrix !> The communicator to send along. - INTEGER, INTENT(INOUT) :: comm + INTEGER, INTENT(IN) :: comm !> The matrix we are gathering. - TYPE(Matrix_lsc), INTENT(INOUT) :: gathered_matrix + TYPE(Matrix_lsc), INTENT(INOUT) :: gathered_matrix !> The helper associated with this gather. TYPE(ReduceHelper_t), INTENT(INOUT) :: helper #ifdef NOIALLGATHER @@ -256,9 +256,9 @@ END SUBROUTINE ReduceAndComposeMatrixCleanup_lsc !> lose the opportunity for overlapping communication. SUBROUTINE ReduceAndComposeMatrix_lsr(matrix, comm, gathered_matrix) !> The matrix to send. - TYPE(Matrix_lsr), INTENT(IN) :: matrix + TYPE(Matrix_lsr), INTENT(IN) :: matrix !> The communicator to send along. - INTEGER, INTENT(INOUT) :: comm + INTEGER, INTENT(IN) :: comm !> The matrix we are gathering. TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix !! Local Variables @@ -272,9 +272,9 @@ END SUBROUTINE ReduceAndComposeMatrix_lsr !> lose the opportunity for overlapping communication. SUBROUTINE ReduceAndComposeMatrix_lsc(matrix, comm, gathered_matrix) !> The matrix to send. - TYPE(Matrix_lsc), INTENT(IN) :: matrix + TYPE(Matrix_lsc), INTENT(IN) :: matrix !> The communicator to send along. - INTEGER, INTENT(INOUT) :: comm + INTEGER, INTENT(IN) :: comm !> The matrix we are gathering. TYPE(Matrix_lsc), INTENT(INOUT) :: gathered_matrix !! Local Variables @@ -287,11 +287,11 @@ END SUBROUTINE ReduceAndComposeMatrix_lsc !> The first routine to call, gathers the sizes of the data to be sent. SUBROUTINE ReduceAndSumMatrixSizes_lsr(matrix, comm, gathered_matrix, helper) !> The matrix to send. - TYPE(Matrix_lsr), INTENT(IN) :: matrix + TYPE(Matrix_lsr), INTENT(IN) :: matrix !> The communicator to send along. - INTEGER, INTENT(INOUT) :: comm + INTEGER, INTENT(IN) :: comm !> The matrix we are gathering. - TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix + TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix !> The helper associated with this gather. TYPE(ReduceHelper_t), INTENT(INOUT) :: helper #ifdef NOIALLGATHER @@ -304,9 +304,9 @@ END SUBROUTINE ReduceAndSumMatrixSizes_lsr !> The first routine to call, gathers the sizes of the data to be sent. SUBROUTINE ReduceAndSumMatrixSizes_lsc(matrix, comm, gathered_matrix, helper) !> The matrix to send. - TYPE(Matrix_lsc), INTENT(IN) :: matrix + TYPE(Matrix_lsc), INTENT(IN) :: matrix !> The communicator to send along. - INTEGER, INTENT(INOUT) :: comm + INTEGER, INTENT(IN) :: comm !> The matrix we are gathering. TYPE(Matrix_lsc), INTENT(INOUT) :: gathered_matrix !> The helper associated with this gather. @@ -321,9 +321,9 @@ END SUBROUTINE ReduceAndSumMatrixSizes_lsc !> Second routine to call for gathering and summing up the data. SUBROUTINE ReduceAndSumMatrixData_lsr(matrix, comm, gathered_matrix, helper) !> The matrix to send. - TYPE(Matrix_lsr), INTENT(IN) :: matrix + TYPE(Matrix_lsr), INTENT(IN) :: matrix !> The communicator to send along. - INTEGER, INTENT(INOUT) :: comm + INTEGER, INTENT(IN) :: comm !> The matrix we are gathering. TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix !> The helper associated with this gather. @@ -350,9 +350,9 @@ END SUBROUTINE ReduceAndSumMatrixData_lsr !> Second routine to call for gathering and summing up the data. SUBROUTINE ReduceAndSumMatrixData_lsc(matrix, comm, gathered_matrix, helper) !> The matrix to send. - TYPE(Matrix_lsc), INTENT(IN) :: matrix + TYPE(Matrix_lsc), INTENT(IN) :: matrix !> The communicator to send along. - INTEGER, INTENT(INOUT) :: comm + INTEGER, INTENT(INOUT) :: comm !> The matrix we are gathering. TYPE(Matrix_lsc), INTENT(INOUT) :: gathered_matrix !> The helper associated with this gather. @@ -455,9 +455,9 @@ END SUBROUTINE ReduceAndSumMatrixCleanup_lsc !> lose the opportunity for overlapping communication. SUBROUTINE ReduceAndSumMatrix_lsr(matrix, comm, gathered_matrix, threshold) !> The matrix to send. - TYPE(Matrix_lsr), INTENT(IN) :: matrix + TYPE(Matrix_lsr), INTENT(IN) :: matrix !> The communicator to send along. - INTEGER, INTENT(INOUT) :: comm + INTEGER, INTENT(IN) :: comm !> The gathered_matrix the matrix being gathered. TYPE(Matrix_lsr), INTENT(INOUT) :: gathered_matrix !> The threshold the threshold for flushing values. @@ -472,9 +472,9 @@ END SUBROUTINE ReduceAndSumMatrix_lsr !> lose the opportunity for overlapping communication. SUBROUTINE ReduceAndSumMatrix_lsc(matrix, comm, gathered_matrix, threshold) !> The matrix to send. - TYPE(Matrix_lsc), INTENT(IN) :: matrix + TYPE(Matrix_lsc), INTENT(IN) :: matrix !> The communicator to send along. - INTEGER, INTENT(INOUT) :: comm + INTEGER, INTENT(INOUT) :: comm !> The threshold the threshold for flushing values. TYPE(Matrix_lsc), INTENT(INOUT) :: gathered_matrix !> The threshold the threshold for flushing values.