From b52f340e933efe66886918222cc6428149215845 Mon Sep 17 00:00:00 2001 From: Helen Kershaw Date: Fri, 5 Jan 2024 12:22:14 -0700 Subject: [PATCH] fix: fortran standard L needs a length nag compiler #615 --- assimilation_code/modules/utilities/assert_mod.f90 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/assimilation_code/modules/utilities/assert_mod.f90 b/assimilation_code/modules/utilities/assert_mod.f90 index 4f9f76334c..d4e3f93643 100644 --- a/assimilation_code/modules/utilities/assert_mod.f90 +++ b/assimilation_code/modules/utilities/assert_mod.f90 @@ -6,6 +6,8 @@ !> Aim: collection of assertions for use in test code module assert_mod +use types_mod, only : r8, r4, i8 + implicit none public @@ -37,7 +39,7 @@ module assert_mod !------------------------------- subroutine assert_equal_real(a, b, message) -real, intent(in) :: a, b +real(r4), intent(in) :: a, b character(len=*), intent(in) :: message if (a /= b) print*, 'FAIL: ', trim(message),' assertion ', a, '==', b, 'failed' @@ -67,7 +69,7 @@ end subroutine assert_equal_int !------------------------------- subroutine assert_equal_int8(a, b, message) -integer*8, intent(in) :: a, b +integer(i8), intent(in) :: a, b character(len=*), intent(in) :: message if (a /= b) print*, 'FAIL: ', trim(message),' assertion ', a, '==', b, 'failed' @@ -142,7 +144,7 @@ subroutine assert_equal_logical_array(a, b, message) if (size(a) < 100) then do i = 1,size(a) - write(*,'('' element('',i3,'') '',L,'' ?==? '',L)')i, a(i), b(i) + write(*,'('' element('',i3,'') '',L1,'' ?==? '',L1)')i, a(i), b(i) enddo else print*, 'arrays too long to concisely specify where/how failed.'