This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-16
Channels
- # announcements (3)
- # babashka (25)
- # beginners (71)
- # calva (18)
- # clj-kondo (52)
- # cljs-dev (94)
- # cljsrn (12)
- # clojure (33)
- # clojure-europe (52)
- # clojure-nl (2)
- # clojure-uk (27)
- # clojurescript (18)
- # clojureverse-ops (4)
- # datomic (64)
- # deps-new (27)
- # depstar (5)
- # events (5)
- # fulcro (5)
- # graalvm (12)
- # graalvm-mobile (82)
- # helix (2)
- # introduce-yourself (1)
- # juxt (5)
- # lsp (10)
- # malli (7)
- # missionary (1)
- # off-topic (41)
- # pathom (69)
- # pedestal (6)
- # re-frame (4)
- # reagent (8)
- # releases (9)
- # remote-jobs (8)
- # shadow-cljs (3)
- # sql (46)
- # tools-deps (44)
- # uncomplicate (1)
- # vim (83)
Hum, interesting, asking for a friend :), but seem to get svd to crash at times:
0% cat deps.edn
{:paths ["src"]
:deps {uncomplicate/neanderthal {:mvn/version "0.41.0"
:exclusions [org.jcuda/jcuda-natives
org.jcuda/jcublas-natives]}}}
0% cat src/linalg/core.clj
(ns linalg.core
(:require [uncomplicate.neanderthal
[native :refer [dge dgb dgd]]
[core :refer [mm nrm2]]
[linalg :refer [svd svd!] :as la]]))
(def data [2004.2 0.26
2004.5 0.26
2004.8 0.33
2005.0 0.35
2005.2 0.36
2005.5 0.37
2005.8 0.38
2006.0 0.39
2006.2 0.43
2006.5 0.44
2006.8 0.45
2007.0 0.48
2007.2 0.51
2007.5 0.51
2007.8 0.53
2008.0 0.55
2008.2 0.58
2008.5 0.59
2008.8 0.61
2009 0.64
2009.2 0.66
2009.5 0.68
2009.8 0.69
2010.0 0.72
2010.2 0.76
2010.5 0.76
2010.8 0.78
2011.0 0.81
2011.2 0.81
2011.5 0.85
2011.8 0.87
2012 0.87
2012.2 0.9
2012.5 0.91
2012.8 0.96
2013.0 0.97
2013.2 0.99
2013.5 0.99
2013.8 1.03
2014.0 1.08])
(let [X_hat (map (fn [[x _]] [1 x]) (partition 2 data))
_y (map (fn [[_x y]] y) (partition 2 data))
rows (count X_hat)
cols 2
source (into [] cat X_hat)
A (dge rows cols source {:layout :row})]
(dotimes [i 10]
(println "try" i)
(svd A true true)))
0% clj -J--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED
Clojure 1.10.3
user=> (require 'linalg.core :reload)
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See for further details.
try 0
try 1
java(89448,0x70000e37f000) malloc: *** error for object 0x3fc432f2ddcd91cb: pointer being freed was not allocated
java(89448,0x70000e37f000) malloc: *** set a breakpoint in malloc_error_break to debug
rlwrap: warning: clojure crashed, killed by SIGABRT.
rlwrap itself has not crashed, but for transparency,
it will now kill itself (without dumping core) with the same signal
warnings can be silenced by the --no-warnings (-n) option
0% java -version
openjdk version "15.0.1" 2020-10-20
OpenJDK Runtime Environment (build 15.0.1+9)
OpenJDK 64-Bit Server VM (build 15.0.1+9, mixed mode, sharing)
0% l /opt/intel/oneapi/mkl
total 0
lrwxr-xr-x 1 root wheel 8B Jul 16 08:53 latest -> 2021.3.0
drwxr-xr-x 12 root wheel 384B Jul 16 08:54 2021.3.0