Closed stevengj closed 4 years ago
python/tests/fragment_stats.py
is failing:
Using MPI version 3.1, 2 processes
FF....FFFFFFFFF.F.......FFF.F........F....F.................
======================================================================
FAIL: test_1d (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 89, in test_1d
self._test_1d([])
File "./tests/fragment_stats.py", line 82, in _test_1d
cond=300 / sym_factor)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 300.0
======================================================================
FAIL: test_1d_with_overlap (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 104, in test_1d_with_overlap
self.check_stats(fs, a_eps=300, a_mu=300, nonlin=600, susc=700, cond=600)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 600
======================================================================
FAIL: test_1d_with_partial_fragment (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 117, in test_1d_with_partial_fragment
self.check_stats(fs, a_eps=260, a_mu=260, nonlin=480, susc=480, cond=480)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 480
======================================================================
FAIL: test_1d_with_pml (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 95, in test_1d_with_pml
self._test_1d([], pml=[mp.PML(1)])
File "./tests/fragment_stats.py", line 82, in _test_1d
cond=300 / sym_factor)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 300.0
======================================================================
FAIL: test_1d_with_symmetry (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 92, in test_1d_with_symmetry
self._test_1d([mp.Mirror(mp.X)])
File "./tests/fragment_stats.py", line 82, in _test_1d
cond=300 / sym_factor)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 150.0
======================================================================
FAIL: test_2d (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 166, in test_2d
self._test_2d([])
File "./tests/fragment_stats.py", line 159, in _test_2d
cond=30000 / sym_factor)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 30000.0
======================================================================
FAIL: test_2d_with_pml_all_sides (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 172, in test_2d_with_pml_all_sides
self._test_2d([], pml=[mp.PML(1, mp.Y), mp.PML(2, mp.X, mp.Low), mp.PML(3, mp.X, mp.High)])
File "./tests/fragment_stats.py", line 159, in _test_2d
cond=30000 / sym_factor)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 30000.0
======================================================================
FAIL: test_2d_with_symmetry (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 169, in test_2d_with_symmetry
self._test_2d([mp.Mirror(mp.X), mp.Mirror(mp.Y)])
File "./tests/fragment_stats.py", line 159, in _test_2d
cond=30000 / sym_factor)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 7500.0
======================================================================
FAIL: test_cyl (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 268, in test_cyl
self.check_stats(fs, a_eps=90000, a_mu=90000, nonlin=30000, susc=30000, cond=30000)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 30000
----------------------------------------------------------------------
Ran 31 tests in 0.038s
FAILED (failures=9)
Elapsed run time = 0.0442 s
..
======================================================================
FAIL: test_1d (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 89, in test_1d
self._test_1d([])
File "./tests/fragment_stats.py", line 82, in _test_1d
cond=300 / sym_factor)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 300.0
======================================================================
FAIL: test_1d_with_overlap (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 104, in test_1d_with_overlap
self.check_stats(fs, a_eps=300, a_mu=300, nonlin=600, susc=700, cond=600)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 600
======================================================================
FAIL: test_1d_with_partial_fragment (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 117, in test_1d_with_partial_fragment
self.check_stats(fs, a_eps=260, a_mu=260, nonlin=480, susc=480, cond=480)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 480
======================================================================
FAIL: test_1d_with_pml (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 95, in test_1d_with_pml
self._test_1d([], pml=[mp.PML(1)])
File "./tests/fragment_stats.py", line 82, in _test_1d
cond=300 / sym_factor)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 300.0
======================================================================
FAIL: test_1d_with_symmetry (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 92, in test_1d_with_symmetry
self._test_1d([mp.Mirror(mp.X)])
File "./tests/fragment_stats.py", line 82, in _test_1d
cond=300 / sym_factor)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 150.0
======================================================================
FAIL: test_2d (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 166, in test_2d
self._test_2d([])
File "./tests/fragment_stats.py", line 159, in _test_2d
cond=30000 / sym_factor)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 30000.0
======================================================================
FAIL: test_2d_with_pml_all_sides (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 172, in test_2d_with_pml_all_sides
self._test_2d([], pml=[mp.PML(1, mp.Y), mp.PML(2, mp.X, mp.Low), mp.PML(3, mp.X, mp.High)])
File "./tests/fragment_stats.py", line 159, in _test_2d
cond=30000 / sym_factor)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 30000.0
======================================================================
FAIL: test_2d_with_symmetry (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 169, in test_2d_with_symmetry
self._test_2d([mp.Mirror(mp.X), mp.Mirror(mp.Y)])
File "./tests/fragment_stats.py", line 159, in _test_2d
cond=30000 / sym_factor)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 7500.0
======================================================================
FAIL: test_cyl (__main__.TestFragmentStats)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tests/fragment_stats.py", line 268, in test_cyl
self.check_stats(fs, a_eps=90000, a_mu=90000, nonlin=30000, susc=30000, cond=30000)
File "./tests/fragment_stats.py", line 25, in check_stats
self.assertEqual(fragment.num_nonlinear_pixels, nonlin)
AssertionError: 0 != 30000
----------------------------------------------------------------------
Ran 31 tests in 0.040s
FAILED (failures=9)
-------------------------------------------------------
Primary job terminated normally, but 1 process returned
a non-zero exit code.. Per user-direction, the job has been aborted.
-------------------------------------------------------
--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:
Process name: [[20345,1],1]
Exit code: 1
--------------------------------------------------------------------------
FAIL tests/fragment_stats.py (exit status: 1)
Adds new
geometric_object_volume
function to compute the volume of a given object.Speeds up
box_overlap_with_object
when the object is entirely contained within the box, by using the analytical volume formula instead of numerical integration in this case.