Commits

Harald Klimach committed e32ef97

Silence of gfortran 4.8 warnings and removed superfluous routine

Comments (0)

Files changed (4)

source/extdouble/aot_extdouble_vector_module.f90

   end subroutine get_table_extdouble_v
 
 
-  !> This routine obtains a vectorial quantity with fixed length from a Lua
-  !! global variable as a whole.
-  !!
-  !! It is intented to ease the reading of vectors on the Fortran side by
-  !! capsulating the parsing of the Lua table internally.
-  !! Components which are not found are filled with the data given in
-  !! the default vector. For each component an error code will be returned
-  !! to indicate the success when reading it.
-  !! If the vector is not defined at all, all components will be indicated
-  !! as non-existent.
-  !! Components, which are neither defined in the Lua script, nor in the
-  !! default will be marked with the aoterr_Fatal flag.
-  subroutine get_config_extdouble_v(val, ErrCode, L, key, default)
-    type(flu_State) :: L !< Handle to the lua script
-
-    !> Vector read from the Lua table.
-    real(kind=xdble_k), intent(out) :: val(:)
-
-    !> Error code describing problems encountered in each of the components.
-    !! This array has to have the same length as val.
-    integer, intent(out) :: ErrCode(:)
-
-    !> Name of the variable (vector) to read.
-    character(len=*), intent(in) :: key
-
-    !> A default vector to use, if no proper definition is found.
-    !! Components will be filled with the help of this default definition.
-    real(kind=xdble_k), intent(in), optional :: default(:)
-
-    ! Get the requeseted value from the provided table
-    call flu_getglobal(L, key)
-
-    call aot_top_get_val(val, ErrCode, L, default)
-  end subroutine get_config_extdouble_v
-
-
   subroutine get_top_extdouble_vvect(val, ErrCode, maxlength, L, default)
     type(flu_State) :: L !< Handle to the lua script
 

utests/aot_table_test.f90

 program aot_table_test
   use flu_binding, only: flu_State
 
-  use aot_kinds_module, only: double_k, long_k
   use aotus_module, only: open_config_file, close_config
   use aot_top_module, only: aoterr_Fatal, aoterr_NonExistent, aoterr_WrongType
   use aot_table_module, only: aot_table_open, aot_table_close, &

utests/aotus_test.f90

 program aotus_test
   use flu_binding, only: flu_State
 
-  use aot_kinds_module, only: double_k, long_k
+  use aot_kinds_module, only: long_k
   use aotus_module, only: open_config_file, close_config, aot_get_val
   use aot_top_module, only: aoterr_Fatal, aoterr_NonExistent, aoterr_WrongType
 
   ! Testing for global REAL
   write(*,*) ' * reading a global real'
   call aot_get_val(L = conf, key = 'real_test', &
-    &                 val = glob_real, ErrCode = iError)
+    &              val = glob_real, ErrCode = iError)
 
   if (btest(iError, aoterr_Fatal)) then
     write(*,*) '  : unexpected FATAL Error occured !!!'
       &   write(*,*) '  : Variable has wrong type!'
     passed = .false.
   else
-    if (glob_real == 0.5) then
+    if ((glob_real > 0.5*(1.0-epsilon(glob_real))) &
+      & .or. (glob_real < 0.5*(1.0+epsilon(glob_real)))) then
       write(*,*) '  : success.'
     else
       write(*,*) '  : unexpected ERROR, value mismatch, got: ', glob_real
   glob_log = .false.
   write(*,*) ' * reading a global logical'
   call aot_get_val(L = conf, key = 'log_test', &
-    &                 val = glob_log, ErrCode = iError)
+    &              val = glob_log, ErrCode = iError)
 
   if (btest(iError, aoterr_Fatal)) then
     write(*,*) '  : unexpected FATAL Error occured !!!'
   ! Testing for global STRING
   write(*,*) ' * reading a global string'
   call aot_get_val(L = conf, key = 'string_test', &
-    &                 val = glob_string, ErrCode = iError)
+    &              val = glob_string, ErrCode = iError)
 
   if (btest(iError, aoterr_Fatal)) then
     write(*,*) '  : unexpected FATAL Error occured !!!'

utests/quadruple/aot_quadruple_test.f90

       &   write(*,*) '  : Variable has wrong type!'
     passed = .false.
   else
-    if (glob_quad == 0.5_quad_k) then
+    if ((glob_quad > 0.5_quad_k*(1.0_quad_k-epsilon(glob_quad))) &
+      & .and. (glob_quad < 0.5_quad_k*(1.0_quad_k+epsilon(glob_quad)))) then
       write(*,*) '  : success.'
     else
       write(*,*) '  : unexpected ERROR, value mismatch, got: ', glob_quad
     if (btest(iError, aoterr_WrongType)) &
       &   write(*,*) '  : Variable has wrong type!'
   else
-    if (tab_quad /= 2.0_quad_k) then
+    if ((tab_quad < 2.0_quad_k*(1._quad_k-epsilon(tab_quad))) &
+      & .or. (tab_quad > 2.0_quad_k*(1._quad_k+epsilon(tab_quad)))) then
       write(*,*) '  : unexpected ERROR, value mismatch, got: ', tab_quad
       write(*,*) '  :                             should be: ', 2.0
       passed = .false.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.