Make sure fixed source resample is reproducible for MPI runs

This commit is contained in:
Paul Romano 2016-06-29 18:51:26 +07:00
parent 70daa76e0e
commit 348eb44b6f
4 changed files with 11 additions and 11 deletions

View file

@ -275,8 +275,8 @@ contains
if (master .and. current_gen /= gen_per_batch) call print_generation()
elseif (run_mode == MODE_FIXEDSOURCE) then
! For fixed-source mode, we need to sample the external source
call set_particle_seed(overall_gen*n_particles)
do i = 1, work
call set_particle_seed(overall_gen*n_particles + work_index(rank) + i)
call sample_external_source(source_bank(i))
end do
end if

View file

@ -1,6 +1,6 @@
tally 1:
4.460676E+02
1.993197E+04
4.448476E+02
1.984373E+04
leakage:
9.660000E+00
9.335800E+00
9.790000E+00
9.588300E+00

View file

@ -1,16 +1,16 @@
current batch:
9.000000E+00
7.000000E+00
current gen:
1.000000E+00
particle id:
5.900000E+02
1.440000E+02
run mode:
fixed source
particle weight:
1.000000E+00
particle energy:
5.284635E+00
5.749729E+00
particle xyz:
4.995064E+00 7.895146E+00 1.198717E+00
8.754675E+00 2.551620E+00 4.394350E-01
particle uvw:
7.594252E-01 3.731736E-01 -5.329305E-01
-5.971721E-01 -4.845709E-01 6.391999E-01

View file

@ -7,5 +7,5 @@ from testing_harness import ParticleRestartTestHarness
if __name__ == '__main__':
harness = ParticleRestartTestHarness('particle_9_590.h5')
harness = ParticleRestartTestHarness('particle_7_144.h5')
harness.main()