Skip to content

Commit

Permalink
DEBUG stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed May 23, 2024
1 parent 1edfc46 commit 0d251dd
Show file tree
Hide file tree
Showing 9 changed files with 226 additions and 178 deletions.
1 change: 1 addition & 0 deletions exaudfclient/base/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build:java --define java=true --action_env=JAVA_PREFIX
build:python --define python=true --action_env=PYTHON2_SYSPATH --action_env=PYTHON2_PREFIX --action_env=PYTHON2_VERSION --action_env=NUMPY_PREFIX --action_env=PYTHON3_SYSPATH --action_env=PYTHON3_PREFIX --action_env=PYTHON3_VERSION
build:fast-binary-py3 --copt='-DCUSTOM_LIBEXAUDFLIB_PATH="/exaudf/libexaudflib_complete.so"' --define binary_type=fast_binary //:exaudfclient_py3
build:slow-wrapper-py3 --define binary_type=slow_wrapper //:exaudfclient_py3
build:valgrind-wrapper-py3 --config=slow-wrapper-py3 --define wrapper_type=valgrind_wrapper //:exaudfclient_py3
build:static-binary-py3 //:exaudfclient_py3_static
build:test-binaries-py3 --config=static-binary-py3 --config=slow-wrapper-py3
build:verbose --copt='-v' --subcommands --verbose_failures --announce_rc
Expand Down
2 changes: 1 addition & 1 deletion exaudfclient/base/create_binary_wrapper_valgrind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ touch "$CLIENT_WRAPPER"
{
cat "$WRAPPER_TEMPLATE"
echo
echo valgrind "./$(basename "$CLIENT_BINARY")" '$*'
echo valgrind --leak-check=full "./$(basename "$CLIENT_BINARY")" '$*'
} >> "$CLIENT_WRAPPER"
2 changes: 1 addition & 1 deletion exaudfclient/base/exaudflib/impl/socket_high_level.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ bool exaudflib::socket_high_level::send_init(zmq::socket_t &socket, const std::s
#ifdef SWIGVM_LOG_CLIENT
std::cerr << "W-UDF-CL-LIB-1011: Failed to set nofile limit" << std::endl;
#else
throw SWIGVMContainers::SWIGVM::exception("F-UDF-CL-LIB-1012: Failed to set nofile limit");
std::cerr << "W-UDF-CL-LIB-1011: Failed to set nofile limit" << std::endl;
#endif
d.rlim_cur = d.rlim_max = 32768;
if (setrlimit(RLIMIT_NPROC, &d) != 0)
Expand Down
14 changes: 9 additions & 5 deletions exaudfclient/base/python/python3/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package(default_visibility = ["//visibility:public"])
genrule(
name = "exascript_python_tmp_cc",
cmd = """
INCLUDES=`$$PYTHON3_PREFIX/bin/$$PYTHON3_VERSION-dbg-config --includes`
INCLUDES=`$$PYTHON3_PREFIX/bin/$$PYTHON3_VERSION-config --includes`
mkdir -p build_exascript_python_tmp_cc/exaudflib
cp "$(location //exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudflib:exascript.i)" build_exascript_python_tmp_cc/exaudflib
cd build_exascript_python_tmp_cc
Expand All @@ -16,7 +16,7 @@ genrule(
genrule(
name = "exascript_python_tmp_h",
cmd = """
INCLUDES=`$$PYTHON3_PREFIX/bin/$$PYTHON3_VERSION-dbg-config --includes`
INCLUDES=`$$PYTHON3_PREFIX/bin/$$PYTHON3_VERSION-config --includes`
mkdir build_exascript_python_tmp_h
cp "$(location //exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location //exaudflib:exascript.i)" build_exascript_python_tmp_h
cp "$(location exascript_python_tmp.cc)" "$(location exascript_python.py)" build_exascript_python_tmp_h
Expand Down Expand Up @@ -79,7 +79,8 @@ genrule(

cc_library(
name = "exascript_python",
copts = ["-DPy_TRACE_REFS=1", "-DPy_DEBUG=1"],
#copts = ["-DPy_TRACE_REFS=1", "-DPy_DEBUG=1"],
copts = ["-DPy_DEBUG=1"],
srcs = [":filter_swig_code_exascript_python_cc",":filter_swig_code_exascript_python_h"],
hdrs = [":filter_swig_code_exascript_python_h"],
deps = ["@python3//:python3","//exaudflib:exaudflib-deps","//exaudflib:header"],
Expand All @@ -90,7 +91,8 @@ cc_library(
name = "pythoncontainer",
srcs = ["//python:pythoncontainer.cc", ":dummy.h"],
data = [":extend_exascript_python_preset_py"],
copts = ["-DPy_TRACE_REFS=1", "-DPy_DEBUG=1"],
#copts = ["-DPy_TRACE_REFS=1", "-DPy_DEBUG=1"],
copts = ["-DPy_DEBUG=1"],
hdrs = [":exascript_python_int", ":filter_swig_code_exascript_python_h"],
include_prefix = ".",
deps = ["@python3//:python3",":exascript_python","//exaudflib:header",
Expand All @@ -102,14 +104,16 @@ cc_library(
genrule(
name = "dummy",
cmd = 'touch "$@"',

outs = ["dummy.h"],
srcs = [":pyextdataframe.so"],
)

cc_binary(
name = "pyextdataframe.so",
linkshared = 1,
copts = ["-DPy_TRACE_REFS=1", "-DPy_DEBUG=1"],
#copts = ["-DPy_TRACE_REFS=1", "-DPy_DEBUG=1"],
copts = ["-DPy_DEBUG=1"],
srcs = [":python_ext_dataframe.cc"],
deps = ["@python3//:python3","@numpy//:numpy",
"//exaudflib:header", "//:debug_message_h"],
Expand Down
Loading

0 comments on commit 0d251dd

Please sign in to comment.