Reference-LAPACK / lapack-pre-github-historical-releases

LAPACK official release branches
Other
127 stars 51 forks source link

New version of gfortran 10 fails to build LAPACK directly from source #6

Closed tkoenig1 closed 1 year ago

tkoenig1 commented 5 years ago

A new version of gfortran 10 will not build Lapack 3.8.0 from source. The reason is a standards violation by the code (apparently a frequent idiom) where both rank-1 and scalar arrays are passed to the same argument:

gfortran -O2 -frecursive -c -o sbdsvdx.o sbdsvdx.f sbdsvdx.f:777:39:

420 | CALL SCOPY( N, D, 1, WORK( IETGK ), 2 ) | 2
...... 777 | CALL SCOPY( N*2, Z( 1,I ), 1, WORK, 1 ) | 1 Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)

Putting

FORTRAN = gfortran OPTS = -O2 -frecursive -fallow-argument-mismatch DRVOPTS = $(OPTS) NOOPT = -O0 -frecursive -fallow-argument-mismatch

into make.inc will allow compilation to proceed, but shows numerous issues with the code (a random sample):

dgesvdx.f:765:31:

548 | CALL DGEBRD( N, N, WORK( IQRF ), N, WORK( ID ), WORK( IE ), | 2 ...... 765 | CALL DGEBRD( M, N, A, LDA, WORK( ID ), WORK( IE ), | 1 Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-2) dgesvdx.f:790:53:

574 | CALL DORMBR( 'Q', 'L', 'N', N, NS, N, WORK( IQRF ), N, | 2 ...... 790 | CALL DORMBR( 'Q', 'L', 'N', M, NS, N, A, LDA, | 1 Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-2) dgesvdx.f:808:53:

574 | CALL DORMBR( 'Q', 'L', 'N', N, NS, N, WORK( IQRF ), N, | 2 ...... 808 | CALL DORMBR( 'P', 'R', 'T', NS, N, M, A, LDA, | 1 Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-2)

(The markers may be off due to the quoting).