Merge pull request #405 from nelsonag/named_criticals

Named OpenMP Critical Regions
This commit is contained in:
Paul Romano 2015-07-02 09:01:20 +07:00
commit ed0ae08e05
3 changed files with 8 additions and 8 deletions

View file

@ -38,7 +38,7 @@ contains
filename = trim(filename) // '.binary'
#endif
!$omp critical
!$omp critical (write_particle_restart)
! Create file
call pr % file_create(filename)
@ -66,7 +66,7 @@ contains
! Close file
call pr % file_close()
!$omp end critical
!$omp end critical (write_particle_restart)
end subroutine write_particle_restart

View file

@ -470,13 +470,13 @@ contains
num_nm = 2 * n + 1
! multiply score by the angular flux moments and store
!$omp critical
!$omp critical (score_general_scatt_yn)
t % results(score_index: score_index + num_nm - 1, filter_index) &
% value = t &
% results(score_index: score_index + num_nm - 1, filter_index)&
% value &
+ score * calc_pn(n, p % mu) * calc_rn(n, p % last_uvw)
!$omp end critical
!$omp end critical (score_general_scatt_yn)
end do
i = i + (t % moment_order(i) + 1)**2 - 1
@ -498,13 +498,13 @@ contains
num_nm = 2 * n + 1
! multiply score by the angular flux moments and store
!$omp critical
!$omp critical (score_general_flux_tot_yn)
t % results(score_index: score_index + num_nm - 1, filter_index) &
% value = t &
% results(score_index: score_index + num_nm - 1, filter_index)&
% value &
+ score * calc_rn(n, uvw)
!$omp end critical
!$omp end critical (score_general_flux_tot_yn)
end do
i = i + (t % moment_order(i) + 1)**2 - 1

View file

@ -69,12 +69,12 @@ contains
// '_' // trim(to_str(current_gen)) // '_' // trim(to_str(p % id)) &
// '.binary'
#endif
!$omp critical
!$omp critical (finalize_particle_track)
call binout % file_create(fname)
length = [3, n_tracks]
call binout % write_data(coords, 'coordinates', length=length)
call binout % file_close()
!$omp end critical
!$omp end critical (finalize_particle_track)
deallocate(coords)
end subroutine finalize_particle_track