Closed julianakwan closed 6 years ago
I did some quick digging and there may be a compiler issue. Do you have access to a newer compiler, say gcc6+? or a different compiler like icc?
The latest one that I can easily get access to is gcc 4.8.4, but I can ask the support desk. I also have Clang, would that help?
Sure - worth a shot
In the likely event that we have to investigate further, this page has some instructions for portably detecting cpu features: link on intel.com
Has your compile issue sorted itself out?
@julianakwan I am going to go assume that this issue has been resolved (or no longer relevant).
Please feel free to re-open if you need
I’m trying to install Corrfunc on a cluster and I’m getting some weird errors about the assembly part of the code in cpu_features.h. It is possible to replace these functions somehow? I’m using a BG/Q with gcc version 4.7.2.
I’ve pasted the full error below.
Thanks! Juliana
mpicc -DVERSION=\"2.1.0\" -DUSE_UNICODE -std=c99 -m64 -g -Wsign-compare -Wall -Wextra -Wshadow -Wunused -fPIC -D_POSIX_SOURCE=200809L -D_GNU_SOURCE -D_DARWIN_C_SOURCE -O3 -funroll-loops -fno-strict-aliasing -Wformat=2 -Wpacked -Wnested-externs -Wpointer-arith -Wredundant-decls -Wfloat-equal -Wcast-qual -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wstrict-prototypes -Wno-unused-local-typedefs -I../../io -I../../utils -c countpairs.c -o countpairs.o mpicc -DVERSION=\"2.1.0\" -DUSE_UNICODE -std=c99 -m64 -g -Wsign-compare -Wall -Wextra -Wshadow -Wunused -fPIC -D_POSIX_SOURCE=200809L -D_GNU_SOURCE -D_DARWIN_C_SOURCE -O3 -funroll-loops -fno-strict-aliasing -Wformat=2 -Wpacked -Wnested-externs -Wpointer-arith -Wredundant-decls -Wfloat-equal -Wcast-qual -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wstrict-prototypes -Wno-unused-local-typedefs -I../../io -I../../utils -c ../../utils/cpu_features.c -o ../../utils/cpu_features.o In file included from ../../utils/cpu_features.c:11:0: ../../utils/cpu_features.c: In function 'instrset_detect': ../../utils/cpu_features.h:25:4: error: impossible register constraint in 'asm' ../../utils/cpu_features.h:25:4: error: impossible register constraint in 'asm' ../../utils/cpu_features.h:54:4: error: impossible register constraint in 'asm' ../../utils/cpu_features.h:25:4: error: impossible register constraint in 'asm' ../../utils/cpu_features.h:25:4: error: impossible register constraint in 'asm' make[2]: [../../utils/cpu_features.o] Error 1 make[2]: Leaving directory `/gpfs/mira-home/jkwan/Corrfunc/theory/DD' make[1]: [DD] Error 2 make[1]: Leaving directory `/gpfs/mira-home/jkwan/Corrfunc/theory’
For reference, Line 25 of cpu_features.h is: __asm("cpuid" : "=a"(a),"=b"(b),"=c"(c),"=d"(d) : "a"(functionnumber),"c"(0) );