Rank mismatch warning during make
gillette7 opened this issue · comments
I've started getting this error when building DelaunaySparse:
src$ make
gfortran -c -fopenmp delsparse.f90 -o delsparse.o
gfortran -c -fopenmp -std=legacy slatec.f -o slatec.o
slatec.f:955:24:
862 | CALL DCOPY (N, 0.D0, 0, WS, 1)
| 2
......
955 | CALL DCOPY (N, WS, 1, X, 1)
| 1
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
slatec.f:967:25:
862 | CALL DCOPY (N, 0.D0, 0, WS, 1)
| 2
......
967 | CALL DCOPY (KRANK, W, MDW+1, WS(N2), 1)
| 1
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-2)
slatec.f:3046:25:
862 | CALL DCOPY (N, 0.D0, 0, WS, 1)
| 2
......
3046 | CALL DCOPY(N,X,0,X,1)
| 1
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
slatec.f:3963:28:
862 | CALL DCOPY (N, 0.D0, 0, WS, 1)
| 2
......
3963 | CALL DCOPY (NSOLN, Z, 1, X, 1)
| 1
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
slatec.f:4131:25:
862 | CALL DCOPY (N, 0.D0, 0, WS, 1)
| 2
......
4131 | CALL DCOPY (NSOLN, Z, 1, X, 1)
| 1
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
slatec.f:596:26:
596 | 160 CALL DCOPY (KRANKE, W, MDW+1, WS(KRANKE+1), 1)
| 1
......
862 | CALL DCOPY (N, 0.D0, 0, WS, 1)
| 2
Warning: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-2)
gfortran -c -fopenmp lapack.f -o lapack.o
gfortran -c -fopenmp blas.f -o blas.o
gfortran -fopenmp samples.f90 delsparse.o slatec.o lapack.o blas.o -o samples
gfortran -fopenmp samplep.f90 delsparse.o slatec.o lapack.o blas.o -o samplep
gfortran -fopenmp test_install.f90 delsparse.o slatec.o lapack.o blas.o -o test_install
./test_install
The installation of DELAUNAYSPARSE appears correct.
@gillette7 yeah, this is unfortunately a common issue that I get as well
It is not an issue in delaunaysparse, but with the slatec
library that we use to solve quadratic programming problems in order to project points outside the convex hull onto the convex hull (specifically, the DWNNLS
subroutine).
Everything is fine, it's just that the slatec library is written in legacy Fortran using techniques that are now considered to be bad practice. I'm trying to suppress most of these warnings with the --std=legacy
build flag, but it doesn't suppress all of them. Slatec can also have issues when the data set is poorly conditioned, such that the DWNNLS
subroutine can fail to converge, but this same issue still occurs with other solvers that I've tried as well (including the default solver for cvxpy
), so I think that we can trust it is doing the best job it can.
At this time I don't have a better solution, just ignore the warnings. While this kind of rank mismatch is "bad practice", it still builds on the gfortran
compiler with the legacy flag, as well as on the ifort
compiler last I checked.
Got it - thanks!