Skip to content

Commit a20c405

Browse files
committed
Use exaudfclient_base
1 parent 80f2125 commit a20c405

File tree

16 files changed

+81
-136
lines changed

16 files changed

+81
-136
lines changed

.current_gitmodules

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exaudfclient/.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build:benchmark --define benchmark=true
44
build:r --define r=true
55
build:java --define java=true --action_env=JAVA_PREFIX
66
build:python --define python=true --action_env=NUMPY_PREFIX --action_env=PYTHON3_SYSPATH --action_env=PYTHON3_PREFIX --action_env=PYTHON3_VERSION
7-
build:fast-binary --copt='-DCUSTOM_LIBEXAUDFLIB_PATH="/exaudf/base/libexaudflib_complete.so"' --define binary_type=fast_binary //:exaudfclient
7+
build:fast-binary --copt='-DCUSTOM_LIBEXAUDFLIB_PATH="/exaudf/external/exaudfclient_base~/libexaudflib_complete.so"' --define binary_type=fast_binary //:exaudfclient
88
build:slow-wrapper --define binary_type=slow_wrapper //:exaudfclient
99
build:static-binary //:exaudfclient_static
1010
build:test-binaries --config=static-binary --config=slow-wrapper

exaudfclient/BUILD

Lines changed: 25 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,24 @@
11
load("//:variables.bzl", "VM_ENABLED_DEFINES")
22

3-
config_setting(
4-
name = "benchmark",
5-
define_values = {"benchmark": "true"},
6-
)
7-
8-
config_setting(
9-
name = "python",
10-
define_values = {"python": "true"},
11-
)
12-
13-
config_setting(
14-
name = "java",
15-
define_values = {"java": "true"},
16-
)
17-
18-
config_setting(
19-
name = "bash",
20-
define_values = {"bash": "true"},
21-
)
22-
233
config_setting(
244
name = "r",
255
define_values = {"r": "true"},
266
)
277

28-
config_setting(
29-
name = "fast_binary",
30-
define_values = {
31-
"binary_type": "fast_binary",
32-
},
33-
)
34-
35-
config_setting(
36-
name = "slow_wrapper",
37-
define_values = {
38-
"binary_type": "slow_wrapper",
39-
},
40-
)
41-
42-
43-
config_setting(
44-
name = "valgrind_wrapper",
45-
define_values = {
46-
"wrapper_type": "valgrind_wrapper",
47-
},
48-
)
49-
50-
config_setting(
51-
name = "valgrind_massif_wrapper",
52-
define_values = {
53-
"wrapper_type": "valgrind_massif_wrapper",
54-
},
55-
)
56-
57-
config_setting(
58-
name = "stdout_to_bucketfs",
59-
define_values = {
60-
"wrapper_type": "stdout_to_bucketfs",
61-
},
62-
)
63-
648

659
VM_ENABLED_DEPS=select({
66-
"//:benchmark": ["@exaudfclient//base/benchmark_container:benchmark_container"],
10+
"@exaudfclient_base//:benchmark": ["@exaudfclient_base//benchmark_container:benchmark_container"],
6711
"//conditions:default": []
6812
}) + select({
69-
"//:java": ["@exaudfclient//base/javacontainer:javacontainer"],
13+
"@exaudfclient_base//:java": ["@exaudfclient_base//javacontainer:javacontainer"],
7014
"//conditions:default": []
7115
}) + select({
72-
"//:bash": ["@exaudfclient//base/streaming_container:streamingcontainer"],
16+
"@exaudfclient_base//:bash": ["@exaudfclient_base//streaming_container:streamingcontainer"],
7317
"//conditions:default": []
7418
})
7519

7620
VM_PYTHON3_DEPS=select({
77-
"//:python": ["@exaudfclient//base/python/python3:pythoncontainer"],
21+
"@exaudfclient_base//:python": ["@exaudfclient_base//python/python3:pythoncontainer"],
7822
"//conditions:default": []
7923
})
8024

@@ -87,12 +31,12 @@ VM_R_DEPS=select({
8731

8832
cc_binary(
8933
name = "exaudfclient_bin",
90-
srcs = ["exaudfclient.cc", "@exaudfclient//base:load_dynamic"],
34+
srcs = ["exaudfclient.cc", "@exaudfclient_base//:load_dynamic"],
9135
linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace
92-
deps = ["@exaudfclient//base/exaudflib:header", "@exaudfclient//base/utils:utils"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+VM_R_DEPS+
93-
["@exaudfclient//base/exaudflib:exaudflib-deps"],
36+
deps = ["@exaudfclient_base//exaudflib:header", "@exaudfclient_base//utils:utils"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+VM_R_DEPS+
37+
["@exaudfclient_base//exaudflib:exaudflib-deps"],
9438
defines = VM_ENABLED_DEFINES,
95-
data = ["@exaudfclient//base:libexaudflib_complete.so"]
39+
data = ["@exaudfclient_base//:libexaudflib_complete.so"]
9640
)
9741

9842
## The purpose of the static binaries is to verify if the linker namespace test work correctly.
@@ -104,18 +48,18 @@ cc_binary(
10448
## Besides this the test under test/python3/all/linker_namespace.py checks the normal build, which expects
10549
## not to find any occurence of the dependencies (protobuf/zmq) in the primary linker namespace.
10650
##
107-
## We need to explicitly declare the dependency of protobuf/zmq here, as the exaudflib is a static lib (@exaudfclient//base/exaudflib:exaudflib)
51+
## We need to explicitly declare the dependency of protobuf/zmq here, as the exaudflib is a static lib (@exaudfclient_base//exaudflib:exaudflib)
10852
## and hence does not contain dependency information. We cannot declare the shared lib (:exaudflib_complete.so)
10953
## as dependency as it is a binary for bazel.
11054

11155
cc_binary(
11256
name = "exaudfclient_static_bin",
113-
srcs = ["exaudfclient.cc", "@exaudfclient//base:load_dynamic"],
57+
srcs = ["exaudfclient.cc", "@exaudfclient_base//:load_dynamic"],
11458
linkopts = ["-ldl"], # needed for dynamicly loading libexaudflib_complete.so into another linker namespace
115-
deps = ["@exaudfclient//base/exaudflib:header", "@exaudfclient//base/utils:utils"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+VM_R_DEPS+
116-
["@exaudfclient//base/exaudflib:exaudflib-deps"] + [ "@zmq//:zmq", "@protobuf//:protobuf"],
59+
deps = ["@exaudfclient_base//exaudflib:header", "@exaudfclient_base//utils:utils"]+VM_ENABLED_DEPS+VM_PYTHON3_DEPS+VM_R_DEPS+
60+
["@exaudfclient_base//exaudflib:exaudflib-deps"] + [ "@zmq//:zmq", "@protobuf//:protobuf"],
11761
defines = VM_ENABLED_DEFINES,
118-
data = ["@exaudfclient//base:libexaudflib_complete.so"],
62+
data = ["@exaudfclient_base//:libexaudflib_complete.so"],
11963
)
12064

12165
# Workarround for the hardcoded paths in exaudfclient for libexaudflib_complete.so and python_ext_dataframe.cc
@@ -129,41 +73,41 @@ cc_binary(
12973
sh_library(
13074
name = "wrapper_generator_bin",
13175
srcs=select({
132-
"//:valgrind_wrapper": ["@exaudfclient//base:create_binary_wrapper_valgrind.sh"],
133-
"//:valgrind_massif_wrapper": ["@exaudfclient//base:create_binary_wrapper_valgrind_massif.sh"],
134-
"//:stdout_to_bucketfs": ["@exaudfclient//base:create_binary_wrapper_stdout_to_bucketfs.sh"],
135-
"//conditions:default": ["@exaudfclient//base:create_binary_wrapper.sh"]
76+
"@exaudfclient_base//:valgrind_wrapper": ["@exaudfclient_base//:create_binary_wrapper_valgrind.sh"],
77+
"@exaudfclient_base//:valgrind_massif_wrapper": ["@exaudfclient_base//:create_binary_wrapper_valgrind_massif.sh"],
78+
"@exaudfclient_base//:stdout_to_bucketfs": ["@exaudfclient_base//:create_binary_wrapper_stdout_to_bucketfs.sh"],
79+
"//conditions:default": ["@exaudfclient_base//:create_binary_wrapper.sh"]
13680
})
13781
)
13882

13983

140-
SLOW_WRAPPER_BINARY="""$(location //:wrapper_generator_bin) "$(location exaudfclient_bin)" "$(location exaudfclient)" "$(location @exaudfclient//base:exaudfclient.template.sh)" """
84+
SLOW_WRAPPER_BINARY="""$(location //:wrapper_generator_bin) "$(location exaudfclient_bin)" "$(location exaudfclient)" "$(location @exaudfclient_base//:exaudfclient.template.sh)" """
14185
FAST_BINARY="""cp "$(location exaudfclient_bin)" "$(location exaudfclient)" """
14286
CREATE_BINARY_SCRIPT=select({
143-
"//:fast_binary": FAST_BINARY,
144-
"//:slow_wrapper": SLOW_WRAPPER_BINARY,
87+
"@exaudfclient_base//:fast_binary": FAST_BINARY,
88+
"@exaudfclient_base//:slow_wrapper": SLOW_WRAPPER_BINARY,
14589
"//conditions:default": FAST_BINARY
14690
})
14791
genrule(
14892
name = "exaudfclient",
14993
cmd = CREATE_BINARY_SCRIPT,
15094
outs = ["exaudfclient"],
151-
srcs = [":exaudfclient_bin", "@exaudfclient//base:libexaudflib_complete.so", "@exaudfclient//base:exaudfclient.template.sh", "//:wrapper_generator_bin"],
95+
srcs = [":exaudfclient_bin", "@exaudfclient_base//:libexaudflib_complete.so", "@exaudfclient_base//:exaudfclient.template.sh", "//:wrapper_generator_bin"],
15296
output_to_bindir = True
15397
)
15498

155-
SLOW_WRAPPER_STATIC_BINARY="""$(location //:wrapper_generator_bin) "$(location exaudfclient_static_bin)" "$(location exaudfclient_static)" "$(location @exaudfclient//base:exaudfclient.template.sh)" """
99+
SLOW_WRAPPER_STATIC_BINARY="""$(location //:wrapper_generator_bin) "$(location exaudfclient_static_bin)" "$(location exaudfclient_static)" "$(location @exaudfclient_base//:exaudfclient.template.sh)" """
156100
FAST_BINARY_STATIC="""cp "$(location exaudfclient_static_bin)" "$(location exaudfclient_static)" """
157101
CREATE_STATIC_BINARY_SCRIPT=select({
158-
"//:fast_binary": FAST_BINARY_STATIC,
159-
"//:slow_wrapper": SLOW_WRAPPER_STATIC_BINARY,
102+
"@exaudfclient_base//:fast_binary": FAST_BINARY_STATIC,
103+
"@exaudfclient_base//:slow_wrapper": SLOW_WRAPPER_STATIC_BINARY,
160104
"//conditions:default": FAST_BINARY_STATIC
161105
})
162106

163107
genrule(
164108
name = "exaudfclient_static",
165109
cmd = CREATE_STATIC_BINARY_SCRIPT,
166110
outs = ["exaudfclient_static"],
167-
srcs = [":exaudfclient_static_bin", "@exaudfclient//base:libexaudflib_complete.so", "@exaudfclient//base:exaudfclient.template.sh", "//:wrapper_generator_bin"],
111+
srcs = [":exaudfclient_static_bin", "@exaudfclient_base//:libexaudflib_complete.so", "@exaudfclient_base//:exaudfclient.template.sh", "//:wrapper_generator_bin"],
168112
output_to_bindir = True
169113
)

exaudfclient/MODULE.bazel

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
module(name="exaudfclient_ext", version = "1.0")
22

3-
bazel_dep(name = "exaudfclient", version = "1.0.0")
4-
local_path_override(module_name="exaudfclient", path="exaudfclient_base")
3+
bazel_dep(name = "exaudfclient_base", version = "1.0.0")
4+
local_path_override(module_name="exaudfclient_base", path="base")
55

66
new_local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "new_local_repository")
77

8-
zmq_local_repository = use_repo_rule("@exaudfclient//base:zmq_repository.bzl", "zmq_local_repository")
8+
zmq_local_repository = use_repo_rule("@exaudfclient_base//:zmq_repository.bzl", "zmq_local_repository")
99
zmq_local_repository(name = "zmq")
1010

11-
protobuf_local_repository = use_repo_rule("@exaudfclient//base:protobuf_repository.bzl", "protobuf_local_repository")
11+
protobuf_local_repository = use_repo_rule("@exaudfclient_base//:protobuf_repository.bzl", "protobuf_local_repository")
1212
protobuf_local_repository(name = "protobuf")
1313

1414
new_local_repository(

exaudfclient/base

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../script-languages/exaudfclient/base

exaudfclient/exaudfclient.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414
#include <dlfcn.h>
1515
#endif
1616
#include <exception>
17-
#include "base/exaudflib/vm/swig_vm.h"
18-
#include "base/exaudflib/load_dynamic.h"
17+
#include "exaudflib/vm/swig_vm.h"
18+
#include "exaudflib/load_dynamic.h"
1919
#ifdef ENABLE_R_VM
2020
#include "rcontainer/rcontainer.h"
2121
#endif
2222
#ifdef ENABLE_BENCHMARK_VM
23-
#include "base/benchmark_container/benchmark_container.h"
23+
#include "benchmark_container/benchmark_container.h"
2424
#endif
2525
#ifdef ENABLE_STREAMING_VM
26-
#include "base/streaming_container/streamingcontainer.h"
26+
#include "streaming_container/streamingcontainer.h"
2727
#endif
2828
#include <functional>
29-
#include "base/utils/debug_message.h"
29+
#include "utils/debug_message.h"
3030
#include <stdio.h>
3131
#include <stddef.h>
3232
#include <stdint.h>
@@ -40,11 +40,11 @@
4040

4141

4242
#ifdef ENABLE_JAVA_VM
43-
#include "base/javacontainer/javacontainer_builder.h"
43+
#include "javacontainer/javacontainer_builder.h"
4444
#endif //ENABLE_JAVA_VM
4545

4646
#ifdef ENABLE_PYTHON_VM
47-
#include "base/python/pythoncontainer.h"
47+
#include "python/pythoncontainer.h"
4848
#endif //ENABLE_PYTHON_VM
4949

5050
#ifdef UDF_PLUGIN_CLIENT

exaudfclient/exaudfclient_base

Lines changed: 0 additions & 1 deletion
This file was deleted.

exaudfclient/rcontainer/BUILD

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,55 +4,55 @@ genrule(
44
name = "exascript_r_tmp_cc",
55
cmd = """
66
mkdir -p build_exascript_r_tmp_cc/exaudflib
7-
cp "$(location @exaudfclient//base/exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location @exaudfclient//base/exaudflib:exascript.i)" build_exascript_r_tmp_cc/exaudflib
7+
cp "$(location @exaudfclient_base//exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location @exaudfclient_base//exaudflib:exascript.i)" build_exascript_r_tmp_cc/exaudflib
88
cd build_exascript_r_tmp_cc
99
swig -v -O -DEXTERNAL_PROCESS -Wall -c++ -r -addextern -module exascript_r -o "../$(location exascript_r_tmp.cc)" exaudflib/exascript.i
1010
""",
1111
outs = ["exascript_r_tmp.cc","exascript_r.R"],
12-
srcs = ["@exaudfclient//base/exaudflib:exascript.i","@exaudfclient//base/exaudflib:swig/script_data_transfer_objects_wrapper.h"]
12+
srcs = ["@exaudfclient_base//exaudflib:exascript.i","@exaudfclient_base//exaudflib:swig/script_data_transfer_objects_wrapper.h"]
1313
)
1414

1515
genrule(
1616
name = "exascript_r_tmp_h",
1717
cmd = """
1818
mkdir build_exascript_r_tmp_h
19-
cp "$(location @exaudfclient//base/exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location @exaudfclient//base/exaudflib:exascript.i)" build_exascript_r_tmp_h
19+
cp "$(location @exaudfclient_base//exaudflib:swig/script_data_transfer_objects_wrapper.h)" "$(location @exaudfclient_base//exaudflib:exascript.i)" build_exascript_r_tmp_h
2020
cp "$(location exascript_r_tmp.cc)" "$(location exascript_r.R)" build_exascript_r_tmp_h
2121
cd build_exascript_r_tmp_h
2222
swig -DEXTERNAL_PROCESS -c++ -r -external-runtime "../$(location exascript_r_tmp.h)"
2323
""",
2424
outs = ["exascript_r_tmp.h"],
25-
srcs = ["@exaudfclient//base/exaudflib:exascript.i","@exaudfclient//base/exaudflib:swig/script_data_transfer_objects_wrapper.h", ":exascript_r_tmp.cc", ":exascript_r.R"]
25+
srcs = ["@exaudfclient_base//exaudflib:exascript.i","@exaudfclient_base//exaudflib:swig/script_data_transfer_objects_wrapper.h", ":exascript_r_tmp.cc", ":exascript_r.R"]
2626
)
2727

2828
genrule(
2929
name = "exascript_r_int",
3030
cmd = """
3131
cp $(locations :exascript_r_tmp_cc) $(location exascript_r_wrap.R) $(location exascript_r_preset.R) . &&
32-
python3 $(location @exaudfclient//base:build_integrated.py) "$(location exascript_r_int.h)" exascript_r.R"" "exascript_r_wrap.R" "exascript_r_preset.R"
32+
python3 $(location @exaudfclient_base//:build_integrated.py) "$(location exascript_r_int.h)" exascript_r.R"" "exascript_r_wrap.R" "exascript_r_preset.R"
3333
""",
3434
outs = ["exascript_r_int.h"],
3535
srcs = ["exascript_r_wrap.R", "exascript_r_preset.R", ":exascript_r_tmp_cc"],
36-
tools = ["@exaudfclient//base:build_integrated.py"]
36+
tools = ["@exaudfclient_base//:build_integrated.py"]
3737
)
3838

3939
genrule(
4040
name = "filter_swig_code_exascript_r_h",
41-
cmd = 'python3 $(location @exaudfclient//base:filter_swig_code.py) "$@" "$<"',
41+
cmd = 'python3 $(location @exaudfclient_base//:filter_swig_code.py) "$@" "$<"',
4242
outs = ["exascript_r.h"],
4343
srcs = [":exascript_r_tmp_h"],
44-
tools = ["@exaudfclient//base:filter_swig_code.py"]
44+
tools = ["@exaudfclient_base//:filter_swig_code.py"]
4545
)
4646

4747
genrule(
4848
name = "filter_swig_code_exascript_r_cc",
4949
cmd = """
5050
cp $(locations :exascript_r_tmp_cc) .
51-
python3 $(location @exaudfclient//base:filter_swig_code.py) "$@" "exascript_r_tmp.cc"
51+
python3 $(location @exaudfclient_base//:filter_swig_code.py) "$@" "exascript_r_tmp.cc"
5252
""",
5353
outs = ["exascript_r.cc"],
5454
srcs = [":exascript_r_tmp_cc"],
55-
tools = ["@exaudfclient//base:filter_swig_code.py"]
55+
tools = ["@exaudfclient_base//:filter_swig_code.py"]
5656
)
5757

5858
config_setting(
@@ -72,7 +72,7 @@ cc_library(
7272
srcs = [":filter_swig_code_exascript_r_cc",":filter_swig_code_exascript_r_h"],
7373
hdrs = [":filter_swig_code_exascript_r_h"],
7474
copts = ["-DENABLE_R_VM"]+optimize_copts,
75-
deps = ["@R_linux//:r-lib","@exaudfclient//base/exaudflib:exaudflib-deps","@exaudfclient//base/exaudflib:header"],
75+
deps = ["@R_linux//:r-lib","@exaudfclient_base//exaudflib:exaudflib-deps","@exaudfclient_base//exaudflib:header"],
7676
alwayslink = True,
7777
)
7878

@@ -83,6 +83,6 @@ cc_library(
8383
include_prefix = ".",
8484
data = ["exascript_r_wrap.R", "exascript_r_preset.R"], #TODO do we need this, because build_integreted
8585
hdrs = ["filter_swig_code_exascript_r_h","exascript_r_int", "rcontainer.h"],
86-
deps = ["@R_linux//:r-lib",":exascript_r","@exaudfclient//base/exaudflib:header"],
86+
deps = ["@R_linux//:r-lib",":exascript_r","@exaudfclient_base//exaudflib:header"],
8787
alwayslink = True,
8888
)

exaudfclient/rcontainer/rcontainer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <R_ext/Boolean.h>
99
#include "exascript_r.h"
1010
#include "exascript_r_int.h"
11-
#include "base/exaudflib/swig/swig_result_handler.h"
11+
#include "exaudflib/swig/swig_result_handler.h"
1212

1313
using namespace SWIGVMContainers;
1414
using namespace std;

exaudfclient/rcontainer/rcontainer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef RCONTAINER_H
22
#define RCONTAINER_H
33

4-
#include "base/exaudflib/vm/swig_vm.h"
4+
#include "exaudflib/vm/swig_vm.h"
55

66

77
using namespace SWIGVMContainers;

0 commit comments

Comments
 (0)