【重要提示】
必须要把libtest_lib.so库编译出来,否则无法运行test程序,报ray::internal::RayFunctionNotFound: Executable function not found的错误。
oct1158@oct1158-ubuntu:~/Documents/Code/Python$ ./test
[2026-05-20 15:30:53,992 I 13205 13205] config_internal.cc:218: No code search path found yet. The program location path "/home/oct1158/Documents/Code/Python" will be added for searching dynamic libraries by default. And you can add some search paths by '--ray_code_search_path'
[2026-05-20 15:30:53,992 I 13205 13205] process_helper.cc:51: ray start --head --port 6379 --redis-username default --redis-password 5241590000000000 --node-ip-address '192.168.71.129'
Usage stats collection is enabled. To disable this, add `--disable-usage-stats` to the command that starts the cluster, or run the following command: `ray disable-usage-stats` before starting the cluster. See https://docs.ray.io/en/master/cluster/usage-stats.html for more details.
Local node IP: 192.168.71.129
--------------------
Ray runtime started.
--------------------
Next steps
To add another node to this Ray cluster, run
ray start --address='192.168.71.129:6379'
To connect to this Ray cluster:
import ray
ray.init(_node_ip_address='192.168.71.129')
To submit a Ray job using the Ray Jobs CLI:
RAY_API_SERVER_ADDRESS='http://127.0.0.1:8265' ray job submit --working-dir . -- python my_script.py
See https://docs.ray.io/en/latest/cluster/running-applications/job-submission/index.html
for more information on submitting Ray jobs to the Ray cluster.
To terminate the Ray runtime, run
ray stop
To view the status of the cluster, use
ray status
To monitor and debug Ray, view the dashboard at
127.0.0.1:8265
If connection to the dashboard fails, check your firewall settings and network configuration.
[2026-05-20 15:31:18,605 I 13205 13205] gcs_client.cc:96: GcsClient has no Cluster ID set, and won't fetch from GCS.
[2026-05-20 15:31:18,619 I 13205 13205] gcs_client.cc:96: GcsClient has no Cluster ID set, and won't fetch from GCS.
[2026-05-20 15:31:20,031 E 13205 13205] logging.cc:118: Unhandled exception: N3ray8internal16RayTaskExceptionE. what(): Invalid: An exception was thrown while executing function(MyFunction): ray::internal::RayFunctionNotFound: Executable function not found, the function name MyFunction /home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(+0x16db67a) [0x7dc17f6db67a] ray::operator<<()
/home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(+0x16dc12c) [0x7dc17f6dc12c] ray::RayLog::operator<< <>()
/home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(+0x9242e5) [0x7dc17e9242e5] ray::TerminateHandler()
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xae20c) [0x7dc17dcae20c]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xae277) [0x7dc17dcae277]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xae4d8) [0x7dc17dcae4d8]
/home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(+0x8a2e06) [0x7dc17e8a2e06] ray::internal::NativeObjectStore::CheckException()
/home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(_ZN3ray8internal17NativeObjectStore6GetRawERKSt6vectorINS_8ObjectIDESaIS3_EEi+0x217) [0x7dc17e98dbf7] ray::internal::NativeObjectStore::GetRaw()
/home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(_ZN3ray8internal17NativeObjectStore6GetRawERKNS_8ObjectIDEi+0x9c) [0x7dc17e98d83c] ray::internal::NativeObjectStore::GetRaw()
/home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(_ZN3ray8internal11ObjectStore3GetERKNS_8ObjectIDEi+0x13) [0x7dc17e98ecb3] ray::internal::ObjectStore::Get()
/home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(_ZN3ray8internal18AbstractRayRuntime3GetERKSsRKi+0x4c) [0x7dc17e981afc] ray::internal::AbstractRayRuntime::Get()
./test(+0xdc9b) [0x5591eb015c9b] ray::GetFromRuntime<>()
./test(+0xb92b) [0x5591eb01392b] ray::ObjectRef<>::Get()
./test(+0x4e42) [0x5591eb00ce42] main
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7dc17d829d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7dc17d829e40] __libc_start_main
./test(+0x4a65) [0x5591eb00ca65] _start
[2026-05-20 15:31:20,048 E 13205 13205] logging.cc:125: Stack trace:
/home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(+0x16db67a) [0x7dc17f6db67a] ray::operator<<()
/home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(+0x16dc12c) [0x7dc17f6dc12c] ray::RayLog::operator<< <>()
/home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(_ZN3ray16TerminateHandlerEv+0xa8) [0x7dc17f6de6e8] ray::TerminateHandler()
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xae20c) [0x7dc17dcae20c]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xae277) [0x7dc17dcae277]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xae4d8) [0x7dc17dcae4d8]
/home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(+0x8a2e06) [0x7dc17e8a2e06] ray::internal::NativeObjectStore::CheckException()
/home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(_ZN3ray8internal17NativeObjectStore6GetRawERKSt6vectorINS_8ObjectIDESaIS3_EEi+0x217) [0x7dc17e98dbf7] ray::internal::NativeObjectStore::GetRaw()
/home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(_ZN3ray8internal17NativeObjectStore6GetRawERKNS_8ObjectIDEi+0x9c) [0x7dc17e98d83c] ray::internal::NativeObjectStore::GetRaw()
/home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(_ZN3ray8internal11ObjectStore3GetERKNS_8ObjectIDEi+0x13) [0x7dc17e98ecb3] ray::internal::ObjectStore::Get()
/home/oct1158/.local/lib/python3.10/site-packages/ray/cpp/lib/libray_api.so(_ZN3ray8internal18AbstractRayRuntime3GetERKSsRKi+0x4c) [0x7dc17e981afc] ray::internal::AbstractRayRuntime::Get()
./test(+0xdc9b) [0x5591eb015c9b] ray::GetFromRuntime<>()
./test(+0xb92b) [0x5591eb01392b] ray::ObjectRef<>::Get()
./test(+0x4e42) [0x5591eb00ce42] main
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7dc17d829d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7dc17d829e40] __libc_start_main
./test(+0x4a65) [0x5591eb00ca65] _start
*** SIGABRT received at time=1779262280 on cpu 0 ***
PC: @ 0x7dc17d8969fc (unknown) pthread_kill
@ 0x7dc17d842520 (unknown) (unknown)
[2026-05-20 15:31:20,052 E 13205 13205] logging.cc:474: *** SIGABRT received at time=1779262280 on cpu 0 ***
[2026-05-20 15:31:20,052 E 13205 13205] logging.cc:474: PC: @ 0x7dc17d8969fc (unknown) pthread_kill
[2026-05-20 15:31:20,053 E 13205 13205] logging.cc:474: @ 0x7dc17d842520 (unknown) (unknown)
Aborted (core dumped)
oct1158@oct1158-ubuntu:~/Documents/Code/Python$