Commit d80a0f86 authored by Burlen Loring's avatar Burlen Loring

do not SWIG -threads

SWIG's -threads flag tells SWIG to release GIL before entering
all wrapped functions, the idea being that Python can run concurently
with the wrapped C++ code. This is only safe when the wrapped code
aquires the GIL before making calls to the Python API, and the
interpreter has to be initialized for threading. Niether of these
are true by default in ParaView leading to mysterious segv's.
Note, there is a CMake flag that can toggle the correct behavior
at compile time. However, it is disabled by default so we will
not use -threads.
parent 28412af3
......@@ -64,7 +64,7 @@ if (ENABLE_PYTHON)
file(STRINGS ${depend_file} depends)
add_custom_command(
OUTPUT ${output_file}
COMMAND ${swig_cmd} -c++ -python -threads -w341,325,401,504
COMMAND ${swig_cmd} -c++ -python -w341,325,401,504
-DSWIG_TYPE_TABLE=senseiPython
-I${MPI4PY_INCLUDE_DIR} -I${CMAKE_BINARY_DIR}
-I${CMAKE_CURRENT_BINARY_DIR} -I${CMAKE_CURRENT_SOURCE_DIR}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment