mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fixed null pointer on rxn%MT in sample_reaction. Miscellaneous changes for PGI compiler.
This commit is contained in:
parent
d4fc0b7b27
commit
1c4c072826
4 changed files with 22 additions and 17 deletions
|
|
@ -64,9 +64,12 @@ contains
|
|||
write(eu,*)
|
||||
end if
|
||||
|
||||
! All processors abort
|
||||
! Release memory from all allocatable arrays
|
||||
call free_memory()
|
||||
|
||||
! Abort program
|
||||
stop
|
||||
|
||||
end subroutine fatal_error
|
||||
|
||||
end module error
|
||||
|
|
|
|||
|
|
@ -196,9 +196,6 @@ contains
|
|||
call MPI_FINALIZE(ierr)
|
||||
#endif
|
||||
|
||||
! End program
|
||||
stop
|
||||
|
||||
end subroutine free_memory
|
||||
|
||||
end module global
|
||||
|
|
|
|||
|
|
@ -763,17 +763,18 @@ contains
|
|||
|
||||
subroutine print_runtime()
|
||||
|
||||
integer(8) :: total_particles
|
||||
real(8) :: speed
|
||||
integer(8) :: total_particles
|
||||
real(8) :: speed
|
||||
character(15) :: string
|
||||
|
||||
! display header block
|
||||
call header("Time Elapsed")
|
||||
|
||||
! display time elapsed for various sections
|
||||
write(ou,100) "Total time elapsed", trim(real_to_str(time_total % elapsed))
|
||||
write(ou,100) "Total time for initialization", trim(real_to_str(time_init % elapsed))
|
||||
write(ou,100) "Total time in computation", trim(real_to_str(time_compute % elapsed))
|
||||
write(ou,100) "Total time between cycles", trim(real_to_str(time_intercycle % elapsed))
|
||||
write(ou,100) "Total time elapsed", time_total % elapsed
|
||||
write(ou,100) "Total time for initialization", time_init % elapsed
|
||||
write(ou,100) "Total time in computation", time_compute % elapsed
|
||||
write(ou,100) "Total time between cycles", time_intercycle % elapsed
|
||||
|
||||
! display header block
|
||||
call header("Run Statistics")
|
||||
|
|
@ -781,14 +782,15 @@ contains
|
|||
! display calculate rate and final keff
|
||||
total_particles = n_particles * n_cycles
|
||||
speed = real(total_particles) / time_compute % elapsed
|
||||
write(ou,101) "Calculation Rate", trim(real_to_str(speed))
|
||||
write(ou,102) "Final Keff", trim(real_to_str(keff)), trim(real_to_str(keff_std))
|
||||
string = real_to_str(speed)
|
||||
write(ou,101) "Calculation Rate", trim(string)
|
||||
write(ou,102) "Final Keff", keff, keff_std
|
||||
write(ou,*)
|
||||
|
||||
! format for write statements
|
||||
100 format (1X,A,T33,"= ",A," seconds")
|
||||
100 format (1X,A,T33,"= ",ES11.4," seconds")
|
||||
101 format (1X,A,T20,"= ",A," neutrons/second")
|
||||
102 format (1X,A,T20,"= ",A," +/- ",A)
|
||||
102 format (1X,A,T20,"= ",F8.5," +/- ",F8.5)
|
||||
|
||||
end subroutine print_runtime
|
||||
|
||||
|
|
|
|||
|
|
@ -621,8 +621,11 @@ contains
|
|||
|
||||
! Perform collision physics for elastic scattering
|
||||
call elastic_scatter(p, nuc, rxn)
|
||||
|
||||
end if
|
||||
|
||||
! Set MT to be returned
|
||||
MT = 2
|
||||
else
|
||||
! =======================================================================
|
||||
! INELASTIC SCATTERING
|
||||
|
|
@ -662,10 +665,10 @@ contains
|
|||
|
||||
! Perform collision physics for inelastics scattering
|
||||
call inelastic_scatter(p, nuc, rxn)
|
||||
end if
|
||||
|
||||
! Set MT to be returned
|
||||
MT = rxn % MT
|
||||
! Set MT to be returned
|
||||
MT = rxn % MT
|
||||
end if
|
||||
|
||||
end subroutine sample_reaction
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue