uncomplicate / neanderthal

Fast Clojure Matrix Library
http://neanderthal.uncomplicate.org
Eclipse Public License 1.0
1.06k stars 56 forks source link

Mysterious SLF4J errors #54

Closed kxygk closed 5 years ago

kxygk commented 5 years ago

Hey @blueberry , I'm probably doing something wrong here

After fighting with the MLK for a while (It's a bit of a mess on Ubuntu 18.04) I made a new project using lein new app neand-test Then I add neanderthal and change hello world to print out (dv 1 2 3) See the diff here: https://github.com/geokon-gh/neand-test/commit/1159754f6e89fd2dcb14ed79d570bcf78fd78426

Then I go into the terminal, cd into the project and run lein run and I get

geokon@ux305-neon:~/USB/Projects/neand-test$ lein run
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
#RealBlockVector[double, n:3, offset: 0, stride:1]
[   1.00    2.00    3.00 ]

So it seems to run fine, but this error comes up each time.

If I look at the dependencies I don't even see SLF4J, so I'm not sure where it comes from

geokon@ux305-neon:~/USB/Projects/neand-test$ lein deps :tree
 [clojure-complete "0.2.5" :exclusions [[org.clojure/clojure]]]
 [nrepl "0.6.0" :exclusions [[org.clojure/clojure]]]
 [org.clojure/clojure "1.10.0"]
   [org.clojure/core.specs.alpha "0.2.44"]
   [org.clojure/spec.alpha "0.2.176"]
 [uncomplicate/neanderthal "0.22.0"]
   [org.apache.commons/commons-math3 "3.6.1"]
   [org.jcuda/jcublas "10.0.0"]
     [org.jcuda/jcublas-natives "10.0.0" :classifier "linux-x86_64"]
   [org.jocl/jocl-blast "1.5.0"]
   [uncomplicate/clojurecl "0.10.6"]
     [org.clojure/core.async "0.4.490"]
       [org.clojure/tools.analyzer.jvm "0.7.2"]
         [org.clojure/core.memoize "0.5.9"]
           [org.clojure/core.cache "0.6.5"]
             [org.clojure/data.priority-map "0.0.7"]
         [org.clojure/tools.analyzer "0.6.9"]
         [org.clojure/tools.reader "1.0.0-beta4"]
         [org.ow2.asm/asm-all "4.2"]
     [org.jocl/jocl "2.0.1"]
   [uncomplicate/clojurecuda "0.6.2"]
     [org.jcuda/jcuda "10.0.0"]
       [org.jcuda/jcuda-natives "10.0.0" :classifier "linux-x86_64"]
   [uncomplicate/commons "0.7.2"]
   [uncomplicate/fluokitten "0.9.1"]
   [uncomplicate/neanderthal-native "0.21.0"]

Have you seen this before? I noticed it was mentioned in passing in issue https://github.com/uncomplicate/neanderthal/issues/27 - but was tangential to the main problem

blueberry commented 5 years ago

These are not errors, but infos. In Java land, lots of libraries assume you have configured logging through sl4j, and this mechanism will log/print this message if that has not been done. These dependencies come from jocl and/or jcuda.

This is only printed once you start the JVM. If you don't want to see it, either configure sl4j logger in your project, or exclude jocl/jcuda from your application.

BTW, this has no effect on any of uncomplicate libraries in terms of performance or behavior, and is not an error per se.

kxygk commented 5 years ago

Thanks for the clarification. I hadn't seen it mentioned anywhere in the docs so I thought I was in the wrong here. Well I guess this issue will be here for the next person that sees it :)

Thanks again