From 1840ff9aa397e67077ca58818da1cb35b27b8935 Mon Sep 17 00:00:00 2001 From: Vincent Vanlaer Date: Thu, 8 Aug 2024 12:38:42 -0400 Subject: [PATCH 1/2] mtx: fix intermediate single precision complex number --- mtx/public/mtx_dble_decsol.dek | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mtx/public/mtx_dble_decsol.dek b/mtx/public/mtx_dble_decsol.dek index 5dc71bc6c..220af9254 100644 --- a/mtx/public/mtx_dble_decsol.dek +++ b/mtx/public/mtx_dble_decsol.dek @@ -128,7 +128,7 @@ do j=1,n do i=1,ndim - a(i,j) = cmplx(ar(i,j),ai(i,j)) + a(i,j) = cmplx(ar(i,j),ai(i,j), kind=dp) end do end do call zgetrf(n, n, a, ndim, ip, ier) @@ -168,7 +168,7 @@ do j=1,n do i=1,ndim - a(i,j) = cmplx(ar(i,j),ai(i,j)) + a(i,j) = cmplx(ar(i,j),ai(i,j), kind=dp) end do end do call zgbtrf(n, n, ml, mu, a, ndim, ip, ier) @@ -208,9 +208,9 @@ do j=1,n do i=1,ndim - a(i,j) = cmplx(ar(i,j),ai(i,j)) + a(i,j) = cmplx(ar(i,j),ai(i,j), kind=dp) end do - b(j) = cmplx(br(j),bi(j)) + b(j) = cmplx(br(j),bi(j), kind=dp) end do call zgetrs('N', n, 1, a, ndim, ip, b, n, ier) do j=1,n @@ -249,9 +249,9 @@ do j=1,n do i=1,ndim - a(i,j) = cmplx(ar(i,j),ai(i,j)) + a(i,j) = cmplx(ar(i,j),ai(i,j), kind=dp) end do - b(j) = cmplx(br(j),bi(j)) + b(j) = cmplx(br(j),bi(j), kind=dp) end do call zgbtrs('N', n, ml, mu, 1, a, ndim, ip, b, n, ier) do j=1,n From 5919c82d98eb8d2c5bf1fc79d4616638e2355077 Mon Sep 17 00:00:00 2001 From: Vincent Vanlaer Date: Thu, 8 Aug 2024 12:39:03 -0400 Subject: [PATCH 2/2] mtx: make float -> int conversions explicit --- mtx/private/bcyclic.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mtx/private/bcyclic.f90 b/mtx/private/bcyclic.f90 index 3d93f4bfa..e53aed033 100644 --- a/mtx/private/bcyclic.f90 +++ b/mtx/private/bcyclic.f90 @@ -315,7 +315,7 @@ subroutine cycle_onestep( & if (odd_storage(nlevel)% ul_size < min_sz) then if (odd_storage(nlevel)% ul_size > 0) & deallocate(odd_storage(nlevel)% umat1, odd_storage(nlevel)% lmat1) - new_sz = min_sz*1.1 + 100 + new_sz = FLOOR(min_sz*1.1) + 100 odd_storage(nlevel)% ul_size = new_sz allocate (odd_storage(nlevel)% umat1(new_sz), & odd_storage(nlevel)% lmat1(new_sz), stat=ierr)