Skip to content

Commit cfc056e

Browse files
committed
remove dependence on lapack
1 parent ddb22de commit cfc056e

File tree

4 files changed

+17
-19
lines changed

4 files changed

+17
-19
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ system-index.txt: $(QUICKLISP_SETUP)
5353
install-test-deps:
5454
ifeq ($(UNAME_S),Linux)
5555
ifeq ($(shell sed -n "s/^ID=//p" /etc/os-release),debian)
56-
apt-get update && apt-get install -y git libblas-dev libffi-dev liblapack-dev libzmq3-dev
56+
apt-get update && apt-get install -y git libzmq3-dev
5757
else ifeq ($(shell sed -n "s/^ID=//p" /etc/os-release),ubuntu)
58-
apt update && apt install -y git libblas-dev libffi-dev liblapack-dev libzmq3-dev
58+
apt update && apt install -y git libzmq3-dev
5959
else
6060
echo "Centos-based platforms unsupported"
6161
endif

app/src/entry-point.lisp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,6 @@
192192
#+sbcl
193193
(format t "Loaded libraries:~%~{ ~A~%~}~%"
194194
(mapcar 'sb-alien::shared-object-pathname sb-sys:*shared-objects*))
195-
(unless (magicl.foreign-libraries:foreign-symbol-available-p "zuncsd_"
196-
'magicl.foreign-libraries:liblapack)
197-
(format t "The loaded version of LAPACK is missing necessary functionality.~%")
198-
(quit-nicely 1))
199195
(format t "Library check passed.~%")
200196
(quit-nicely 0))
201197

app/src/mangle-shared-objects.lisp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,24 @@
22
;;;;
33
;;;; This is loaded (as with CL:LOAD) before the final image is saved.
44
;;;;
5-
;;;; Rewrites shared library references to libblas.dylib and
6-
;;;; liblapack.dylib on Mac SDK targets to use the Rigetti package
7-
;;;; path /usr/local/lib/rigetti. This is so the exact
8-
;;;; Rigetti-provided versions of these libraries are found when the
9-
;;;; SDK binary starts up. If these were not rewritten, the SDK binary
10-
;;;; could try to load from non-existent Brew paths or inadequate
11-
;;;; Accelerate-related system paths.
5+
;;;; This file rewrites shared library references on Mac SDK targets
6+
;;;; to use the Rigetti package path /usr/local/lib/rigetti. This is
7+
;;;; so the exact Rigetti-provided versions of these libraries are
8+
;;;; found when the SDK binary starts up. If these were not rewritten,
9+
;;;; the SDK binary could try to load from non-existent Brew paths or
10+
;;;; inadequate system paths.
11+
;;;;
12+
;;;; This file used to rewrite libblas.dylib and liblapack.dylib.
1213
;;;;
1314
;;;; Has no effect on non-Mac targets.
1415

1516
(in-package #:cl-user)
1617

18+
(defvar *dylibs-to-replace* '()
19+
"A list of dylib filenames (with extensions) that need replacement.")
20+
1721
(dolist (shared-object sb-sys:*shared-objects*)
18-
(let ((dylibs-to-replace '("libblas.dylib"
19-
"liblapack.dylib"))
22+
(let ((dylibs-to-replace *dylibs-to-replace*)
2023
(original-path (sb-alien::shared-object-pathname shared-object)))
2124
(let ((dylib (first (member (file-namestring original-path)
2225
dylibs-to-replace

qvm.asd

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
(values))
99

1010
(asdf:defsystem #:qvm
11-
:description "An implementation of the Quantum Abstract Machine."
12-
:author "Robert Smith <[email protected]>"
11+
:description "An implementation of the Quantum/Quil Abstract Machine."
12+
:author "Robert Smith, Rigetti Computing, and Quil-Lang Contributors"
1313
:license "Apache License 2.0 (See LICENSE.txt)"
1414
:version (:read-file-form "VERSION.txt")
1515
:defsystem-depends-on (#:cffi-grovel)
@@ -24,7 +24,6 @@
2424
#:lparallel
2525
;; Matrix algebra
2626
(:version #:magicl/core "0.9.0")
27-
#:magicl/ext-lapack
2827
;; weak hash tables
2928
#:trivial-garbage
3029
;; static globals
@@ -40,7 +39,7 @@
4039
;; Portable random number generator
4140
#:mt19937
4241
;; For allocation info.
43-
#+sbcl #:sb-introspect
42+
(:feature :sbcl #:sb-introspect)
4443
;; Portable *features*
4544
#:trivial-features)
4645
:in-order-to ((asdf:test-op (asdf:test-op #:qvm-tests)))

0 commit comments

Comments
 (0)