Error compiling for v1.14 or 1.15
Want to insatll and make ucx but failed: This is the gcc version i used.
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/public/home/user/prefix/libexec/gcc/x86_64-pc-linux-gnu/13.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/public/home/yuqing/prefix --enable-threads=posix --disable-checking --enable--long-long --enable-languages=c,c++,fortran --disable-multilib --with-gmp=/public/home/yuqing/prefix --with-mpfr=/public/home/user/prefix --with-mpc=/public/user/yuqing/prefix --with-isl=/public/user/yuqing/prefix
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.2.0 (GCC)
trying to compile the version ( 1.14.1) gives a compilation error:
make[3]: Entering directory `/public/home/yuqing/software/openmpi_dependency/ucx/src/uct'
CC base/libuct_la-uct_md.lo
base/uct_md.c:559:1: error: conflicting types for 'uct_md_mem_advise' due to enum/integer mismatch;have 'ucs_status_t(struct uct_md *, void *, void *, size_t, unsigned int)' {aka 'ucs_status_t(struct uct_md *, void *, void *, long unsigned int, unsigned int)'} [-Werror=enum-int-mismatch]
559 | uct_md_mem_advise(uct_md_h md, uct_mem_h memh, void *addr, size_t length,
| ^~~~~~~~~~~~~~~~~
In file included from base/uct_component.h:11,
from base/uct_md.h:14,
from base/uct_md.c:13:
/public/home/yuqing/software/openmpi_dependency/ucx/src/uct/api/uct.h:2542:14: note: previous declaration of 'uct_md_mem_advise' with type 'ucs_status_t(struct uct_md *, void *, void *, size_t, uct_mem_advice_t)' {aka 'ucs_status_t(struct uct_md *, void *, void *, long unsigned int, uct_mem_advice_t)'}
2542 | ucs_status_t uct_md_mem_advise(uct_md_h md, uct_mem_h memh, void *addr,
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [base/libuct_la-uct_md.lo] Error 1
make[3]: Leaving directory `/public/home/user/software/openmpi_dependency/ucx/src/uct'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/public/home/user/software/openmpi_dependency/ucx/src/uct'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/public/home/user/software/openmpi_dependency/ucx'
make: *** [all] Error 2
Besides, I'm trying to compile the version ( 1.15) gives a compilation error:
make[2]: Entering directory `/public/home/user/software/openmpi_dependency/ucx-1.15.0/bindings/go'
go env -w GO111MODULE=off ; \
cd /public/home/user/software/openmpi_dependency/ucx-1.15.0/bindings/go/src/examples/perftest ;\
go build -o /public/home/user/software/openmpi_dependency/ucx-1.15.0/bindings/go/.libs/tmp/goperftest
/bin/sh: line 1: cd: /public/home/user/software/openmpi_dependency/ucx-1.15.0/bindings/go/src/examples/perftest: No such file or directory
package .: no Go files in /public/home/user/software/openmpi_dependency/ucx-1.15.0/bindings/go
make[2]: *** [goperftest] Error 1
make[2]: Leaving directory `/public/home/user/software/openmpi_dependency/ucx-1.15.0/bindings/go'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/public/home/user/software/openmpi_dependency/ucx-1.15.0'
make: *** [all] Error 2
The first compilation error was fixed by https://github.com/openucx/ucx/pull/8804
Could you please check if this patch https://github.com/openucx/ucx/pull/9795 fixes the second issue?
Thanks for your reply
The first compilation error was fixed by #8804,but another error occured
In file included from /public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucp/core/ucp_request.inl:17,
from wireup/wireup.c:17:
In function 'ucs_mpool_put_inline',
inlined from 'ucp_request_put' at /public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucp/core/ucp_request.inl:137:5,
inlined from 'ucp_request_complete_send' at /public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucp/core/ucp_request.inl:147:5,
inlined from 'ucp_request_try_send' at /public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucp/core/ucp_request.inl:233:9,
inlined from 'ucp_request_send' at /public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucp/core/ucp_request.inl:258:13,
inlined from 'ucp_wireup_msg_send' at wireup/wireup.c:195:5:
/public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucs/datastruct/mpool.inl:78:10: error: array subscript -1 is outside array bounds of 'ucp_request_t[1]' {aka 'struct ucp_request[1]'} [-Werror=array-bounds=]
78 | mp = elem->mpool;
| ~~~~~^~~~~~~~~~~~~
In file included from /public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucs/sys/sys.h:19,
from /public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucs/async/signal.h:13,
from /public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucs/async/async.h:11,
from /public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucp/core/ucp_thread.h:14,
from /public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucp/core/ucp_context.h:14,
from wireup/wireup.h:11,
from wireup/wireup.c:11:
wireup/wireup.c: In function 'ucp_wireup_msg_send':
/public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucs/debug/memtrack.h:130:52: note: at offset -8 into object of size 240 allocated by 'malloc'
130 | #define ucs_malloc(_s, ...) malloc(_s)
| ^~~~~~~~~~
wireup/wireup.c:161:11: note: in expansion of macro 'ucs_malloc'
161 | req = ucs_malloc(sizeof(*req), "wireup_msg_req");
| ^~~~~~~~~~
In function 'ucs_mpool_add_to_freelist',
inlined from 'ucs_mpool_put_inline' at /public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucs/datastruct/mpool.inl:79:5,
inlined from 'ucp_request_put' at /public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucp/core/ucp_request.inl:137:5,
inlined from 'ucp_request_complete_send' at /public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucp/core/ucp_request.inl:147:5,
inlined from 'ucp_request_try_send' at /public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucp/core/ucp_request.inl:233:9,
inlined from 'ucp_request_send' at /public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucp/core/ucp_request.inl:258:13,
inlined from 'ucp_wireup_msg_send' at wireup/wireup.c:195:5:
/public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucs/datastruct/mpool.inl:55:20: error: array subscript -1 is outside array bounds of 'ucp_request_t[1]' {aka 'struct ucp_request[1]'} [-Werror=array-bounds=]
55 | elem->next = mp->freelist;
| ~~~~~~~~~~~^~~~~~~~~~~~~~
wireup/wireup.c: In function 'ucp_wireup_msg_send':
/public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucs/debug/memtrack.h:130:52: note: at offset -8 into object of size 240 allocated by 'malloc'
130 | #define ucs_malloc(_s, ...) malloc(_s)
| ^~~~~~~~~~
wireup/wireup.c:161:11: note: in expansion of macro 'ucs_malloc'
161 | req = ucs_malloc(sizeof(*req), "wireup_msg_req");
| ^~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [wireup/libucp_la-wireup.lo] Error 1
make[2]: Leaving directory `/public/home/yuqing/software/openmpi_dependency/ucx-1.9.0/src/ucp'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/public/home/yuqing/software/openmpi_dependency/ucx-1.9.0'
make: *** [all] Error 2
I have changed the bindings/go/Makefile.am file as followd.
42 goperftest: build
43 $(GO) env -w GO111MODULE=off ; \
44 cd $(abs_top_srcdir)/bindings/go/src/examples/perftest ;\
45 $(GO) build -o ${GOTMPDIR}/goperftest
46
47 run-perftest: goperftest
48 cd $(abs_top_srcdir)/bindings/go/src/examples/perftest ;\
49 LD_LIBRARY_PATH=$(UCX_SOPATH):${LD_LIBRARY_PATH} ${GOTMPDIR}/goperftest ${ARGS}
However, this patch https://github.com/openucx/ucx/pull/9795 seems useless for the second issue and same error happened.
make[2]: Entering directory `/public/home/yuqing/software/openmpi_dependency/ucx-1.15.0/bindings/go'
go env -w GO111MODULE=off ; \
cd /public/home/yuqing/software/openmpi_dependency/ucx-1.15.0/bindings/go/src/examples/perftest ;\
go build -o /public/home/yuqing/software/openmpi_dependency/ucx-1.15.0/bindings/go/.libs/tmp/goperftest
/bin/sh: line 1: cd: /public/home/yuqing/software/openmpi_dependency/ucx-1.15.0/bindings/go/src/examples/perftest: No such file or directory
package .: no Go files in /public/home/yuqing/software/openmpi_dependency/ucx-1.15.0/bindings/go
make[2]: *** [goperftest] Error 1
make[2]: Leaving directory `/public/home/yuqing/software/openmpi_dependency/ucx-1.15.0/bindings/go'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/public/home/yuqing/software/openmpi_dependency/ucx-1.15.0'
make: *** [all] Error 2
Which version of Go do you use?
As a workaround you can disable Go bindings adding --without-go to your configure command line.
Error be sovled ,thanks for your recommend. Besides this is the go version, go1.17.6 linux/amd64.