kaleidicassociates / lubeck

High level linear algebra library for Dlang
http://lubeck.libmir.org/
Boost Software License 1.0
66 stars 14 forks source link

eigSymmetric fails to compile with mir.ndslice #37

Closed tastyminerals closed 4 years ago

tastyminerals commented 4 years ago

Using eigSymmetric fails to compile.

/+dub.sdl:
dependency "mir-algorithm" version="~>3.9.2"
dependency "mir-random" version="~>2.2.14"
dependency "lubeck" version="~>1.3.0"
+/

import mir.ndslice;
import mir.random.variable : uniformVar;
import mir.random.algorithm : randomSlice;
import kaleidic.lubeck : eigSymmetric;

void main() {
    auto s = uniformVar!int(-2, 2).randomSlice(10, 10);
    s.eachUploPair!((upper, ref lower) { lower = upper; }); 
    auto r = eigSymmetric('L', s);
}

attempting to run dub temp.d

blasint = int
.dub/packages/lubeck-1.3.0/lubeck/source/kaleidic/lubeck.d(1084,12): Error: module mir.math.numeric import Prod not found, did you mean template mir.math.numeric.prod(F, Range)(Range r) if (isFloatingPoint!F && isIterable!Range)?
temp.d(15,23): Error: template instance kaleidic.lubeck.eigSymmetric!(cast(Flag)true, int*, cast(mir_slice_kind)2) error instantiating
/usr/bin/dmd failed with exit code 1.
jmh530 commented 4 years ago

Are you running this on run.dlang.org? The current version of mir-algorithm is 3.9.11. It looks like this is related to the change in Prod to `ProdAccumulator. If you change the top to

/+dub.sdl:
dependency "mir-algorithm" version="*"
dependency "mir-random" version="*"
dependency "lubeck" version="*"
+/

then it generates an error about ProdAccumulator.

It seems that there has not been a new tag on lubeck since the adjustment in use ProdAccumulator. Tagging a new release will hopefully fix this issue.

tastyminerals commented 4 years ago

Resetting the versions to * doesn't help. I am building locally.

 % dub run --compiler=ldc2
Performing "debug" build using ldc2 for x86_64.
mir-core 1.1.8: target for configuration "library" is up to date.
mir-algorithm 3.9.11: target for configuration "default" is up to date.
mir-blas 1.1.13: target for configuration "mkl-sequential" is up to date.
mir-lapack 1.2.5: target for configuration "mkl-sequential" is up to date.
lubeck 1.3.0: target for configuration "library" is up to date.
mir-random 2.2.14: target for configuration "default" is up to date.
pretty_array 1.0.2: target for configuration "library" is up to date.
mir_benchmarks_2 ~master: building configuration "application"...
blasint = int
../../.dub/packages/lubeck-1.3.0/lubeck/source/kaleidic/lubeck.d(1084,12): Error: module mir.math.numeric import Prod not found, did you mean template mir.math.numeric.prod(F, Range)(Range r) if (isFloatingPoint!F && isIterable!Range)?
source/advanced_ops.d(115,26): Error: template instance kaleidic.lubeck.eigSymmetric!(cast(Flag)true, double*, cast(mir_slice_kind)2) error instantiating
source/app.d(251,30):        instantiated from here: benchEigenSymm!double
ldc2 failed with exit code 1.
jmh530 commented 4 years ago

@tastyminerals Thanks. It comes back to the need to tag a new release. Basically, dub is trying to grab an older version of lubeck that relied on code in mir-algorithm that has since changed.

@9il Can you tag a new release?

9il commented 4 years ago

tagged