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

Segmentation Fault in DGEMM with AMD BLIS Library using Flang Compiler #14

Open
AkhilAkkapelli opened this issue Nov 12, 2024 · 3 comments

Comments

@AkhilAkkapelli
Copy link

AkhilAkkapelli commented Nov 12, 2024

I am encountering a segmentation fault while running a DGEMM program with AMD BLIS. I am using the Flang compiler with AOCC and linking against the BLIS library. The program fails during the DGEMM operation with the following output:
Run: flang DGEMMExp.f90 -L/opt/AMD/aocl/aocl-linux-aocc-5.0.0/aocc/lib -lblis
./a.out

Output:

 transpose done
starting dgemm
libblis: Selecting sub-configuration 'generic'.
Segmentation fault (core dumped)

Program:

program DGEMMExp
implicit none

integer, parameter :: n = 2**5 + 16
double precision, dimension(n,n) :: A, At, AAt
integer(8) :: i, starttime, endtime, countrate

CALL random_number(A)
At = transpose(A)
print*, "transpose done"
call system_clock(starttime, countrate)

print*, "starting dgemm"
do i = 1, 3
   call DGEMM('N', 'N', n, n, n, 1.0d0, A, n, At, n, 0.0d0, AAt, n)
end do

call system_clock(endtime, countrate)
print*, "end DGEMM"
print*, "CPU Time:", real(endtime-starttime,8) / countrate

end program DGEMMExp

@vkirangoud
Copy link

Use i8 or -fdefault-integer-8 while compiling. Thanks Harish for suggesting this fix.

@AkhilAkkapelli
Copy link
Author

AkhilAkkapelli commented Nov 15, 2024

@vkirangoud How to get verbose output like :
== Matrix multiplication using AMD BLIS DGEMM ==
and how to enable multithreading and specify threads for BLIS routines. and also verify the multithreading information in verbose output.

@vkirangoud
Copy link

vkirangoud commented Nov 16, 2024 via email

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