diff --git a/binary/private/binary_history.f90 b/binary/private/binary_history.f90 index 8d21fec9a..32515098f 100644 --- a/binary/private/binary_history.f90 +++ b/binary/private/binary_history.f90 @@ -753,7 +753,7 @@ subroutine binary_history_getval(b, c, val, int_val, is_int_val, ierr) end subroutine binary_history_getval - subroutine get_binary_history_specs(b, num, names, specs) + subroutine get_binary_history_specs(b, num, names, specs, report) use utils_lib use utils_def @@ -762,6 +762,7 @@ subroutine get_binary_history_specs(b, num, names, specs) integer, intent(in) :: num character (len = *), intent(in) :: names(:) integer, intent(out) :: specs(:) + logical, intent(in) :: report integer :: i, ierr, n, j, iounit, t character (len = strlen) :: buffer, string @@ -778,15 +779,16 @@ subroutine get_binary_history_specs(b, num, names, specs) j = 0 t = token(iounit, n, j, buffer, string) if (t /= name_token) then - if (len_trim(names(i)) > 0) & + if (len_trim(names(i)) > 0 .and. report) & write(*, *) 'bad value for name of history item ' // trim(names(i)) specs(i) = -1 ierr = 0 cycle end if specs(i) = do1_binary_history_spec(& - iounit, t, n, j, string, buffer, ierr) + iounit, t, n, j, string, buffer, report, ierr) if (ierr /= 0) then + if (report) write(*, *) 'get_binary_history_specs failed for ' // trim(names(i)) specs(i) = -1 ierr = 0 end if @@ -833,7 +835,7 @@ subroutine get_binary_history_values(b, num, specs, & end subroutine get_binary_history_values logical function get1_binary_hist_value(b, name, val) - ! includes other_history_columns from run_star_extras + ! includes other_history_columns from run_binary_extras use utils_lib, only : integer_dict_lookup type (binary_info), pointer :: b character (len = *) :: name diff --git a/binary/private/binary_history_specs.f90 b/binary/private/binary_history_specs.f90 index 297540bdf..5f9722d22 100644 --- a/binary/private/binary_history_specs.f90 +++ b/binary/private/binary_history_specs.f90 @@ -41,7 +41,7 @@ module binary_history_specs contains recursive subroutine add_binary_history_columns(& - b, level, capacity, spec, history_columns_file, ierr) + b, level, capacity, spec, history_columns_file, report, ierr) use utils_lib use utils_def use const_def, only : mesa_dir @@ -49,6 +49,7 @@ recursive subroutine add_binary_history_columns(& integer, intent(in) :: level integer, intent(inout) :: capacity integer, pointer :: spec(:) + logical, intent(in) :: report character (len = *), intent(in) :: history_columns_file integer, intent(out) :: ierr @@ -107,7 +108,7 @@ recursive subroutine add_binary_history_columns(& if (t /= string_token) then call error; return end if - call add_binary_history_columns(b, level + 1, capacity, spec, string, ierr) + call add_binary_history_columns(b, level + 1, capacity, spec, string, report, ierr) if (ierr /= 0) then write(*, *) 'failed for included log columns list ' // trim(string) bad_item = .true. @@ -116,7 +117,7 @@ recursive subroutine add_binary_history_columns(& cycle end if - nxt_spec = do1_binary_history_spec(iounit, t, n, i, string, buffer, ierr) + nxt_spec = do1_binary_history_spec(iounit, t, n, i, string, buffer, report, ierr) if (ierr /= 0) bad_item = .true. if (.not. bad_item) then call insert_spec(nxt_spec, string, ierr) @@ -190,13 +191,14 @@ end subroutine add_binary_history_columns integer function do1_binary_history_spec(& - iounit, t, n, i, string, buffer, ierr) result(spec) + iounit, t, n, i, string, buffer, report, ierr) result(spec) use utils_lib use utils_def use chem_lib integer :: iounit, t, n, i, j character (len = *) :: string, buffer + logical, intent(in) :: report integer, intent(out) :: ierr ierr = 0 @@ -209,15 +211,16 @@ integer function do1_binary_history_spec(& end if end do - write(*, *) 'bad history list name: ' // trim(string) + if (report) write(*, *) 'bad history list name: ' // trim(string) ierr = -1 end function do1_binary_history_spec - subroutine set_binary_history_columns(b, binary_history_columns_file, ierr) + subroutine set_binary_history_columns(b, binary_history_columns_file, report, ierr) use utils_lib, only : realloc_integer type(binary_info), pointer :: b character (len = *), intent(in) :: binary_history_columns_file + logical, intent(in) :: report integer, intent(out) :: ierr integer :: capacity, cnt, i logical, parameter :: dbg = .false. @@ -235,7 +238,7 @@ subroutine set_binary_history_columns(b, binary_history_columns_file, ierr) if (ierr /= 0) return b% binary_history_column_spec(:) = 0 call add_binary_history_columns(b, 1, capacity, & - b% binary_history_column_spec, binary_history_columns_file, ierr) + b% binary_history_column_spec, binary_history_columns_file, report, ierr) if (ierr /= 0) then if (associated(old_binary_history_column_spec)) & deallocate(old_binary_history_column_spec) diff --git a/binary/private/pgbinary_summary.f90 b/binary/private/pgbinary_summary.f90 index b040207b1..58d8d14f1 100644 --- a/binary/private/pgbinary_summary.f90 +++ b/binary/private/pgbinary_summary.f90 @@ -403,7 +403,7 @@ subroutine show_column(col, num_rows) real(dp) :: val call get_binary_history_specs(& - b, num_rows, Text_Summary_name(:, col), specs) + b, num_rows, Text_Summary_name(:, col), specs, .false.) call get_binary_history_values(& b, num_rows, specs, & is_int_value, int_values, values, failed_to_find_value) diff --git a/binary/private/run_binary_support.f90 b/binary/private/run_binary_support.f90 index d84f375d0..ef6a91c2f 100644 --- a/binary/private/run_binary_support.f90 +++ b/binary/private/run_binary_support.f90 @@ -290,7 +290,7 @@ end subroutine extras_binary_controls call binarydata_init(b, doing_restart) call binary_private_def_init call binary_history_column_names_init(ierr) - call set_binary_history_columns(b, b% job% binary_history_columns_file, ierr) + call set_binary_history_columns(b, b% job% binary_history_columns_file, .true., ierr) ! setup pgbinary if (.not. doing_restart) then