python - Floating Point Exception when using OpenFOAM and matplotlib.path.Path.contains_points -


in python code, using ctypes (later switched cython) call functions c++ shared library wrote myself. library small wrapper on top of third-party library (openfoam specific, not important question). third-party library uses mpi (and petsc) , giving me issues when try call contains_points matplotlib.path.path.

each time call contains_points before have called function c++ library works fine. when try call contains_points after have @ least called 1 function c++ library following error:

[0]petsc error: ------------------------------------------------------------------------ [0]petsc error: caught signal number 8 fpe: floating point exception,probably divide 0 [0]petsc error: try option -start_in_debugger or -on_error_attach_debugger [0]petsc error: or see http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind[0]petsc error: or try http://valgrind.org on gnu/linux , apple mac os x find memory corruption errors [0]petsc error: configure using --with-debugging=yes, recompile, link, , run  [0]petsc error: more information on crash. -------------------------------------------------------------------------- mpi_abort invoked on rank 0 in communicator mpi_comm_world  errorcode 59.  note: invoking mpi_abort causes open mpi kill mpi processes. may or may not see output other processes, depending on when open mpi kills them. -------------------------------------------------------------------------- 

what going on here , how can solve this? lot in advance!

update 27/07/2016

i tried create minimalist possible piece of code reproduce error. error different , lot more verbose, same. trigger still floating point exception:

#0  foam::error::printstack(foam::ostream&) @ ??:? #1  foam::sigfpe::sighandler(int) @ ??:? #2  ? in "/usr/lib/libpthread.so.0" #3  agg::math_stroke<agg::pod_bvector<agg::point_base<double>, 6u> >::calc_join(agg::pod_bvector<agg::point_base<double>, 6u>&, agg::vertex_dist const&, agg::vertex_dist const&, agg::vertex_dist const&, double, double) @ ??:? #4  agg::vcgen_contour::vertex(double*, double*) @ ??:? #5  agg::conv_adaptor_vcgen<agg::conv_curve<pathnanremover<agg::conv_transform<py::pathiterator, agg::trans_affine> >, agg::curve3, agg::curve4>, agg::vcgen_contour, agg::null_markers>::vertex(double*, double*) @ ??:? #6  void point_in_path_impl<agg::conv_contour<agg::conv_curve<pathnanremover<agg::conv_transform<py::pathiterator, agg::trans_affine> >, agg::curve3, agg::curve4> >, numpy::array_view<double const, 2>, numpy::array_view<bool, 1> >(numpy::array_view<double const, 2>&, agg::conv_contour<agg::conv_curve<pathnanremover<agg::conv_transform<py::pathiterator, agg::trans_affine> >, agg::curve3, agg::curve4> >&, numpy::array_view<bool, 1>&) @ ??:? #7  ? @ ??:? #8  pycfunction_call in "/usr/lib/libpython3.5m.so.1.0" #9  pyeval_evalframeex in "/usr/lib/libpython3.5m.so.1.0" #10  ? in "/usr/lib/libpython3.5m.so.1.0" #11  pyeval_evalframeex in "/usr/lib/libpython3.5m.so.1.0" #12  ? in "/usr/lib/libpython3.5m.so.1.0" #13  pyeval_evalcodeex in "/usr/lib/libpython3.5m.so.1.0" #14  pyeval_evalcode in "/usr/lib/libpython3.5m.so.1.0" #15  ? in "/usr/lib/libpython3.5m.so.1.0" #16  pyrun_fileexflags in "/usr/lib/libpython3.5m.so.1.0" #17  pyrun_simplefileexflags in "/usr/lib/libpython3.5m.so.1.0" #18  py_main in "/usr/lib/libpython3.5m.so.1.0" #19  main @ ??:? #20  __libc_start_main in "/usr/lib/libc.so.6" #21  _start @ ??:? ./run.sh: line 3:  6828 floating point exception(core dumped) pythonpath=$(pwd)/pythonfoam:$pythonpath python test.py 

note: can bypass error running in terminal before run code:

unset foam_sigfpe 

everything works fine if unset foam_sigfpe, not practice , actual problem not solved @ all.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -