I want to write a test program with multiple threads and run that on gem5-gpu. I added "-pthread" in CFLAGS. The error is:
g++-4.8 -DOUTPUT -pthread -O3 -DGEM5_FUSION matMult.cu_o -L../../libcuda -lcuda \
-L/z/liush/NVIDIA_SDK/C/lib \
-lz -static -static-libgcc -o gem5_fusion_matMult -L/usr/lib64 -lcutil_x86_64 -lm5op_x86 -lm -lc
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libpthread.a(lowlevellock.o): In function `__lll_lock_wait_private':
/build/buildd/eglibc-2.19/nptl/../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:78: multiple definition of `__lll_lock_wait_private'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libc.a(libc-lowlevellock.o):(.text+0x0): first defined here
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libpthread.a(lowlevellock.o): In function `__lll_unlock_wake_private':
/build/buildd/eglibc-2.19/nptl/../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:328: multiple definition of `__lll_unlock_wake_private'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libc.a(libc-lowlevellock.o):(.text+0x30): first defined here
collect2: error: ld returned 1 exit status
make: *** [gem5_fusion_matMult] Error 1
I tried gcc 4.4 and it also failed. Has anyone tried doing something like this? Or is there a way to run multi-thread programs on gem5-gpu.