-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Currently the python bindings to access the base engines of either EngineViews or to access the engine stack from a Policy are insufficnent. There is a huge amount of boiler plate needed for what should be a simple operation. Further, there is a bug in getBaseEngine() on most engine views due to an incorrect return value policy.
Consider the following code
AEngine: AdaptiveEngineView
QSEEngine : MultiscalePartitioningEngineView = AEngine.getBaseEngine()This crashes with the following error
Traceback (most recent call last):
File "/Users/tboudreaux/Programming/4DSTAR/GridFire/validation/vv/GridFireValidationSuite.py", line 117, in <module>
instance(args.pynucastro_compare, args.pync_engine)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tboudreaux/Programming/4DSTAR/GridFire/validation/vv/GridFireValidationSuite.py", line 35, in __call__
self.evolve(engine, netIn, pynucastro_compare = pynucastro_compare, policy=policy, depth=EngineNameToDepth[pync_engine.lower()])
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tboudreaux/Programming/4DSTAR/GridFire/validation/vv/testsuite.py", line 248, in evolve
l_engine = l_engine.getBaseEngine()
RuntimeError: return_value_policy = copy, but type is non-copyable! (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)The issue here is that we are returning a reference without setting the proper return value policy in pybind.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request