diff --git a/CMakeLists.txt b/CMakeLists.txt index eb7fe8675..6f5dc67d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,8 +58,8 @@ else () COMMAND mkdir ARGS -p ${CMAKE_BINARY_DIR}/server/plugins COMMAND ln ARGS -sf ${CMAKE_BINARY_DIR}/sdk/examples/order_plugin_example.so ${CMAKE_BINARY_DIR}/server/plugins/ COMMAND ln ARGS -sf ${CMAKE_BINARY_DIR}/sdk/examples/ai_order_plugin_example.so ${CMAKE_BINARY_DIR}/server/plugins/ - COMMAND mkdir ARGS -p ${CMAKE_BINARY_DIR}/server/plugins/lib - COMMAND ln ARGS -sf ${EXTERNALS_ROOT}/lib/Release/libtensorflow.so ${CMAKE_BINARY_DIR}/server + COMMAND ln ARGS -sf ${EXTERNALS_ROOT}/lib/Release/libtensorflow.so ${CMAKE_BINARY_DIR}/server/plugins + COMMENT "Creating server runtime layout" DEPENDS sparkd data_files_dir) diff --git a/externals b/externals index 4bce2c071..438fa88fa 160000 --- a/externals +++ b/externals @@ -1 +1 @@ -Subproject commit 4bce2c071ebbe18ebb5b173fd4a364b1e83c0726 +Subproject commit 438fa88fa51e9db35e2c0c22ef88680c42b9ddc1 diff --git a/src/sdk/examples/build_examples.sh b/src/sdk/examples/build_examples.sh index e142c5fdb..a6465cabd 100755 --- a/src/sdk/examples/build_examples.sh +++ b/src/sdk/examples/build_examples.sh @@ -9,7 +9,6 @@ g++ -isystem ../externals/include \ -Wl,-rpath,../lib \ -L ../lib \ -l spark \ - -l tensorflow \ -llttng-ust \ -ldl @@ -38,10 +37,13 @@ g++ -isystem ../externals/include \ -o ai_order_plugin_example.so \ ai_order_plugin_example.cpp \ ../tensorflow/tfapi.cpp \ + -Wl,-rpath,. \ -Wl,-rpath,.. \ -Wl,-rpath,../lib/ \ + -Wl,-rpath,./plugins \ -L ../lib \ -l spark \ + -L ../externals/lib \ -l tensorflow g++ -isystem ../externals/include \ @@ -53,12 +55,13 @@ g++ -isystem ../externals/include \ -o tf_test \ tf_test.cpp \ ../tensorflow/tfapi.cpp \ - -Wl,-rpath,.. \ + -Wl,-rpath,. \ -Wl,-rpath,../lib \ + -Wl,-rpath,../externals/lib \ -L ../lib \ -l spark \ + -L ../externals/lib \ -l tensorflow \ -lpthread \ -llttng-ust \ -ldl - diff --git a/src/sdk/examples/tf_test.cpp b/src/sdk/examples/tf_test.cpp index b845761a0..20c87fa2b 100644 --- a/src/sdk/examples/tf_test.cpp +++ b/src/sdk/examples/tf_test.cpp @@ -21,10 +21,10 @@ int main() } cout << "loading saved model" << "\n"; - TFStatus status2 = bts::ml::load_tf_model("~/rnn_saved_model", session); + TFStatus status2 = bts::ml::load_tf_model("/home/bts/rnn_saved_model/", session); cout << "loaded saved model" << "\n"; if (!status2.ok()) { - cout << status2.code << "\n"; + cout << status2.code << "\n" << status2.error; return 1; } cout << "Session successfully created.\n";