Added <output> tag in settings.xml and suppressed summary and cross_sections.out.

This commit is contained in:
Paul Romano 2012-08-23 18:10:32 -04:00
parent d46b466411
commit 9a44ac63b2
6 changed files with 49 additions and 22 deletions

View file

@ -57,7 +57,7 @@ contains
! READ ALL ACE CROSS SECTION TABLES
! display header in summary.out
if (master) call header("CROSS SECTION TABLES", unit=UNIT_XS)
if (master .and. output_xs) call header("CROSS SECTION TABLES", unit=UNIT_XS)
call dict_create(already_read)
@ -83,7 +83,7 @@ contains
call read_ace_table(i_nuclide, i_listing)
! Print out information on table to cross_sections.out file
if (master) call print_nuclide(nuc, unit=UNIT_XS)
if (master .and. output_xs) call print_nuclide(nuc, unit=UNIT_XS)
call dict_add_key(already_read, name, 0)
call dict_add_key(already_read, alias, 0)
@ -103,7 +103,7 @@ contains
! Print out information on table to cross_sections.out file
sab => sab_tables(i_sab)
if (master) call print_sab_table(sab, unit=UNIT_XS)
if (master .and. output_xs) call print_sab_table(sab, unit=UNIT_XS)
call dict_add_key(already_read, name, 0)
end if

View file

@ -255,6 +255,10 @@ module global
integer :: n_state_points = 0
integer, allocatable :: statepoint_batch(:)
! Various output options
logical :: output_summary = .false.
logical :: output_xs = .false.
contains
!===============================================================================

View file

@ -58,10 +58,6 @@ contains
call read_command_line()
if (master) then
! Create output files
call create_summary_file()
call create_xs_summary_file()
#ifdef HDF5
! Open HDF5 output file for writing and write header information
call hdf5_create_output()
@ -79,6 +75,12 @@ contains
! Read XML input files
call read_input_xml()
! Create output files
if (master) then
if (output_summary) call create_summary_file()
if (output_xs) call create_xs_summary_file()
end if
! Initialize random number generator
call initialize_prng()
@ -135,10 +137,10 @@ contains
! stop timer for initialization
if (master) then
if (run_mode == MODE_PLOTTING) then
call print_geometry()
if (output_summary) call print_geometry()
call print_plot()
else
call print_summary()
if (output_summary) call print_summary()
#ifdef HDF5
call hdf5_write_summary()
#endif

View file

@ -52,6 +52,9 @@ contains
character(MAX_WORD_LEN) :: type
character(MAX_LINE_LEN) :: filename
integer :: n_words ! number of words read
character(MAX_WORD_LEN) :: words(MAX_WORDS)
! Display output message
message = "Reading settings XML file..."
call write_message(5)
@ -70,6 +73,7 @@ contains
energy_grid_ = "union"
seed_ = 0_8
no_reduce_ = ""
output_ = ""
source_ % file = ''
source_ % space % type = ''
source_ % angle % type = ''
@ -501,6 +505,20 @@ contains
! uncertainties rather than standard deviations
if (trim(confidence_intervals_) == 'on') confidence_intervals = .true.
! Check for output options
if (len_trim(output_) > 0) then
call split_string(output_, words, n_words)
do i = 1, n_words
call lower_case(words(i))
select case (words(i))
case ('summary')
output_summary = .true.
case ('cross_sections')
output_xs = .true.
end select
end do
end if
end subroutine read_settings_xml
!===============================================================================

View file

@ -63,24 +63,26 @@ contains
trim(date_), trim(time_)
! Write information to summary file
call header("OpenMC Monte Carlo Code", unit=UNIT_SUMMARY, level=1)
write(UNIT=UNIT_SUMMARY, FMT=*) &
"Copyright: 2011-2012 Massachusetts Institute of Technology"
write(UNIT=UNIT_SUMMARY, FMT='(1X,A,7X,2(I1,"."),I1)') &
"Version:", VERSION_MAJOR, VERSION_MINOR, VERSION_RELEASE
if (output_summary) then
call header("OpenMC Monte Carlo Code", unit=UNIT_SUMMARY, level=1)
write(UNIT=UNIT_SUMMARY, FMT=*) &
"Copyright: 2011-2012 Massachusetts Institute of Technology"
write(UNIT=UNIT_SUMMARY, FMT='(1X,A,7X,2(I1,"."),I1)') &
"Version:", VERSION_MAJOR, VERSION_MINOR, VERSION_RELEASE
#ifdef GIT_SHA1
write(UNIT=UNIT_SUMMARY, FMT='(1X,"Git SHA1:",6X,A)') GIT_SHA1
write(UNIT=UNIT_SUMMARY, FMT='(1X,"Git SHA1:",6X,A)') GIT_SHA1
#endif
write(UNIT=UNIT_SUMMARY, FMT='(1X,"Date/Time:",5X,A,1X,A)') &
trim(date_), trim(time_)
write(UNIT=UNIT_SUMMARY, FMT='(1X,"Date/Time:",5X,A,1X,A)') &
trim(date_), trim(time_)
! Write information on number of processors
! Write information on number of processors
#ifdef MPI
write(UNIT=OUTPUT_UNIT, FMT='(1X,A)') ' MPI Processes: ' // &
trim(to_str(n_procs))
write(UNIT=UNIT_SUMMARY, FMT='(1X,"MPI Processes:",1X,A)') &
trim(to_str(n_procs))
write(UNIT=OUTPUT_UNIT, FMT='(1X,A)') ' MPI Processes: ' // &
trim(to_str(n_procs))
write(UNIT=UNIT_SUMMARY, FMT='(1X,"MPI Processes:",1X,A)') &
trim(to_str(n_procs))
#endif
end if
end subroutine title

View file

@ -49,6 +49,7 @@
<variable name="entropy_" tag="entropy" type="mesh_xml" dimension="1" />
<variable name="fixed_source_" tag="fixed_source" type="run_parameters_xml" />
<variable name="no_reduce_" tag="no_reduce" type="word" length="3" />
<variable name="output_" tag="output" type="word" length="250" />
<variable name="ptables_" tag="ptables" type="word" length="3" />
<variable name="seed_" tag="seed" type="integer" />
<variable name="source_" tag="source" type="source_xml" />