From fc6a148222c753c1bc83df12ea2d735ef9c9aaf2 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 20 Jan 2012 11:58:47 -0500 Subject: [PATCH 1/3] Minor fix in output for print_particle. --- src/output.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/output.F90 b/src/output.F90 index 0bcd7bd579..619f33bf2d 100644 --- a/src/output.F90 +++ b/src/output.F90 @@ -251,8 +251,8 @@ contains end if ! Print local coordinates - write(ou,'(1X,A,3ES11.4)') ' xyz = ', coord % xyz - write(ou,'(1X,A,3ES11.4)') ' uvw = ', coord % uvw + write(ou,'(1X,A,3ES12.4)') ' xyz = ', coord % xyz + write(ou,'(1X,A,3ES12.4)') ' uvw = ', coord % uvw coord => coord % next i = i + 1 From 3cca15286d4659b8dde059b09979306f466698ed Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 20 Jan 2012 11:59:04 -0500 Subject: [PATCH 2/3] Fixed bug in build_universe. --- src/initialize.F90 | 1 - 1 file changed, 1 deletion(-) diff --git a/src/initialize.F90 b/src/initialize.F90 index acb585c192..f2a5e188d1 100644 --- a/src/initialize.F90 +++ b/src/initialize.F90 @@ -596,7 +596,6 @@ contains lat => lattices(c % fill) do x = 1, lat % n_x do y = 1, lat % n_y - lat => lattices(cells(i_cell) % fill) universe_num = lat % element(x,y) if (.not. dict_has_key(build_dict, universe_num)) then call dict_add_key(build_dict, universe_num, 0) From 089c19de36994e30522abbf56634ebd1bfe14406 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 20 Jan 2012 12:42:31 -0500 Subject: [PATCH 3/3] Added criticality information to HDF5 output. --- src/hdf5_interface.F90 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/hdf5_interface.F90 b/src/hdf5_interface.F90 index 6ce0f01c40..1c61d184d9 100644 --- a/src/hdf5_interface.F90 +++ b/src/hdf5_interface.F90 @@ -65,6 +65,32 @@ contains call h5ltset_attribute_string_f(hdf5_output_file, "n_procs", & "description", "Number of MPI processes", error) + ! Write criticality information + if (problem_type == PROB_CRITICALITY) then + ! Need to write integer(8)'s using double instead since there is no H5LT + ! call for making a dataset of type long + call h5ltmake_dataset_double_f(hdf5_output_file, "n_particles", & + rank, dims, (/ real(n_particles,8) /), error) + + ! Use H5LT interface to write n_cycles, n_inactive, and n_active + call h5ltmake_dataset_int_f(hdf5_output_file, "n_cycles", & + rank, dims, (/ n_cycles /), error) + call h5ltmake_dataset_int_f(hdf5_output_file, "n_inactive", & + rank, dims, (/ n_inactive /), error) + call h5ltmake_dataset_int_f(hdf5_output_file, "n_active", & + rank, dims, (/ n_cycles - n_inactive /), error) + + ! Add description of each variable + call h5ltset_attribute_string_f(hdf5_output_file, "n_particles", & + "description", "Number of particles per cycle", error) + call h5ltset_attribute_string_f(hdf5_output_file, "n_cycles", & + "description", "Total number of cycles", error) + call h5ltset_attribute_string_f(hdf5_output_file, "n_inactive", & + "description", "Number of inactive cycles", error) + call h5ltset_attribute_string_f(hdf5_output_file, "n_active", & + "description", "Number of active cycles", error) + end if + end subroutine hdf5_write_summary !=============================================================================== @@ -77,6 +103,8 @@ contains integer :: rank = 1 integer(HSIZE_T) :: dims(1) = (/1/) integer(HID_T) :: timing_group + integer(8) :: total_particles + real(8) :: speed ! Create group for timing call h5gcreate_f(hdf5_output_file, "/timing", timing_group, error) @@ -133,6 +161,12 @@ contains call h5ltset_attribute_string_f(timing_group, "time_total", & "description", "Total time elapsed (s)", error) + ! Write calculation rate + total_particles = n_particles * n_cycles + speed = real(total_particles) / time_compute % elapsed + call h5ltmake_dataset_double_f(timing_group, "neutrons_per_second", & + rank, dims, (/ speed /), error) + ! Close timing group call h5gclose_f(timing_group, error)