manodeep / Corrfunc

⚡️⚡️⚡️Blazing fast correlation functions on the CPU.
https://corrfunc.readthedocs.io
MIT License
163 stars 50 forks source link

Help with installing on macOS Ventura 13 #298

Closed boryanah closed 1 year ago

boryanah commented 1 year ago

Hi,

I am trying to help a student install Corrfunc on their MacBook, which has the latest OS (Ventura 13, I believe). We tried Method 2 (i.e., directly using pip), but ran into the failed building wheel for Corrfunc error. Then we tried Method 1, but unfortunately got the following error after running make CC=gcc-13:

In file included from ../../utils/cpu_features.c:13:

In function 'cpuid',

    inlined from 'runtime_instrset_detect' at ../../utils/cpu_features.c:27:5:

../../utils/cpu_features.h:41:4: error: impossible constraint in 'asm'

   41 |    __asm("cpuid" : "=a"(a),"=b"(b),"=c"(c),"=d"(d) : "a"(functionnumber),"c"(0) );

      |    ^~~~~

In function 'cpuid',

    inlined from 'runtime_instrset_detect' at ../../utils/cpu_features.c:29:5,

    inlined from 'runtime_instrset_detect' at ../../utils/cpu_features.c:19:5:

../../utils/cpu_features.h:41:4: error: impossible constraint in 'asm'

   41 |    __asm("cpuid" : "=a"(a),"=b"(b),"=c"(c),"=d"(d) : "a"(functionnumber),"c"(0) );

      |    ^~~~~

In function 'xgetbv',

    inlined from 'runtime_instrset_detect' at ../../utils/cpu_features.c:54:10,

    inlined from 'runtime_instrset_detect' at ../../utils/cpu_features.c:19:5:

../../utils/cpu_features.h:69:4: error: impossible constraint in 'asm'

   69 |    __asm("xgetbv" : "=a"(a),"=d"(d) : "c"(ctr) : );

      |    ^~~~~

In function 'cpuid',

    inlined from 'runtime_instrset_detect' at ../../utils/cpu_features.c:58:5,

    inlined from 'runtime_instrset_detect' at ../../utils/cpu_features.c:19:5:

../../utils/cpu_features.h:41:4: error: impossible constraint in 'asm'

   41 |    __asm("cpuid" : "=a"(a),"=b"(b),"=c"(c),"=d"(d) : "a"(functionnumber),"c"(0) );

      |    ^~~~~

In function 'cpuid',

    inlined from 'runtime_instrset_detect' at ../../utils/cpu_features.c:62:5,

    inlined from 'runtime_instrset_detect' at ../../utils/cpu_features.c:19:5:

../../utils/cpu_features.h:41:4: error: impossible constraint in 'asm'

   41 |    __asm("cpuid" : "=a"(a),"=b"(b),"=c"(c),"=d"(d) : "a"(functionnumber),"c"(0) );

      |    ^~~~~

make[2]: *** [../../utils/cpu_features.o] Error 1

make[1]: *** [DD] Error 2

make: *** [theory] Error 2

Do you know what could be going wrong and what else we can try?

manodeep commented 1 year ago

@boryanah Thanks for reporting this! Yeah, this is a known issue and we are working towards a fix. In the meantime, please follow the comments/steps in #294 - hopefully that will at least let you compile and run (with FALLBACK kernels).

boryanah commented 1 year ago

Thanks a lot! We managed to install it following the instructions in that thread.

manodeep commented 1 year ago

Ohh great - glad at least you could use the workaround and get Corrfunc running. I am closing this issue but please feel free to reopen if you need additional help.