Skip to content

Commit c344e25

Browse files
committed
0.3rc1
1 parent e68d95c commit c344e25

23 files changed

+794
-496
lines changed

CITATION.cff

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ authors:
77
title: matrico
88
type: software
99
abstract: "A flonum matrix module for CHICKEN Scheme."
10-
version: 0.2
11-
date-released: 2022-07-07
10+
version: 0.3
11+
date-released: 2022-09-16
1212
commit:
1313
license: zlib-Acknowledgement
1414
repository: https://github.com/gramian/matrico
@@ -19,6 +19,4 @@ keywords:
1919
- "Matrix Calculations"
2020
- "Matrix Computations"
2121
- "Linear Algebra"
22-
- "Numerical Mathematics"
23-
- "Numerical Linear Algebra"
2422

Makefile

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
# matrico Makefile
22

3-
CSC = csc
4-
CSI = csi
5-
CHICKEN_INSTALL = chicken-install
6-
CHICKEN_PROFILE = chicken-profile
7-
TEST_NEW_EGG = test-new-egg
3+
CSC = CHICKEN_REPOSITORY_PATH="/home/ch/opt/CHICKEN/lib/chicken/11/" /home/ch/opt/CHICKEN/bin/csc
4+
CSI = CHICKEN_REPOSITORY_PATH="/home/ch/opt/CHICKEN/lib/chicken/11/" /home/ch/opt/CHICKEN/bin/csi
5+
CHICKEN_INSTALL = /home/ch/opt/CHICKEN/bin/chicken-install
6+
CHICKEN_PROFILE =/home/ch/opt/CHICKEN/bin/chicken-profile
7+
TEST_NEW_EGG = /home/ch/opt/CHICKEN/bin/test-new-egg
8+
9+
#CSC = csc
10+
#CSI = csi
11+
#CHICKEN_INSTALL = chicken-install
12+
#CHICKEN_PROFILE = chicken-profile
13+
#TEST_NEW_EGG = test-new-egg
814

915
CLARG =
10-
LEVEL = -O4
16+
LEVEL = -O3
1117
DEBUG = -d0
12-
override FLAGS += -C -O2 -C -pipe
18+
override FLAGS += -strict-types -C -O2 -C -pipe
1319

1420
VERSION = $(shell csi -b version.scm -p "(matrico-version)")
1521

1622
DIM = 1000
1723

18-
.PHONY: linpack, matmul
24+
.PHONY: mips, linpack, matmul
1925

2026
default:
2127
$(CSC) -shared -emit-import-library matrico $(LEVEL) $(DEBUG) $(FLAGS) matrico.scm
@@ -32,24 +38,35 @@ test_egg_local:
3238
tests/check.scm tests/run.scm tests/test-f64vector.scm tests/test-fpmath.scm tests/test-matrico.scm tests/test-utils.scm
3339
python3 -m http.server --bind 127.0.0.1 &
3440
sleep 1
35-
$(TEST_NEW_EGG) matrico http://0.0.0.0:8000/matrico.release-info
41+
sed -e '3 c\(uri targz \"http://0.0.0.0:8000/{egg-name}-{egg-release}.tar.gz\")' matrico.release-info > matrico-dev.release-info
42+
$(TEST_NEW_EGG) matrico http://0.0.0.0:8000/matrico-dev.release-info
3643
pkill -9 -f 'python3 -m http.server'
44+
rm matrico-dev.release-info
3745

3846
test_egg_remote:
3947
$(TEST_NEW_EGG) matrico https://raw.githubusercontent.com/gramian/matrico/main/matrico.release-info
4048

4149
test_install:
4250
CHICKEN_INSTALL_REPOSITORY="/tmp/matrico" $(CHICKEN_INSTALL) -test
43-
CHICKEN_REPOSITORY_PATH="`$(CHICKEN_INSTALL) -repository`:/tmp/matrico" $(CSI) -e "(import matrico) (matrico-cite)"
51+
CHICKEN_REPOSITORY_PATH="/tmp/matrico:`$(CHICKEN_INSTALL) -repository`" $(CSI) -e "(import matrico) (matrico 'citation)"
4452

4553
iprofile:
46-
make matmul LEVEL='-O4' FLAGS='-profile' DIM=1000
54+
make matmul LEVEL='-O4' FLAGS='-profile' DIM=100
4755
ls -1 PROFILE.* | sort -n | head -n1 | $(CHICKEN_PROFILE)
4856

4957
sprofile:
5058
make matmul LEVEL='-O4' DEBUG='-d3' DIM=1000 CLARG='-:P1000'
5159
ls -1 PROFILE.* | sort -n | head -n1 | $(CHICKEN_PROFILE)
5260

61+
mips:LEVEL=-O5
62+
mips:
63+
@echo "(include \"matrico.scm\") \
64+
(import matrico) \
65+
(print "BogoMips:" #\space (matrico 'benchmark)) \
66+
(newline) \
67+
(exit)" | $(CSC) $(LEVEL) $(FLAGS) - -o /tmp/miads
68+
@/tmp/miads
69+
5370
matmul:LEVEL=-O5
5471
matmul:
5572
@echo "(include \"matrico.scm\") \
@@ -60,7 +77,7 @@ matmul:
6077
(define t0 (current-seconds)) \
6178
(define C (time (mx-dot* A B))) \
6279
(define t1 (current-seconds)) \
63-
(print "Megaflops:" #\space (/ (* $(DIM) $(DIM) $(DIM)) (* (- t1 t0) 1000.0 1000.0))) \
80+
(print "Megaflops:" #\space (inexact->exact (floor (/ (* $(DIM) $(DIM) $(DIM)) (* (- t1 t0) 1000.0 1000.0))))) \
6481
(newline) \
6582
(exit)" | $(CSC) $(LEVEL) $(FLAGS) - -o /tmp/matmul
6683
@/tmp/matmul $(CLARG) 2> matmul.txt
@@ -76,7 +93,7 @@ linpack:
7693
(define t0 (current-seconds)) \
7794
(define solver (time (mx-solver A))) \
7895
(define t1 (current-seconds)) \
79-
(print "Megaflops:" #\space (/ (* $(DIM) $(DIM) $(DIM)) (* (- t1 t0) 1000.0 1000.0))) \
96+
(print "Megaflops:" #\space (inexact->exact (floor (/ (* $(DIM) $(DIM) $(DIM)) (* (- t1 t0) 1000.0 1000.0))))) \
8097
(print "Residual:" #\space (mx-norm (mx- (solver b) 1.0) 2)) \
8198
(newline) \
8299
(exit)" | $(CSC) $(LEVEL) $(FLAGS) - -o /tmp/linpack

0 commit comments

Comments
 (0)