Failure when switching to evaluationTree_OpenMP
Object-oriented equation-based modelling and optimisation software
Brought to you by:
ciroki
Hello,
I need to use external functions but it is not posible to change the evaluationMode configuration parameter. I have tried both possiblities:
simulation.EvaluationMode = eEvaluationTree_OpenMP
cfg.SetString('daetools.core.equations.evaluationMode', 'evaluationTree_OpenMP')
Without success.
My DAETools version is daetools-1.8.0-py3.6-macosx-10.6-intel.egg.
I get the following error with the Tutorial 14:
python tutorial14.py console
Traceback (most recent call last):
File "tutorial14.py", line 323, in <module>
run(guiRun=guiRun)
File "tutorial14.py", line 306, in run
cfg.SetString('daetools.core.equations.evaluationMode', 'evaluationTree_OpenMP')
Boost.Python.ArgumentError: Python argument types in
daeConfig.SetString(daeConfig, str, str)
did not match C++ signature:
SetString(daeConfig {lvalue} self, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > propertyPath, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > {lvalue} value)
And with Tutorial 21:
python tutorial21.py console
Traceback (most recent call last):
File "tutorial21.py", line 68, in <module>
from daetools.pyDAE.evaluator_opencl import pyEvaluator_OpenCL
File "/Users/jaimenms/PycharmProjects/study-daetools/.venv/lib/python3.6/site-packages/daetools-1.8.0-py3.6-macosx-10.6-intel.egg/daetools/pyDAE/evaluator_opencl.py", line 14, in <module>
import pyEvaluator_OpenCL
ModuleNotFoundError: No module named 'pyEvaluator_OpenCL'
Maybe there are missing libraries in the MacOs package. As the 1.8.0 source code is not available for Download, I could not confirm it.
Regards
Jaime Souza
Anonymous
Hi Jaime,
Issue 1. I checked on my machine and both ways work. When you use:
what error you get?
Also, please try this and let me know if it works:
Issue 2. You are right: OpenCL implementation of the Compute Stack Evaluator is not available for macOS. if I can recall correctly, I had some problems with the OpenCL runtime installation so it couldn't be compiled. I'll check if it can be fixed in the new release.
Cheers
Dragan
My bad, please try this:
propertyPath = 'daetools.core.equations.evaluationMode'
eMode = 'evaluationTree_OpenMP'
cfg.SetString(propertyPath, eMode)
It could be a problem with the way the functions in the extension module are defined.
Dragan
For the:
I get:
And for the
I get:
eEvaluationTree_OpenMP is defined in pyCore. Thus, the line below:
should work provided that the pyCore module has been successfully imported. Can you check if it is imported?
Dragan
Yes it is. My first line is:
Well, strange. Do other flags work, i.e. those for distributed equations boundaries: eOpenOpen etc.? I checked, they are all defined in the same module (pyCore).
Yes. It is all working. Except the things that are related to EvaluationMode.
My guess is that this 1.8.0 MacOS is actually a 1.7.3.
Well, could be, I will check.
Judging by the dates, the files appear to be from 1.7.3. I'll double check, perhaps I copied old extension modules.
Yes, the extension modules are from 1.7.3, indeed. I will upload the new version now.
Great. Now it is working. Thanks.