radiasoft / zgoubi

Git repo for zgoubi source code
https://sourceforge.net/projects/zgoubi/
GNU General Public License v2.0
9 stars 3 forks source link

Introduce correctness checks with global error termination upon failure #73

Closed rouson closed 4 years ago

rouson commented 5 years ago

Employ the assertions utility constructed in an earlier SOW to ensure error stop halts all images when violations of the constraints implied by the procedures impacted by the parallelization.

Example: Before looping over an image's particle subset, assert that the sum of the number of particles in each subset equals the total number of particles in the simulation:

  integer num_particles, my_last, my_first
  num_particles = my_last - my_first + 1
  call co_sum(num_particles)
  call assert( assertion = (num_particles==ITMAX), description = "complete set")
  do IT = my_first, my_last
     ! ...
dtabell commented 4 years ago

The tests (under ctest) of the data partitioning include these checks.