From d3f283c78f0c517771647e2f045c7c2b896e490f Mon Sep 17 00:00:00 2001 From: Pradipta Samanta <samanta@dkrz.de> Date: Fri, 3 Jan 2025 12:06:42 +0100 Subject: [PATCH] fixed further style formatting issues --- src/support/mo_lib_loopindices.F90 | 18 +++++++++--------- src/support/mo_math_utilities.F90 | 16 ++++++++-------- test/fortran/test_math_utilities.F90 | 18 +++++++++--------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/support/mo_lib_loopindices.F90 b/src/support/mo_lib_loopindices.F90 index 3ac80dd..ce67af7 100644 --- a/src/support/mo_lib_loopindices.F90 +++ b/src/support/mo_lib_loopindices.F90 @@ -132,23 +132,23 @@ CONTAINS INTERFACE SUBROUTINE get_indices_c_lib(i_startidx_in, i_endidx_in, nproma, i_blk, i_startblk, i_endblk, & i_startidx_out, i_endidx_out) BIND(C, NAME="get_indices_c_lib") - IMPORT :: C_INT - INTEGER(C_INT), VALUE :: i_startidx_in, i_endidx_in, nproma, i_blk, i_startblk, i_endblk - INTEGER(C_INT) :: i_startidx_out, i_endidx_out + IMPORT :: c_int + INTEGER(c_int), VALUE :: i_startidx_in, i_endidx_in, nproma, i_blk, i_startblk, i_endblk + INTEGER(c_int) :: i_startidx_out, i_endidx_out END SUBROUTINE get_indices_c_lib SUBROUTINE get_indices_e_lib(i_startidx_in, i_endidx_in, nproma, i_blk, i_startblk, i_endblk, & i_startidx_out, i_endidx_out) BIND(C, NAME="get_indices_e_lib") - IMPORT :: C_INT - INTEGER(C_INT), VALUE :: i_startidx_in, i_endidx_in, nproma, i_blk, i_startblk, i_endblk - INTEGER(C_INT) :: i_startidx_out, i_endidx_out + IMPORT :: c_int + INTEGER(c_int), VALUE :: i_startidx_in, i_endidx_in, nproma, i_blk, i_startblk, i_endblk + INTEGER(c_int) :: i_startidx_out, i_endidx_out END SUBROUTINE get_indices_e_lib SUBROUTINE get_indices_v_lib(i_startidx_in, i_endidx_in, nproma, i_blk, i_startblk, i_endblk, & i_startidx_out, i_endidx_out) BIND(C, NAME="get_indices_v_lib") - IMPORT :: C_INT - INTEGER(C_INT), VALUE :: i_startidx_in, i_endidx_in, nproma, i_blk, i_startblk, i_endblk - INTEGER(C_INT) :: i_startidx_out, i_endidx_out + IMPORT :: c_int + INTEGER(c_int), VALUE :: i_startidx_in, i_endidx_in, nproma, i_blk, i_startblk, i_endblk + INTEGER(c_int) :: i_startidx_out, i_endidx_out END SUBROUTINE get_indices_v_lib END INTERFACE diff --git a/src/support/mo_math_utilities.F90 b/src/support/mo_math_utilities.F90 index 6cafa98..459ff76 100644 --- a/src/support/mo_math_utilities.F90 +++ b/src/support/mo_math_utilities.F90 @@ -181,7 +181,7 @@ MODULE mo_math_utilities ! Preprocessor directive to conditionally include the tdma_solver_vec implementation #ifndef __USE_CPP_BINDINGS - CONTAINS +CONTAINS SUBROUTINE tdma_solver_vec(a, b, c, d, slev, elev, startidx, endidx, varout, opt_acc_queue) INTEGER, INTENT(IN) :: slev, elev @@ -247,13 +247,13 @@ MODULE mo_math_utilities ! C++ binding for tdma_solver_vec INTERFACE - SUBROUTINE tdma_solver_vec(a, b, c, d, slev, elev, startidx, endidx, nrows, ncols, varout, opt_acc_queue) & - BIND(C, NAME="tdma_solver_vec") - IMPORT :: C_DOUBLE, C_INT - REAL(C_DOUBLE), INTENT(IN) :: a(*), b(*), c(*), d(*) - INTEGER(C_INT), VALUE :: slev, elev, startidx, endidx, nrows, ncols - REAL(C_DOUBLE), INTENT(OUT) :: varout(*) - INTEGER(C_INT), OPTIONAL :: opt_acc_queue + SUBROUTINE tdma_solver_vec(a, b, c, d, slev, elev, startidx, endidx, nrows, ncols, varout, opt_acc_queue) & + BIND(C, NAME="tdma_solver_vec") + IMPORT :: c_double, c_int + REAL(c_double), INTENT(IN) :: a(*), b(*), c(*), d(*) + INTEGER(c_int), VALUE :: slev, elev, startidx, endidx, nrows, ncols + REAL(c_double), INTENT(OUT) :: varout(*) + INTEGER(c_int), OPTIONAL :: opt_acc_queue END SUBROUTINE tdma_solver_vec END INTERFACE diff --git a/test/fortran/test_math_utilities.F90 b/test/fortran/test_math_utilities.F90 index db8b824..07dcfb3 100644 --- a/test/fortran/test_math_utilities.F90 +++ b/test/fortran/test_math_utilities.F90 @@ -253,10 +253,10 @@ CONTAINS DO i = 1, n DO j = 1, n - a(i, j) = 1.0_wp*(i+j) - b(i, j) = 2.0_wp*(i+j) - c(i, j) = 1.0_wp*(i+j) - d(i, j) = 1.0_wp*(i+j) + a(i, j) = 1.0_wp*(i + j) + b(i, j) = 2.0_wp*(i + j) + c(i, j) = 1.0_wp*(i + j) + d(i, j) = 1.0_wp*(i + j) END DO END DO @@ -274,7 +274,7 @@ CONTAINS elapsed_time = end_time - start_time ! Output timing result - write(*,*) "Elapsed time for tdma_solver_vec: ", elapsed_time, " seconds" + WRITE (*, *) "Elapsed time for tdma_solver_vec: ", elapsed_time, " seconds" sum = 0.0_wp DO i = 1, n @@ -288,13 +288,13 @@ CONTAINS x = 0.0_wp #ifndef __USE_CPP_BINDINGS - CALL tdma_solver_vec(a, b, c, d, 2, n-1, 2, n-1, x) + CALL tdma_solver_vec(a, b, c, d, 2, n - 1, 2, n - 1, x) #else - CALL tdma_solver_vec(a, b, c, d, 1, n-1, 1, n-1, n, n, x, -1) + CALL tdma_solver_vec(a, b, c, d, 1, n - 1, 1, n - 1, n, n, x, -1) #endif sum = 0.0_wp - DO i = 2, n-1 - DO j = 2, n-1 + DO i = 2, n - 1 + DO j = 2, n - 1 sum = sum + x(i, j) END DO END DO -- GitLab