Merge remote-tracking branch 'upstream/develop' into harmonics

This commit is contained in:
Adam Nelson 2014-06-02 20:54:21 -04:00
commit fd65a89ace
78 changed files with 549 additions and 410 deletions

View file

@ -79,14 +79,6 @@ with the :envvar:`CROSS_SECTIONS` environment variable. It is recommended to add
a line in your ``.profile`` or ``.bash_profile`` setting the
:envvar:`CROSS_SECTIONS` environment variable.
ERROR: Invalid usage of L(I) in ACE data; Consider using more recent data set.
******************************************************************************
The cross-sections requested in ``materials.xml`` do not conform to the current
standard format. This typically happens with fissionable nuclides in a ``.6*c``
library as distributed with MCNP. Please try a newer library such as any from
the ``.7*c`` set.
Geometry Debugging
******************

View file

@ -789,14 +789,19 @@ contains
! read angular distribution -- currently this does not actually parse the
! angular distribution tables for each incoming energy, that must be done
! on-the-fly
LC = rxn % adist % location(1)
XSS_index = JXS9 + abs(LC) - 1
XSS_index = JXS9 + LOCB + 2 * NE
rxn % adist % data = get_real(length)
! change location pointers since they are currently relative to JXS(9)
LC = abs(rxn % adist % location(1))
rxn % adist % location = abs(rxn % adist % location) - LC
LC = LOCB + 2 * NE + 1
do j = 1, NE
! For consistency, leave location as 0 if type is isotropic.
! This is not necessary for current correctness, but can avoid
! future issues
if (rxn % adist % location(j) /= 0) then
rxn % adist % location(j) = abs(rxn % adist % location(j)) - LC
end if
end do
end do
end subroutine read_angular_dist
@ -967,24 +972,23 @@ contains
! Continuous tabular distribution
NR = int(XSS(lc + 1))
NE = int(XSS(lc + 2 + 2*NR))
! Before progressing, check to see if data set uses L(I) values
! in a way inconsistent with the current form of the ACE Format Guide
! (MCNP5 Manual, Vol 3)
allocate(L(NE))
L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1))
do i = 1,NE
! Now check to see if L(i) is equal to any other entries
! If so, then we must exit
if (count(L == L(i)) > 1) then
message = "Invalid usage of L(I) in ACE data; &
&Consider using more recent data set."
call fatal_error()
end if
end do
deallocate(L)
! Continue with finding data length
length = length + 2 + 2*NR + 2*NE
do i = 1,NE
! Some older data sets use the same LDAT for multiple Ein tables.
! If this is the case, we should skip incrementing length when it is
! not needed.
if (i < NE) then
if (any(L(i) == L(i + 1: NE))) then
! adjust location for this block
j = lc + 2 + 2*NR + NE + i
XSS(j) = XSS(j) - LOCC - lid
cycle
end if
end if
! determine length
NP = int(XSS(lc + length + 2))
length = length + 2 + 3*NP
@ -993,6 +997,7 @@ contains
j = lc + 2 + 2*NR + NE + i
XSS(j) = XSS(j) - LOCC - lid
end do
deallocate(L)
case (5)
! General evaporation spectrum
@ -1025,24 +1030,23 @@ contains
! Kalbach-Mann correlated scattering
NR = int(XSS(lc + 1))
NE = int(XSS(lc + 2 + 2*NR))
! Before progressing, check to see if data set uses L(I) values
! in a way inconsistent with the current form of the ACE Format Guide
! (MCNP5 Manual, Vol 3)
allocate(L(NE))
L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1))
do i = 1,NE
! Now check to see if L(i) is equal to any other entries
! If so, then we must exit
if (count(L == L(i)) > 1) then
message = "Invalid usage of L(I) in ACE data; &
&Consider using more recent data set."
call fatal_error()
end if
end do
deallocate(L)
! Continue with finding data length
length = length + 2 + 2*NR + 2*NE
do i = 1,NE
! Some older data sets use the same LDAT for multiple Ein tables.
! If this is the case, we should skip incrementing length when it is
! not needed.
if (i < NE) then
if (any(L(i) == L(i + 1: NE))) then
! adjust location for this block
j = lc + 2 + 2*NR + NE + i
XSS(j) = XSS(j) - LOCC - lid
cycle
end if
end if
NP = int(XSS(lc + length + 2))
length = length + 2 + 5*NP
@ -1050,29 +1054,30 @@ contains
j = lc + 2 + 2*NR + NE + i
XSS(j) = XSS(j) - LOCC - lid
end do
deallocate(L)
case (61)
! Correlated energy and angle distribution
NR = int(XSS(lc + 1))
NE = int(XSS(lc + 2 + 2*NR))
! Before progressing, check to see if data set uses L(I) values
! in a way inconsistent with the current form of the ACE Format Guide
! (MCNP5 Manual, Vol 3)
allocate(L(NE))
L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1))
do i = 1,NE
! Now check to see if L(i) is equal to any other entries
! If so, then we must exit
if (count(L == L(i)) > 1) then
message = "Invalid usage of L(I) in ACE data; &
&Consider using more recent data set."
call fatal_error()
end if
end do
deallocate(L)
! Continue with finding data length
length = length + 2 + 2*NR + 2*NE
do i = 1,NE
! Some older data sets use the same LDAT for multiple Ein tables.
! If this is the case, we should skip incrementing length when it is
! not needed.
if (i < NE) then
if (any(L(i) == L(i + 1: NE))) then
! adjust locators for energy distribution
j = lc + 2 + 2*NR + NE + i
XSS(j) = XSS(j) - LOCC - lid
cycle
end if
end if
! outgoing energy distribution
NP = int(XSS(lc + length + 2))
@ -1094,7 +1099,7 @@ contains
j = lc + 2 + 2*NR + NE + i
XSS(j) = XSS(j) - LOCC - lid
end do
deallocate(L)
case (66)
! N-body phase space distribution
length = 2
@ -1108,15 +1113,7 @@ contains
! (MCNP5 Manual, Vol 3)
allocate(L(NE))
L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1))
do i = 1,NE
! Now check to see if L(i) is equal to any other entries
! If so, then we must exit
if (count(L == L(i)) > 1) then
message = "Invalid usage of L(I) in ACE data; &
&Consider using more recent data set."
call fatal_error()
end if
end do
! Don't currently do anything with L
deallocate(L)
! Continue with finding data length
NMU = int(XSS(lc + 4 + 2*NR + 2*NE))

View file

@ -1165,7 +1165,7 @@ contains
! calculate cosine
mu0 = rxn % adist % data(lc + k)
mu1 = rxn % adist % data(lc + k+1)
mu = mu0 + (32.0_8 * xi - k) * (mu1 - mu0)
mu = mu0 + (32.0_8 * xi - k + ONE) * (mu1 - mu0)
elseif (type == ANGLE_TABULAR) then
interp = int(rxn % adist % data(lc + 1))

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -58,8 +58,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -59,8 +59,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -59,8 +59,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_created_output()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_created_output()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -52,7 +52,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -52,8 +52,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -63,9 +63,11 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_summary_exists()
test_cross_sections_exists()
test_statepoint_exists()
test_results()
teardown()
try:
test_run()
test_summary_exists()
test_cross_sections_exists()
test_statepoint_exists()
test_results()
finally:
teardown()

View file

@ -59,8 +59,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_restart()
test_results()
test_run_restart()
teardown()
try:
test_run()
test_created_restart()
test_results()
test_run_restart()
finally:
teardown()

View file

@ -37,6 +37,8 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_plot_exists()
teardown()
try:
test_run()
test_plot_exists()
finally:
teardown()

View file

@ -39,6 +39,8 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_plots_exists()
teardown()
try:
test_run()
test_plots_exists()
finally:
teardown()

View file

@ -37,6 +37,8 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_plot_exists()
teardown()
try:
test_run()
test_plot_exists()
finally:
teardown()

View file

@ -39,6 +39,8 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_plots_exists()
teardown()
try:
test_run()
test_plots_exists()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -74,7 +74,7 @@ def test_run2():
openmc_path = os.path.join(cwd, '../../src/openmc')
source = glob.glob(os.path.join(cwd, 'source.10.*'))
with open('settings.xml','w') as fh:
fh.write(settings2.format(source[0].split('.')[2]))
fh.write(settings2.format(source[0].split('.')[-1]))
if opts.mpi_exec != '':
proc = Popen([opts.mpi_exec, '-np', opts.mpi_np, opts.exe, cwd],
stderr=STDOUT, stdout=PIPE)
@ -109,8 +109,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run1()
test_statepoint_exists()
test_run2()
test_results()
teardown()
try:
test_run1()
test_statepoint_exists()
test_run2()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_statepoint_exists()
test_results()
teardown()
try:
test_run()
test_statepoint_exists()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_statepoint_exists()
test_results()
teardown()
try:
test_run()
test_statepoint_exists()
test_results()
finally:
teardown()

View file

@ -56,7 +56,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_statepoint_exists()
test_results()
teardown()
try:
test_run()
test_statepoint_exists()
test_results()
finally:
teardown()

View file

@ -133,16 +133,18 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
test_restart_form1()
test_created_statepoint_form1()
test_results_form1()
test_restart_form2()
test_created_statepoint_form2()
test_results_form2()
test_restart_serial()
test_created_statepoint_serial()
test_results_serial()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
test_restart_form1()
test_created_statepoint_form1()
test_results_form1()
test_restart_form2()
test_created_statepoint_form2()
test_results_form2()
test_restart_serial()
test_created_statepoint_serial()
test_results_serial()
finally:
teardown()

View file

@ -59,7 +59,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_statepoints_exist()
test_results()
teardown()
try:
test_run()
test_statepoints_exist()
test_results()
finally:
teardown()

View file

@ -68,7 +68,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_statepoints_exist()
test_results()
teardown()
try:
test_run()
test_statepoints_exist()
test_results()
finally:
teardown()

View file

@ -122,16 +122,18 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
test_restart_form1()
test_created_statepoint_form1()
test_results_form1()
test_restart_form2()
test_created_statepoint_form2()
test_results_form2()
test_restart_serial()
test_created_statepoint_serial()
test_results_serial()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
test_restart_form1()
test_created_statepoint_form1()
test_results_form1()
test_restart_form2()
test_created_statepoint_form2()
test_results_form2()
test_restart_serial()
test_created_statepoint_serial()
test_results_serial()
finally:
teardown()

View file

@ -56,7 +56,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_statepoint_exists()
test_results()
teardown()
try:
test_run()
test_statepoint_exists()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -55,8 +55,10 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_output_exists()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_output_exists()
test_results()
finally:
teardown()

View file

@ -53,7 +53,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -55,7 +55,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_outputs()
test_outputs()
teardown()
try:
test_run()
test_created_outputs()
test_outputs()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()

View file

@ -51,7 +51,9 @@ if __name__ == '__main__':
raise Exception('Must specify OpenMC executable from command line with --exe.')
# run tests
test_run()
test_created_statepoint()
test_results()
teardown()
try:
test_run()
test_created_statepoint()
test_results()
finally:
teardown()