-
Notifications
You must be signed in to change notification settings - Fork 428
Compiling Applications with UCX
When compiling ucp_hello_world.c:
Can compile it dynamicaly:
gcc -o ucp_hello_world.dynamic ucp_hello_world.c -L${UCX_LIB} -I${UCX_INC} -lucp -lucs -luct -pedantic -Werror -Wl,-rpath,${UCX_LIB}
Or statically (For example, if UCX was compiled with: --with-verbs=/tmp/my_libs/ ):
gcc -o ucp_hello_world.static ucp_hello_world.c -Wl,--whole-archive ${UCX_LIB}/libucp.a ${UCX_LIB}/libuct.a -I${UCX_INC} ${UCX_LIB}/libucs.a ${UCX_LIB}/libucm.a /tmp/my_libs/lib/libibverbs.a /tmp/my_libs/lib/libibcm.a -Wl,--no-whole-archive -lpthread -ldl -lrt -lc -lbfd -lm -lnuma -lnl
UCX can be compiled with the --with-verbs option:
--with-verbs(=DIR) Build OpenFabrics support, adding DIR/include,
DIR/lib, and DIR/lib64 to the search path for
headers and libraries
This is useful when compiling UCX on a host where the needed lib/include files aren't under /usr .