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

Please support AMD Bulldozer #118

Closed
BagOfMostlyWater opened this issue Jun 24, 2012 · 11 comments
Closed

Please support AMD Bulldozer #118

BagOfMostlyWater opened this issue Jun 24, 2012 · 11 comments
Milestone

Comments

@BagOfMostlyWater
Copy link

OpenBLAS fails to build for me on Opteron 62xx. (Ubuntu 12.04, openblas 0.1alpha2.2)

Without DYNAMIC_ARCH=1
gemm.c: In function 'sgemm_':
gemm.c:392:37: error: 'GEMM_DEFAULT_OFFSET_A' undeclared (first use in this function)

With DYNAMIC_ARCH=1:
In file included from gemm3m.c:57:0:
gemm3m_level3.c: In function 'cgemm3m_cn':
gemm3m_level3.c:329:25: error: 'SGEMM_DEFAULT_UNROLL_M' undeclared (first use in this function)

Also:

getarch_2nd.c: In function 'main':
getarch_2nd.c:12:35: error: 'SGEMM_DEFAULT_UNROLL_M' undeclared (first use in this function)
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)
getarch_2nd.c:14:35: error: 'DGEMM_DEFAULT_UNROLL_M' undeclared (first use in this function)
getarch_2nd.c:15:35: error: 'DGEMM_DEFAULT_UNROLL_N' undeclared (first use in this function)
getarch_2nd.c:19:35: error: 'CGEMM_DEFAULT_UNROLL_M' undeclared (first use in this function)
getarch_2nd.c:20:35: error: 'CGEMM_DEFAULT_UNROLL_N' undeclared (first use in this function)
getarch_2nd.c:21:35: error: 'ZGEMM_DEFAULT_UNROLL_M' undeclared (first use in this function)
getarch_2nd.c:22:35: error: 'ZGEMM_DEFAULT_UNROLL_N' undeclared (first use in this function)
getarch_2nd.c:29:50: error: 'SGEMM_DEFAULT_Q' undeclared (first use in this function)
getarch_2nd.c:30:50: error: 'DGEMM_DEFAULT_Q' undeclared (first use in this function)
getarch_2nd.c:31:50: error: 'CGEMM_DEFAULT_Q' undeclared (first use in this function)
getarch_2nd.c:32:50: error: 'ZGEMM_DEFAULT_Q' undeclared (first use in this function)
make[1]: *** [getarch_2nd] Error 1

@xianyi
Copy link
Collaborator

xianyi commented Jun 25, 2012

Hi @BagOfMostlyWater ,

We didn't support AMD Bulldozer now. Because we didn't have the Bulldozer box, we didn't have the plan about optimization on Bulldozer.

Try this.

  make TARGET=SHANGHAI

This will build the library about AMD Shanghai.

You can also try AMD ACML library which is optimized for Bulldozer.

Thanks

Xianyi

@BagOfMostlyWater
Copy link
Author

On Sun, Jun 24, 2012 at 09:06:24PM -0700, Xianyi Zhang wrote:

Try this.

  make TARGET=SHANGHAI

This will build the library about AMD Shanghai.

Thank you, this enables the build to complete.

Ryan

@xianyi
Copy link
Collaborator

xianyi commented Jun 25, 2012

Hi Ryan,

I added Bulldozer detection into develop branch. You can download from this link. https://github.com/xianyi/OpenBLAS/tarball/develop

Please test it on your AMD Opteron 62xx.

Thanks

Xianyi

@BagOfMostlyWater
Copy link
Author

On Mon, Jun 25, 2012 at 02:33:30AM -0700, Xianyi Zhang wrote:

I added Bulldozer detection into develop branch. You can download from
this link. https://github.com/xianyi/OpenBLAS/tarball/develop

Please test it on your AMD Opteron 62xx.

Hi Xianyi,

Thanks for doing that. There were some core dumps during the make within
the test/ subdirectory:

Test of subprogram number 5 SCOPY
----- PASS -----

Test of subprogram number 6 SSWAP
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./cblat3 < ./cblat3.dat
Segmentation fault (core dumped)
make[1]: *** [level1] Error 139
make[1]: *** Waiting for unfinished jobs....
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./cblat2 < ./cblat2.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./zblat3 < ./zblat3.dat
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./zblat2 < ./zblat2.dat
rm -f ?BLAT3.SUMM
OPENBLAS_NUM_THREADS=2 ./sblat3 < ./sblat3.dat
Segmentation fault (core dumped)
make[1]: *** [level3] Error 139
rm -f ?BLAT2.SUMM
OPENBLAS_NUM_THREADS=2 ./sblat2 < ./sblat2.dat
Segmentation fault (core dumped)
make[1]: *** [level2] Error 139
make[1]: Leaving directory `/var/tmp/xianyi-OpenBLAS-0a958b6/test'
make: *** [tests] Error 2

It seems that all the tests with OPENBLAS_NUM_THREADS=2 are failing.

gdb of sblat1:
Program received signal SIGSEGV, Segmentation fault.
0x000000000040561d in blas_level1_thread ()

gdb of sblat2:
Program received signal SIGSEGV, Segmentation fault.
0x00000000004197ec in sgemv_thread_n ()

gdb of sblat3:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000431e2b in gemm_driver ()

Just let me know if you'd like me to perform other steps and I'll send you
the output.

Ryan

@xianyi
Copy link
Collaborator

xianyi commented Jun 25, 2012

Hi Ryan,

Could you build the debug version?

   make DEBUG=1 NO_LAPACK=1 NO_CBLAS=1

Then, you can debug sblat1. Please try serial version (export OMP_NUM_THREADS=1 ) at first

Thank you

Xianyi

@BagOfMostlyWater
Copy link
Author

On Mon, Jun 25, 2012 at 04:29:22PM -0700, Xianyi Zhang wrote:

Could you build the debug version?

   make DEBUG=1 NO_LAPACK=1 NO_CBLAS=1

Then, you can debug sblat1. Please try serial version (export
OMP_NUM_THREADS=1 ) at first

Here are some results:

$ OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 gdb ./sblat1
...
(gdb) r
Starting program: /var/tmp/xianyi-OpenBLAS-0a958b6/test/sblat1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Real BLAS Test Program Results

Test of subprogram number 1 SDOT
----- PASS -----

Test of subprogram number 2 SAXPY
----- PASS -----

Test of subprogram number 3 SROTG
----- PASS -----

Test of subprogram number 4 SROT
----- PASS -----

Test of subprogram number 5 SCOPY
----- PASS -----

Test of subprogram number 6 SSWAP
----- PASS -----

Test of subprogram number 7 SNRM2
----- PASS -----

Test of subprogram number 8 SASUM
----- PASS -----

Test of subprogram number 9 SSCAL
----- PASS -----

Test of subprogram number 10 ISAMAX
----- PASS -----
[Inferior 1 (process 32730) exited normally]

$ OMP_NUM_THREADS=2 OPENBLAS_NUM_THREADS=1 gdb ./sblat1
...
(gdb) r
Starting program: /var/tmp/xianyi-OpenBLAS-0a958b6/test/sblat1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Real BLAS Test Program Results

Test of subprogram number 1 SDOT
----- PASS -----

Test of subprogram number 2 SAXPY
----- PASS -----

Test of subprogram number 3 SROTG
----- PASS -----

Test of subprogram number 4 SROT
----- PASS -----

Test of subprogram number 5 SCOPY
----- PASS -----

Test of subprogram number 6 SSWAP
----- PASS -----

Test of subprogram number 7 SNRM2
----- PASS -----

Test of subprogram number 8 SASUM
----- PASS -----

Test of subprogram number 9 SSCAL
----- PASS -----

Test of subprogram number 10 ISAMAX
----- PASS -----
[Inferior 1 (process 32757) exited normally]

$ OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=2 gdb ./sblat1
(gdb) r
Starting program: /var/tmp/xianyi-OpenBLAS-0a958b6/test/sblat1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Real BLAS Test Program Results

Test of subprogram number 1 SDOT
----- PASS -----

Test of subprogram number 2 SAXPY
----- PASS -----

Test of subprogram number 3 SROTG
----- PASS -----

Test of subprogram number 4 SROT
----- PASS -----

Test of subprogram number 5 SCOPY
----- PASS -----

Test of subprogram number 6 SSWAP

Program received signal SIGSEGV, Segmentation fault.
0x0000000000407198 in blas_quickdivide (x=4294967295, y=4294967295)
at ../../common_x86_64.h:158
158 y = blas_quick_divide_table[y];
(gdb) bt
#0 0x0000000000407198 in blas_quickdivide (x=4294967295, y=4294967295)
at ../../common_x86_64.h:158
#1 0x00000000004072d3 in blas_level1_thread (mode=32768, m=1, n=0, k=0,
alpha=0x7fffffffdff0, a=0x7fffffffe240, lda=1, b=0x7fffffffe220, ldb=1,
c=0x0, ldc=0, function=0x40e200 <sswap_k>, nthreads=0)
at blas_l1_thread.c:66
#2 0x0000000000404422 in sswap_ (N=0x616ad4, x=0x7fffffffe240, INCX=0x616ad8,
y=0x7fffffffe220, INCY=0x616adc) at swap.c:103
#3 0x0000000000403224 in check2 (sfac=0.0009765625) at sblat1.f:417
#4 0x0000000000403fc2 in sblat1 () at sblat1.f:42
#5 0x00000000004040a9 in main (argc=1, argv=0x7fffffffe8b0) at sblat1.f:53
#6 0x00007ffff721076d in __libc_start_main (main=0x404073

, argc=1,
ubp_av=0x7fffffffe5c8, init=, fini=,
rtld_fini=, stack_end=0x7fffffffe5b8) at libc-start.c:226
#7 0x0000000000401c29 in _start ()

$ OMP_NUM_THREADS=2 OPENBLAS_NUM_THREADS=2 gdb ./sblat1
...
(gdb) r
Starting program: /var/tmp/xianyi-OpenBLAS-0a958b6/test/sblat1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Real BLAS Test Program Results

Test of subprogram number 1 SDOT
----- PASS -----

Test of subprogram number 2 SAXPY
----- PASS -----

Test of subprogram number 3 SROTG
----- PASS -----

Test of subprogram number 4 SROT
----- PASS -----

Test of subprogram number 5 SCOPY
----- PASS -----

Test of subprogram number 6 SSWAP

Program received signal SIGSEGV, Segmentation fault.
0x0000000000407198 in blas_quickdivide (x=4294967295, y=4294967295)
at ../../common_x86_64.h:158
158 y = blas_quick_divide_table[y];
(gdb) bt
#0 0x0000000000407198 in blas_quickdivide (x=4294967295, y=4294967295)
at ../../common_x86_64.h:158
#1 0x00000000004072d3 in blas_level1_thread (mode=32768, m=1, n=0, k=0,
alpha=0x7fffffffdff0, a=0x7fffffffe240, lda=1, b=0x7fffffffe220, ldb=1,
c=0x0, ldc=0, function=0x40e200 <sswap_k>, nthreads=0)
at blas_l1_thread.c:66
#2 0x0000000000404422 in sswap_ (N=0x616ad4, x=0x7fffffffe240, INCX=0x616ad8,
y=0x7fffffffe220, INCY=0x616adc) at swap.c:103
#3 0x0000000000403224 in check2 (sfac=0.0009765625) at sblat1.f:417
#4 0x0000000000403fc2 in sblat1 () at sblat1.f:42
#5 0x00000000004040a9 in main (argc=1, argv=0x7fffffffe8b0) at sblat1.f:53
#6 0x00007ffff721076d in __libc_start_main (main=0x404073

, argc=1,
ubp_av=0x7fffffffe5c8, init=, fini=,
rtld_fini=, stack_end=0x7fffffffe5b8) at libc-start.c:226
#7 0x0000000000401c29 in _start ()

In the last session, blas_quick_divide_table was sized 38520 so y was too
large.

Ryan

@xianyi
Copy link
Collaborator

xianyi commented Jun 27, 2012

Hi Ryan,

I think this may relate to the issue about detecting the numbers of cores or threads. Because I didn't have access to Bulldozer, I cannot investigate this bug now.

Thanks

Xianyi

@BagOfMostlyWater
Copy link
Author

On Tue, Jun 26, 2012 at 11:00:01PM -0700, Xianyi Zhang wrote:

I think this may relate to the issue about detecting the numbers of
cores or threads. Because I didn't have access to Bulldozer, I cannot
investigate this bug now.

Okay, thank you for taking the time to investigate this far.

Ryan

@xianyi
Copy link
Collaborator

xianyi commented Jun 28, 2012

Hi Ryan,

I asked a friend from AMD China to test OpenBLAS develop branch on AMD Opteron 42xx and 62xx. He built the library successfully on RHEL 6.2. He only meet an issue about force using gfortran compiler between f77, g77 and gfortran.

I think this issue is the same to issue #119 on Intel Sandy Bridge.

Thanks

Xianyi

@xianyi
Copy link
Collaborator

xianyi commented Jun 29, 2012

Hi Ryan,

Please test the newest develop branch. I think I fixed this bug.

Thank you

Xianyi

@BagOfMostlyWater
Copy link
Author

On Fri, Jun 29, 2012 at 12:55:59AM -0700, Xianyi Zhang wrote:

Please test the newest develop branch. I think I fixed this bug.

I was able to successfully build with

make DEBUG=1 NO_LAPACK=1 NO_CBLAS=1

and it completed all tests. I was also able to successfully build custom
Ubuntu packages. Thanks very much for looking into this!

Ryan

@xianyi xianyi closed this as completed Jun 30, 2012
kseniyazaytseva pushed a commit to kseniyazaytseva/OpenBLAS that referenced this issue Dec 18, 2023
Merge in PL/openblas from dev/k.zaytseva/LM-538 to dev-riscv
kseniyazaytseva pushed a commit to kseniyazaytseva/OpenBLAS that referenced this issue Dec 18, 2023
Merge in PL/openblas from dev/k.zaytseva/LM-538 to dev-riscv
kseniyazaytseva pushed a commit to kseniyazaytseva/OpenBLAS that referenced this issue Dec 19, 2023
Merge in PL/openblas from dev/k.zaytseva/LM-538 to dev-riscv
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

2 participants