Hi I downloaded and the compiled the ray cpp template and I compiled the following code using “sh run.sh” for experimentation:
int Plus(int x, int y) { return x + y; }
RAY_REMOTE(Plus);
with Bazel 7.1.1, gcc 11.4.0, and I am trying to call it from Python:
obj = ray.cross_language.cpp_function(“Plus”).remote(1+2)
print(ray.get(obj))
But I get the following error when I run it on a SLURM cluster:
function_helper.cc:43: Failed to load library, lib_path: “…/plus.so”, failed reason: boost::dll::shared_library::load() failed (dlerror system message: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.29’ not found (required by …/plus.so)): Bad file descriptor [generic:9]
*** StackTrace Information ***
venv/lib/python3.8/site-packages/ray/cpp/lib/libray_api.so(+0xf9a9ca) [0x155554cfd9ca] ray::operator<<()
venv/lib/python3.8/site-packages/ray/cpp/lib/libray_api.so(_ZN3ray13SpdLogMessage5FlushEv+0x447) [0x155554cff287] ray::SpdLogMessage::Flush()
venv/lib/python3.8/site-packages/ray/cpp/lib/libray_api.so(_ZN3ray6RayLogD1Ev+0x37) [0x155554cff727] ray::RayLog::~RayLog()
venv/lib/python3.8/site-packages/ray/cpp/lib/libray_api.so(+0x549860) [0x1555542ac860] ray::internal::FunctionHelper::LoadDll()
venv/lib/python3.8/site-packages/ray/cpp/lib/libray_api.so(_ZN3ray8internal14FunctionHelper22LoadFunctionsFromPathsERKSt6vectorISsSaISsEE+0x357) [0x1555543dd357] ray::internal::FunctionHelper::LoadFunctionsFromPaths()
venv/lib/python3.8/site-packages/ray/cpp/lib/libray_api.so(_ZN3ray8internal18AbstractRayRuntime6DoInitEv+0x135) [0x1555543a04c5] ray::internal::AbstractRayRuntime::DoInit()
venv/lib/python3.8/site-packages/ray/cpp/lib/libray_api.so(_ZN3ray4InitERNS_9RayConfigEiPPc+0x6c) [0x1555543887ec] ray::Init()
venv/lib/python3.8/site-packages/ray/cpp/default_worker() [0x400bd7] main
e[33m(raylet)e[0m /lib64/libc.so.6(__libc_start_main+0xe5) [0x15555306ad85] __libc_start_main
venv/lib/python3.8/site-packages/ray/cpp/default_worker() [0x400c74]
Please let me know how to fix it.