Bug #1571

Feature #1290: === Core: framework ===

Feature #1572: == Python ==

PyCoreTest overlooks complete obstruction of simulation

Added by wuttke almost 4 years ago. Updated over 3 years ago.

Status:ArchivedStart date:03 Aug 2016
Priority:UrgentDue date:
Assignee:wuttke% Done:

0%

Category:-
Target version:Sprint32

Description

Let the Python function getSample(), exported by ExportToPython, return None instead of a multilayer. Then

$ bin/PyCoreStandardTest HexParaCrystal
Core simulation will be compared with /G/ba/build/tmp/pysuite_HexParaCrystal_out generated by command '/usr/bin/python2.7 /G/ba/build/tmp/pysuite_HexParaCrystal.py'
Traceback (most recent call last):
  File "/G/ba/build/tmp/pysuite_HexParaCrystal.py", line 75, in <module>
    runSimulation('/G/ba/build/tmp/pysuite_HexParaCrystal_out')
  File "/G/ba/build/tmp/pysuite_HexParaCrystal.py", line 68, in runSimulation
    simulation.setSample(sample)
  File "/G/ba/build/lib/libBornAgainCore.py", line 15054, in setSample
    return _libBornAgainCore.Simulation_setSample(self, sample)
ValueError: invalid null reference in method 'Simulation_setSample', argument 2 of type 'ISample const &'
HexParaCrystal           Interference function of 2D hexagonal pa[SUCCESS]      1.0004e-13

When just running ctest, all this output is overlooked since the test passes.

This indicates two problems, possibly unrelated:
  • The ValueError is somehow catched, and not detected by CTest.
  • A numeric agreement of 1e-13 is found, although the simulation has no chance to return anything but zeros. This is perhaps related with the dubitable definition of almostEqual (#1541)

History

#1 Updated by wuttke almost 4 years ago

  • Parent task changed from #1290 to #1572

#2 Updated by wuttke almost 4 years ago

  • Status changed from New to Sprint
  • Assignee set to wuttke
  • Target version set to Sprint32

#3 Updated by wuttke almost 4 years ago

Resolved in cdc32a6, except for the possible failure to detect zero-filled detector images.

#4 Updated by wuttke almost 4 years ago

  • Status changed from Sprint to Resolved

Errors now do appear in the CTest output.
Insensitivity of the tests to empty simulation output cannot be confirmed.
Rather, I was misled by output from roughness simulation, which looks all zero, but is not.

#5 Updated by herck over 3 years ago

  • Status changed from Resolved to Archived

Also available in: Atom PDF