Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenBLAS could not be compiled on SkyLake #72

Open
woodrush opened this issue Oct 3, 2015 · 0 comments
Open

OpenBLAS could not be compiled on SkyLake #72

woodrush opened this issue Oct 3, 2015 · 0 comments

Comments

@woodrush
Copy link

woodrush commented Oct 3, 2015

According to OpenMathLib/OpenBLAS#632, and as of 10/1/2015, the build system for OpenBLAS cannot recognize SkyLake CPUs, and for SkyLake the option TARGET=HASWELL must be specified for makeing OpenBLAS. I am using Ubuntu 15.04 and an Intel Core i7 6600 CPU and failed with the error

Cloning into 'OpenBLAS'...
remote: Counting objects: 17300, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 17300 (delta 2), reused 0 (delta 0), pack-reused 17292
Receiving objects: 100% (17300/17300), 14.80 MiB | 3.03 MiB/s, done.
Resolving deltas: 100% (11998/11998), done.
Checking connectivity... done.
getarch_2nd.c: In function ‘main’:
getarch_2nd.c:12:35: error: ‘SGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function)
printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
^
getarch_2nd.c:12:35: note: each undeclared identifier is reported only once for each function it appears in
getarch_2nd.c:13:35: error: ‘SGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function)
printf("SGEMM_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
^
getarch_2nd.c:14:35: error: ‘DGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function)
printf("DGEMM_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
^
getarch_2nd.c:15:35: error: ‘DGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function)
printf("DGEMM_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
^
getarch_2nd.c:19:35: error: ‘CGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function)
printf("CGEMM_UNROLL_M=%d\n", CGEMM_DEFAULT_UNROLL_M);
^
getarch_2nd.c:20:35: error: ‘CGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function)
printf("CGEMM_UNROLL_N=%d\n", CGEMM_DEFAULT_UNROLL_N);
^
getarch_2nd.c:21:35: error: ‘ZGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function)
printf("ZGEMM_UNROLL_M=%d\n", ZGEMM_DEFAULT_UNROLL_M);
^
getarch_2nd.c:22:35: error: ‘ZGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function)
printf("ZGEMM_UNROLL_N=%d\n", ZGEMM_DEFAULT_UNROLL_N);
^
getarch_2nd.c:67:50: error: ‘SGEMM_DEFAULT_Q’ undeclared (first use in this function)
printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAULT_UNROLL_N * 4 * 1 * sizeof(float)));
^
getarch_2nd.c:68:50: error: ‘DGEMM_DEFAULT_Q’ undeclared (first use in this function)
printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAULT_UNROLL_N * 2 * 1 * sizeof(double)));
^
getarch_2nd.c:69:50: error: ‘CGEMM_DEFAULT_Q’ undeclared (first use in this function)
printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAULT_UNROLL_N * 4 * 2 * sizeof(float)));
^
getarch_2nd.c:70:50: error: ‘ZGEMM_DEFAULT_Q’ undeclared (first use in this function)
printf("#define ZLOCAL_BUFFER_SIZE\t%ld\n", (ZGEMM_DEFAULT_Q * ZGEMM_DEFAULT_UNROLL_N * 2 * 2 * sizeof(double)));
^
make: *** [getarch_2nd] Error 1
Makefile:131: *** OpenBLAS: Detecting CPU failed. Please set TARGET explicitly, e.g. make TARGET=your_cpu_target. Please read README for the detail.. 中止.
Error. OpenBLAS could not be compiled    

I actually solved this problem by adding the TARGET=HASWELL option, therefore editing install-deps as

14,16c14,16
<         make NO_AFFINITY=1 USE_OPENMP=0 USE_THREAD=0
<     else
<         make NO_AFFINITY=1 USE_OPENMP=1

---
>         make NO_AFFINITY=1 USE_OPENMP=0 USE_THREAD=0 TARGET=HASWELL
>     else 
>         make NO_AFFINITY=1 USE_OPENMP=1 TARGET=HASWELL

Which let OpenBLAS compile successfully.

I believe this is more of an OpenBLAS problem, but the original issue on OpenBLAS is closed, but still this problem seems still not to be solved now, so please let me post this issue here. A quick fix for ezinstall may be to obtain the architecture name during the build (I believe OpenBLAS does it in getarch.c) but I also believe that should ultimately be dealt by the OpenBLAS build system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant