likwid 5.1.0 compiling speed bump

20 views
Skip to first unread message

E. Wes Bethel

unread,
Mar 9, 2021, 6:02:40 PM3/9/21
to likwid-users

Greetings,

I ran into a snag doing a compile, output is below.

System info:
gcc --version: 10.2.1 20201125
nvcc --version: release 11.2, V11.2.67
OS: Linux Fedora 33
CPUs: dual Skylake
GPU: GTX 1080

I was attempting to build with the NVIDIA interface enabled (it builds
fine when not trying to build with the NVIDIA interface enabled)

Any ideas?

Thanks,
wes



===> COMPILE GCC/topology_proc.o
===> COMPILE GCC/tree.o
===> COMPILE GCC/voltage.o
===> COMPILE GCC/loadData.o
===> ENTER /home/wes/builds/likwid-5.1.0-src/ext/hwloc
Info: Compiling for perf_event interface. Measurements of thermal
information is disabled
===> ENTER /home/wes/builds/likwid-5.1.0-src/ext/lua
Info: Compiling for perf_event interface. Measurements of thermal
information is disabled
In function ‘createstrobj’,
inlined from ‘luaS_createlngstrobj’ at ./src/lstring.c:148:17,
inlined from ‘luaS_newlstr’ at ./src/lstring.c:206:10:
./src/lstring.c:142:17: warning: writing 1 byte into a region of size 0
[-Wstringop-overflow=]
142 | getstr(ts)[l] = '\0'; /* ending 0 */
In file included from ./includes/ldebug.h:11,
from ./src/lstring.c:17:
./src/lstring.c: In function ‘luaS_newlstr’:
./includes/lstate.h:185:18: note: at offset 0 to object ‘ts’ with size
24 declared here
185 | struct TString ts;
| ^~
===> CREATE SHARED LIB liblikwid.so
/bin/ld: ./GCC/topology_gpu.o:(.bss+0x50): multiple definition of
`cuDeviceGetPtr'; ./GCC/nvmon.o:(.bss+0x2b0): first defined here
/bin/ld: ./GCC/topology_gpu.o:(.bss+0x48): multiple definition of
`cuDeviceGetCountPtr'; ./GCC/nvmon.o:(.bss+0x2a8): first defined here
/bin/ld: ./GCC/topology_gpu.o:(.bss+0x40): multiple definition of
`cuDeviceGetNamePtr'; ./GCC/nvmon.o:(.bss+0x2a0): first defined here
/bin/ld: ./GCC/topology_gpu.o:(.bss+0x38): multiple definition of
`cuInitPtr'; ./GCC/nvmon.o:(.bss+0x298): first defined here
/bin/ld: ./GCC/topology_gpu.o:(.bss+0x28): multiple definition of
`cuDeviceGetAttributePtr'; ./GCC/nvmon.o:(.bss+0x190): first defined here
/bin/ld: ./GCC/topology_gpu.o:(.bss+0x8): multiple definition of
`cudaDriverGetVersionPtr'; ./GCC/nvmon.o:(.bss+0x178): first defined here
/bin/ld: ./GCC/topology_gpu.o:(.bss+0x0): multiple definition of
`cudaRuntimeGetVersionPtr'; ./GCC/nvmon.o:(.bss+0x170): first defined here
collect2: error: ld returned 1 exit status

--
Wes Bethel -- (v) 510-486-7353 -- (f) 510-486-5812 -- dav.lbl.gov/~wes

E. Wes Bethel

unread,
Mar 11, 2021, 10:30:42 AM3/11/21
to likwid-users

Greetings,

The problem below also occurs in 5.1.1-rc1.

Any suggestions?

Thanks,
wes

Thomas Gruber

unread,
Mar 11, 2021, 1:00:49 PM3/11/21
to likwid-users
Hi Wes,

the simplest solution probably is to rename the function pointers in topology_gpu.c. I just tries compilation with GCC, ACCESSMODE=perf_event and NVIDIA_INTERFACE=true and didn't get the error. So, it seems special for your system but to avoid future problems, I will rename them.

I have to rename topology_gpu.c in general because it covers only Nvidia GPUs at the moment but support for other accelerators is planned.

See rename_cuda_fptr_topology branch on Github.

I also don't see the warning from Lua compilation on my systems but most don't have GCC 10.2. I will try your configuration.

Best,
Thomas
Reply all
Reply to author
Forward
0 new messages