Skip to content

Commit

Permalink
Added explicit messageType= optional argument name to log write state…
Browse files Browse the repository at this point in the history
…ments
  • Loading branch information
Adrian Turner committed Sep 29, 2017
1 parent 889a7d2 commit dee802e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/driver/mpas_subdriver.F
Original file line number Diff line number Diff line change
Expand Up @@ -206,36 +206,36 @@ end subroutine xml_stream_get_attributes

ierr = domain_ptr % core % setup_namelist(domain_ptr % configs, domain_ptr % namelist_filename, domain_ptr % dminfo)
if ( ierr /= 0 ) then
call mpas_log_write('Namelist setup failed for core '//trim(domain_ptr % core % coreName), MPAS_LOG_CRIT)
call mpas_log_write('Namelist setup failed for core '//trim(domain_ptr % core % coreName), messageType=MPAS_LOG_CRIT)
end if

call mpas_framework_init_phase2(domain_ptr)

ierr = domain_ptr % core % define_packages(domain_ptr % packages)
if ( ierr /= 0 ) then
call mpas_log_write('Package definition failed for core '//trim(domain_ptr % core % coreName), MPAS_LOG_CRIT)
call mpas_log_write('Package definition failed for core '//trim(domain_ptr % core % coreName), messageType=MPAS_LOG_CRIT)
end if

ierr = domain_ptr % core % setup_packages(domain_ptr % configs, domain_ptr % packages, domain_ptr % iocontext)
if ( ierr /= 0 ) then
call mpas_log_write('Package setup failed for core '//trim(domain_ptr % core % coreName), MPAS_LOG_CRIT)
call mpas_log_write('Package setup failed for core '//trim(domain_ptr % core % coreName), messageType=MPAS_LOG_CRIT)
end if

ierr = domain_ptr % core % setup_decompositions(domain_ptr % decompositions)
if ( ierr /= 0 ) then
call mpas_log_write('Decomposition setup failed for core '//trim(domain_ptr % core % coreName), MPAS_LOG_CRIT)
call mpas_log_write('Decomposition setup failed for core '//trim(domain_ptr % core % coreName), messageType=MPAS_LOG_CRIT)
end if

ierr = domain_ptr % core % setup_clock(domain_ptr % clock, domain_ptr % configs)
if ( ierr /= 0 ) then
call mpas_log_write('Clock setup failed for core '//trim(domain_ptr % core % coreName), MPAS_LOG_CRIT)
call mpas_log_write('Clock setup failed for core '//trim(domain_ptr % core % coreName), messageType=MPAS_LOG_CRIT)
end if

call mpas_log_write('Reading streams configuration from file '//trim(domain_ptr % streams_filename))
inquire(file=trim(domain_ptr % streams_filename), exist=streamsExists)

if ( .not. streamsExists ) then
call mpas_log_write('Streams file '//trim(domain_ptr % streams_filename)//' does not exist.', MPAS_LOG_CRIT)
call mpas_log_write('Streams file '//trim(domain_ptr % streams_filename)//' does not exist.', messageType=MPAS_LOG_CRIT)
end if

call mpas_timer_start('total time')
Expand All @@ -247,7 +247,7 @@ end subroutine xml_stream_get_attributes
!
ierr = domain_ptr % core % get_mesh_stream(domain_ptr % configs, mesh_stream)
if ( ierr /= 0 ) then
call mpas_log_write('Failed to find mesh stream for core '//trim(domain_ptr % core % coreName), MPAS_LOG_CRIT)
call mpas_log_write('Failed to find mesh stream for core '//trim(domain_ptr % core % coreName), messageType=MPAS_LOG_CRIT)
end if

call mpas_f_to_c_string(domain_ptr % streams_filename, c_filename)
Expand All @@ -257,7 +257,7 @@ end subroutine xml_stream_get_attributes
c_mesh_filename_temp, c_ref_time_temp, &
c_filename_interval_temp, c_iotype, c_ierr)
if (c_ierr /= 0) then
call mpas_log_write('stream xml get attribute failed: '//trim(domain_ptr % streams_filename), MPAS_LOG_CRIT)
call mpas_log_write('stream xml get attribute failed: '//trim(domain_ptr % streams_filename), messageType=MPAS_LOG_CRIT)
end if
call mpas_c_to_f_string(c_mesh_filename_temp, mesh_filename_temp)
call mpas_c_to_f_string(c_ref_time_temp, ref_time_temp)
Expand Down Expand Up @@ -302,13 +302,13 @@ end subroutine xml_stream_get_attributes

ierr = domain_ptr % core % setup_immutable_streams(domain_ptr % streamManager)
if ( ierr /= 0 ) then
call mpas_log_write('Immutable streams setup failed for core '//trim(domain_ptr % core % coreName), MPAS_LOG_CRIT)
call mpas_log_write('Immutable streams setup failed for core '//trim(domain_ptr % core % coreName), messageType=MPAS_LOG_CRIT)
end if

mgr_p = c_loc(domain_ptr % streamManager)
call xml_stream_parser(c_filename, mgr_p, c_comm, c_ierr)
if (c_ierr /= 0) then
call mpas_log_write('xml stream parser failed: '//trim(domain_ptr % streams_filename), MPAS_LOG_CRIT)
call mpas_log_write('xml stream parser failed: '//trim(domain_ptr % streams_filename), messageType=MPAS_LOG_CRIT)
end if

!
Expand All @@ -321,7 +321,7 @@ end subroutine xml_stream_get_attributes
!
iErr = domain_ptr % core % core_init(domain_ptr, timeStamp)
if ( ierr /= 0 ) then
call mpas_log_write('Core init failed for core '//trim(domain_ptr % core % coreName), MPAS_LOG_CRIT)
call mpas_log_write('Core init failed for core '//trim(domain_ptr % core % coreName), messageType=MPAS_LOG_CRIT)
end if

call mpas_timer_stop('initialize')
Expand All @@ -337,7 +337,7 @@ subroutine mpas_run()

iErr = domain_ptr % core % core_run(domain_ptr)
if ( iErr /= 0 ) then
call mpas_log_write('Core run failed for core '//trim(domain_ptr % core % coreName), MPAS_LOG_CRIT)
call mpas_log_write('Core run failed for core '//trim(domain_ptr % core % coreName), messageType=MPAS_LOG_CRIT)
end if

end subroutine mpas_run
Expand All @@ -358,7 +358,7 @@ subroutine mpas_finalize()
!
iErr = domain_ptr % core % core_finalize(domain_ptr)
if ( iErr /= 0 ) then
call mpas_log_write('Core finalize failed for core '//trim(domain_ptr % core % coreName), MPAS_LOG_CRIT)
call mpas_log_write('Core finalize failed for core '//trim(domain_ptr % core % coreName), messageType=MPAS_LOG_CRIT)
end if

call mpas_timer_stop('total time')
Expand Down

0 comments on commit dee802e

Please sign in to comment.