[cig-commits] [commit] devel, master: Remove err_occurred function and commented code. (88864c7)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 6 08:20:17 PST 2014


Repository : https://github.com/geodynamics/specfem3d_globe

On branches: devel,master
Link       : https://github.com/geodynamics/specfem3d_globe/compare/bc58e579b3b0838a0968725a076f5904845437ca...be63f20cbb6f462104e949894dbe205d2398cd7f

>---------------------------------------------------------------

commit 88864c78e64acfd952c27ff50a1c425ebdbd58ee
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date:   Sun Jun 1 02:41:06 2014 -0400

    Remove err_occurred function and commented code.
    
    All the parameter reading subroutines report errors through an argument,
    so this function does nothing. The variable it returns is never assigned
    the errors anyway.


>---------------------------------------------------------------

88864c78e64acfd952c27ff50a1c425ebdbd58ee
 src/shared/read_parameter_file.f90   |  6 ---
 src/shared/read_value_parameters.f90 | 71 ------------------------------------
 2 files changed, 77 deletions(-)

diff --git a/src/shared/read_parameter_file.f90 b/src/shared/read_parameter_file.f90
index 37d4ee4..b8b34fd 100644
--- a/src/shared/read_parameter_file.f90
+++ b/src/shared/read_parameter_file.f90
@@ -42,7 +42,6 @@
 
 ! local variables
   integer :: ierr
-  integer, external :: err_occurred
 
   ! sets the base pathname for output files
   OUTPUT_FILES = 'OUTPUT_FILES'
@@ -258,11 +257,6 @@
   ! closes parameter file
   call close_parameter_file()
 
-  ! checks
-  if(err_occurred() /= 0) then
-    stop 'an error occurred while reading the parameter file'
-  endif
-
   ! ignore EXACT_MASS_MATRIX_FOR_ROTATION if rotation is not included in the simulations
   if(.not. ROTATION) EXACT_MASS_MATRIX_FOR_ROTATION = .false.
 
diff --git a/src/shared/read_value_parameters.f90 b/src/shared/read_value_parameters.f90
index f0ce0cf..3ae16a1 100644
--- a/src/shared/read_value_parameters.f90
+++ b/src/shared/read_value_parameters.f90
@@ -113,74 +113,3 @@
   call param_close()
 
   end subroutine close_parameter_file
-
-
-!--------------------
-
-  integer function err_occurred()
-
-  integer ierr
-  common /param_err_common/ ierr
-
-  err_occurred = ierr
-
-  end function err_occurred
-
-!--------------------
-
-  subroutine read_value_clear_err()
-
-  integer ierr
-  common /param_err_common/ ierr
-
-  ierr = 0
-
-  end subroutine read_value_clear_err
-
-!--------------------
-
-!
-! unused routines:
-!
-
-!  subroutine read_next_line(string_read)
-!
-!  use constants
-!  implicit none
-!
-!  character(len=100) string_read
-!
-!  integer index_equal_sign,ios
-!
-!  do
-!    read(unit=IIN,fmt="(a100)",iostat=ios) string_read
-!    if(ios /= 0) stop 'error while reading parameter file'
-!
-!! suppress leading white spaces, if any
-!    string_read = adjustl(string_read)
-!
-!! suppress trailing carriage return (ASCII code 13) if any (e.g. if input text file coming from Windows/DOS)
-!    if(index(string_read,achar(13)) > 0) string_read = string_read(1:index(string_read,achar(13))-1)
-!
-!! exit loop when we find the first line that is not a comment or a white line
-!    if(len_trim(string_read) == 0) cycle
-!    if(string_read(1:1) /= '#') exit
-!
-!  enddo
-!
-!! suppress trailing white spaces, if any
-!  string_read = string_read(1:len_trim(string_read))
-!
-!! suppress trailing comments, if any
-!  if(index(string_read,'#') > 0) string_read = string_read(1:index(string_read,'#')-1)
-!
-!! suppress leading junk (up to the first equal sign, included)
-!  index_equal_sign = index(string_read,'=')
-!  if(index_equal_sign <= 1 .or. index_equal_sign == len_trim(string_read)) stop 'incorrect syntax detected in DATA/Par_file'
-!  string_read = string_read(index_equal_sign + 1:len_trim(string_read))
-!
-!! suppress leading and trailing white spaces again, if any, after having suppressed the leading junk
-!  string_read = adjustl(string_read)
-!  string_read = string_read(1:len_trim(string_read))
-!
-!  end subroutine read_next_line



More information about the CIG-COMMITS mailing list