This repo used to work fine on all my machines, but now one of them cannot compile the code. The machine has had its OS reinstalled recently (so I may have missed something in the installation) but libnuma-dev has been installed via apt-get.
uname -a says: Linux 3.11.0-13-generic #20-Ubuntu SMP Wed Oct 23 17:26:33 UTC 2013 i686 i686 i686 GNU/Linux
gcc --version says: gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1
and the output of python run.py is:
Can't read /sys/devices/system/node
Don't know how many NUMA nodes we have, assuming 1 (UMA)
Detected system topology:
CPU 0: socket 0, node 0, best CPU0 shared cache level: 1
CPU 1: socket 0, node 0, best CPU0 shared cache level: 3
CPU 2: socket 0, node 0, best CPU0 shared cache level: 3
CPU 3: socket 0, node 0, best CPU0 shared cache level: 3
CPU 4: socket 1, node 0, best CPU0 shared cache level: memory
CPU 5: socket 1, node 0, best CPU0 shared cache level: memory
CPU 6: socket 1, node 0, best CPU0 shared cache level: memory
CPU 7: socket 1, node 0, best CPU0 shared cache level: memory
Testing using target CPUs: [0, 1, 4]
cc -g -Wall -O3 -D_GNU_SOURCE -DNDEBUG -std=gnu99 -DUSE_INLINE_ASM -DLinux -c -o atomicio.o atomicio.c
cc -g -Wall -O3 -D_GNU_SOURCE -DNDEBUG -std=gnu99 -DUSE_INLINE_ASM -DLinux -c -o test.o test.c
In file included from test.c:44:0:
test.h: In function ‘rdtsc’:
test.h:72:3: warning: left shift count >= width of type [enabled by default]
return (d << 32) | a;
^
test.c: In function ‘parent_main’:
test.c:196:5: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘size_t’ [-Wformat=]
delta / (td->count * 1e6));
^
test.c:204:5: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 13 has type ‘size_t’ [-Wformat=]
((((td->count * (int64_t)1e6) / delta) * td->size * 8) / (int64_t) 1e6));
^
test.c:77:3: error: inconsistent operand constraints in an ‘asm’
asm volatile ("rep stosq\n"
^
make: *** [test.o] Error 1
rm atomicio.o
Make failed -- check you have libnuma headers and libraries available
Changing Makefile to say CC=gcc-4.6 gives the following error (irrelevant output redacted:
In file included from test.c:44:0:
test.h: In function ‘rdtsc’:
test.h:72:3: warning: left shift count >= width of type [enabled by default]
test.c: In function ‘parent_main’:
test.c:196:5: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘size_t’ [-Wformat]
test.c:204:5: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 13 has type ‘size_t’ [-Wformat]
test.c:77:3: error: impossible register constraint in ‘asm’
make: *** [test.o] Error 1
rm atomicio.o
Make failed -- check you have libnuma headers and libraries available
This repo used to work fine on all my machines, but now one of them cannot compile the code. The machine has had its OS reinstalled recently (so I may have missed something in the installation) but
libnuma-devhas been installed viaapt-get.uname -asays:Linux 3.11.0-13-generic #20-Ubuntu SMP Wed Oct 23 17:26:33 UTC 2013 i686 i686 i686 GNU/Linuxgcc --versionsays:gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1and the output of
python run.pyis:Changing
Makefileto sayCC=gcc-4.6gives the following error (irrelevant output redacted: