gfortran can't use vectorized functions.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-10 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Groovy |
Fix Released
|
Undecided
|
Unassigned | ||
glibc (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Balint Reczey | ||
Groovy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
After ubuntu-glibc maintainers changed "math-vector-
[Test Case]
This the old (good) behavior Ubuntu 19.10 gcc-9.2.1 glibc 2.30
$ gfortran -O3 -mavx2 vect_test.f90 -o test.x
$ nm ./test.x | grep sin
U _ZGVdN4v_
U _ZGVdN8v_
After that change : Ubuntu 20.04 gcc-9.3.0 glibc 2.31
$ gfortran -O3 -mavx2 vect_test.f90 -o test.x
$ nm ./test.x | grep sin
U sin@@GLIBC_2.2.5
U sinf@@GLIBC_2.2.5
$ cat vect_test.f90
program test_vect
implicit none
integer, parameter :: n = 64*1024**2
integer :: i
integer(8) :: t1, t2, t0
real(8) :: tic
!
real, allocatable :: a32(:), b32(:)
real(8), allocatable :: a64(:), b64(:)
!
allocate( a32(n), a64(n))
allocate( b32(n), b64(n))
!
call random_number(a32 )
call random_number(a64 )
!
call system_clock(t0, tic)
!
do i = 1, n
b32(i) = sin(a32(i))
end do
!
call system_clock(t1)
print*, (t1-t0)/tic
!
do i = 1, n
b64(i) = sin(a64(i))
end do
!
call system_clock(t2)
print*, (t2-t1)/tic
!
end program test_vect
Verbose:
Ubuntu 19.10
$ gfortran -O3 -mavx2 -v vect_test.f90 -o test.x
...
/usr/lib/
...
Ubuntu 20.04
$ gfortran -O3 -mavx2 -v vect_test.f90 -o test.x
...
/usr/lib/
...
[Other Info]
As you can see gfortran is not preincluding "math-vector-
A workaround is to copy "math-vector-
description: | updated |
tags: | added: focal |
tags: | added: rls-ff-incoming rls-gg-incoming |
tags: | removed: rls-ff-incoming |
tags: | removed: rls-gg-incoming |
Changed in glibc (Ubuntu Groovy): | |
status: | New → Fix Committed |
tags: | added: id-5ee2520536beb468db5f4d3e |
description: | updated |
description: | updated |
description: | updated |
tags: | added: fr-153 |
Changed in gcc-10 (Ubuntu): | |
status: | New → Fix Released |
Changed in gcc-10 (Ubuntu Focal): | |
status: | New → Fix Released |
Changed in gcc-10 (Ubuntu Groovy): | |
status: | New → Fix Released |
This bug was fixed in the package glibc - 2.31-0ubuntu10
---------------
glibc (2.31-0ubuntu10) groovy; urgency=medium
* Copy the fully conditionalized x86 variant for math-vector- fortran. h finclude. On all architectures. LP: #1879092. patches/ git-updates. diff: update from upstream stable branch. non_temporal_ threshold for x32
to /usr/include/
* Backport x86 CET patches from the trunk.
* debian/
- [23296] Data race in setting function descriptor during lazy binding
- [25639] localedata: Some names of days and months wrongly spelt in Occitan
- [25810] x32: Incorrect syscall entries with pointer, off_t and size_t
- [25896] Incorrect prctl
- [25902] Bad LOADARGS_N
- [25966] Incorrect access of __x86_shared_
- [25976] nss_compat: internal_end*ent may clobber errno, hiding ERANGE
-- Matthias Klose <email address hidden> Thu, 11 Jun 2020 11:53:48 +0200