[Dart-dev] DART/branches Revision: 12219

dart at ucar.edu dart at ucar.edu
Tue Dec 19 11:13:13 MST 2017


nancy at ucar.edu
2017-12-19 11:13:12 -0700 (Tue, 19 Dec 2017)
249
none of these tests were calling initialize or finalize
utilities.  but they were calling register_module, which
calls init, which calls register_module recursively.  

first, let's fix these tests.  a later fix to the 
utils module should follow.




Modified: DART/branches/rma_trunk/developer_tests/location/location_test.f90
===================================================================
--- DART/branches/rma_trunk/developer_tests/location/location_test.f90	2017-12-19 18:07:04 UTC (rev 12218)
+++ DART/branches/rma_trunk/developer_tests/location/location_test.f90	2017-12-19 18:13:12 UTC (rev 12219)
@@ -9,7 +9,8 @@
 ! Simple test program to exercise annulus location module.
 
 use     types_mod, only : r8
-use utilities_mod, only : open_file, close_file
+use utilities_mod, only : open_file, close_file, initialize_utilities, &
+                          finalize_utilities
 use  location_mod
 
 implicit none
@@ -25,6 +26,8 @@
 real(r8)            :: loc2_val, lon, lat
 character(len=102)  :: testbuf
 
+call initialize_utilities('location_test')
+
 print *, ''
 print *, 'reading in 6 locations to use in distance tests:'
 do i = 1, 6
@@ -169,6 +172,8 @@
 call close_file(iunit1)
 call close_file(iunit2)
 
+call finalize_utilities()
+
 end program location_test
 
 ! <next few lines under version control, do not edit>

Modified: DART/branches/rma_trunk/developer_tests/location/location_test2.f90
===================================================================
--- DART/branches/rma_trunk/developer_tests/location/location_test2.f90	2017-12-19 18:07:04 UTC (rev 12218)
+++ DART/branches/rma_trunk/developer_tests/location/location_test2.f90	2017-12-19 18:13:12 UTC (rev 12219)
@@ -10,7 +10,8 @@
 
 use location_mod
 use types_mod,     only : r8
-use utilities_mod, only : get_unit, error_handler, E_ERR
+use utilities_mod, only : get_unit, error_handler, E_ERR, &
+                          initialize_utilities, finalize_utilities
 
 implicit none
 
@@ -24,6 +25,8 @@
 integer  :: iunit, i
 real(r8) :: loc2_val
 
+call initialize_utilities('location_test2')
+
 ! Open an output file
 iunit = get_unit()
 open(iunit, file = 'location_test_file')
@@ -56,6 +59,8 @@
 
 close(iunit)
 
+call finalize_utilities()
+
 end program location_test2
 
 ! <next few lines under version control, do not edit>

Modified: DART/branches/rma_trunk/developer_tests/location/location_test3.f90
===================================================================
--- DART/branches/rma_trunk/developer_tests/location/location_test3.f90	2017-12-19 18:07:04 UTC (rev 12218)
+++ DART/branches/rma_trunk/developer_tests/location/location_test3.f90	2017-12-19 18:13:12 UTC (rev 12219)
@@ -10,7 +10,8 @@
 
 use location_mod
 use types_mod,      only : r8
-use utilities_mod,  only : get_unit, error_handler, E_ERR
+use utilities_mod,  only : get_unit, error_handler, E_ERR, &
+                           initialize_utilities, finalize_utilities
 use random_seq_mod, only : random_seq_type, init_random_seq, random_uniform
 
 
@@ -33,6 +34,7 @@
 character(len=100) :: buf
 
 
+call initialize_utilities('location_test3')
 
 ! Open an output file
 iunit = get_unit()
@@ -152,6 +154,8 @@
 
 close(iunit)
 
+call finalize_utilities()
+
 end program location_test3
 
 ! <next few lines under version control, do not edit>


More information about the Dart-dev mailing list