Skip to content

Commit 99b2862

Browse files
committed
Merge branch 'master' of jsoftware.com:jsource
2 parents fcfa34d + 48403dd commit 99b2862

File tree

5 files changed

+17
-31
lines changed

5 files changed

+17
-31
lines changed

jsrc/cip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ finrle: ;
13471347
// ngoodperma is the number of values in perma inherited from earlier blocks
13481348

13491349
UI permx=0; C perm=0xE4; // index of perm we are using, and that perm
1350-
C static perms8[25] = {0xE4,0xB4,0xD8,0x78,0x9C,0x6C,0xE1,0xB1,0xC9,0x39,0x8D,0x2D,0xD2,0x72,0xC6,0x36,0x4E,0x1E,0x93,0x63,0x87,0x27,0x4B,0x1B,~0x1B}; // perms in order of reversed bitpos, i. e. 3 2 1 0 first
1350+
static C perms8[25] = {0xE4,0xB4,0xD8,0x78,0x9C,0x6C,0xE1,0xB1,0xC9,0x39,0x8D,0x2D,0xD2,0x72,0xC6,0x36,0x4E,0x1E,0x93,0x63,0x87,0x27,0x4B,0x1B,~0x1B}; // perms in order of reversed bitpos, i. e. 3 2 1 0 first
13511351
I bestnperma=ngoodperma; C bestperm=perm; // best incomplete value so far
13521352

13531353
// loop till we find a valid permutation

script/testga.ijs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ ECHOFILENAME=: 1 NB. echo file name
1515
stdout LF ,~ 9!:14''
1616

1717
ddall=: ddall -. blacklist=: blacklist, ('OpenBSD'-:UNAME)#(<testpath),each <'gstack.ijs' NB. temporarily disable
18-
ddall=: ddall -. blacklist=: blacklist, ('FreeBSD'-:UNAME)#(<testpath),each 'gtdot.ijs';'gtdot1.ijs';'gtdot2.ijs';'gtdot3.ijs';'g13x.ijs';'g7x.ijs' NB. temporarily disable
19-
ddall=: ~. ddall ,~ (IF64*.(<UNAME)e.'Win';'Darwin')#(<testpath),each <'gcip1.ijs'
18+
ddall=: ddall -. blacklist=: blacklist, ('OpenBSD'-:UNAME)#(<testpath),each 'gtdot.ijs';'gtdot3.ijs';'gtdot4.ijs' NB. temporarily disable
19+
ddall=: ~. ddall ,~ (IF64*.(<UNAME)e.<'Win')#(<testpath),each <'gcip1.ijs'
2020
ddall=: ~. ddall ,~ ((<UNAME)e.'Win';'Darwin')#(<testpath),each <'glapack.ijs'
2121

2222
NB. smoke test

test/gtdot3.ijs

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ assert. remote_stuff=3
4545
)
4646

4747
f =: 3 : 0
48-
chk=. ('FreeBSD'-:UNAME)
48+
granularity=. 2e_13
4949
try.
5050
while. 2 > 1 T. '' do. 0 T. '' end. NB. make sure we have 2 worker threads
5151
catch.
@@ -57,9 +57,9 @@ assert. 2 <: 1 T. ''
5757
NB. verify that tasks go to different threads if possible. We can ensure this only for as many threads as there are cores
5858
setth nwthreads=. 1 >. <: 0 { 8 T. '' NB. one worker thread per core, -1
5959
wthr nwthreads
60-
assert. GITHUBCI +. (>: i. nwthreads) *./@e. aaa__ =: > (3&T.@'')@(6!:3) t.'' "(0) (0.1 #~ <:nwthreads), 0.6
60+
assert. (>: i. nwthreads) *./@e. aaa__ =: > (3&T.@'')@(6!:3) t.'' "(0) (0.1 #~ <:nwthreads), 0.6
6161
wthr nwthreads
62-
assert. GITHUBCI +. (>: i. nwthreads) *./@e. > (3&T.@'')@(6!:3) t.'' "(0) (0.6 #~ <:nwthreads), 0.1
62+
assert. (>: i. nwthreads) *./@e. > (3&T.@'')@(6!:3) t.'' "(0) (0.6 #~ <:nwthreads), 0.1
6363
wthr nwthreads
6464
assert. (ccc__ =: ((<_1000) #~ <: nwthreads),(>: i. nwthreads);_1001) e.~&> bbb__ =: 4 T. aaa__ =: (3&T.@'')@(6!:3) t.'' "(0) (0.3 #~ <: nwthreads), 2 1 NB. last thread should run in master; earlier ones complete first
6565
wthr nwthreads
@@ -71,38 +71,30 @@ pyx =. 6!:3 t. ''"0 N # 1.0 NB. fill up with delaying threads
7171
NB. Verify forcetask arg
7272
t0 =. 6!:1''
7373
assert. 1. = >pyx
74-
techo^:chk 'gtdot3 a13'
7574
NB. Verify forcetask arg
7675
NB. assert. (t0 + 0.5) < 6!:1'' [ 'a1' NB. master should not wait
77-
techo^:chk 'gtdot3 a13a'
7876
wthr nwthreads
79-
techo^:chk 'gtdot3 a13b'
8077
pyx =. 6!:3 t. ''"0 (>:N) # 1.0 NB. fill up with delaying threads
81-
techo^:chk 'gtdot3 a13c'
8278
t0 =. 6!:1''
8379
assert. 1. = >pyx
8480
NB. assert. (t0 + 0.5) > 6!:1'' [ 'a2' NB. master should wait
8581
wthr nwthreads
8682
pyx =. 6!:3 t. 'worker'"0 (>:N) # 1.0 NB. fill up with delaying threads
87-
techo^:chk 'gtdot3 a13d'
8883
t0 =. 6!:1''
8984
assert. 1. = >pyx
9085
NB. assert. (t0 + 0.5) < 6!:1'' [ 'a3' NB. master should not wait
9186
wthr nwthreads
9287
pyx =. 6!:3 t. (<'worker') "0 (>:N) # 1.0 NB. fill up with delaying threads
93-
techo^:chk 'gtdot3 a13e'
9488
t0 =. 6!:1''
9589
assert. 1. = >pyx
9690
NB. assert. (t0 + 0.5) < 6!:1'' [ 'a4' NB. master should not wait
9791
wthr nwthreads
9892
pyx =. 6!:3 t. (<'worker';1) "0 (>:N) # 1.0 NB. fill up with delaying threads
99-
techo^:chk 'gtdot3 a13f'
10093
t0 =. 6!:1''
10194
assert. 1. = >pyx
10295
NB. assert. (t0 + 0.5) < 6!:1'' [ 'a5' NB. master should not wait
10396
wthr nwthreads
10497
pyx =. 6!:3 t. (<'worker';0) "0 (>:N) # 1.0 NB. fill up with delaying threads
105-
techo^:chk 'gtdot3 a13g'
10698
t0 =. 6!:1''
10799
1. = >pyx
108100
NB. assert. (t0 + 0.5) > 6!:1'' [ 'a6' NB. master should wait
@@ -122,22 +114,17 @@ mtx =. 10 T. 0
122114
assert. 0 = 11 T. mtx
123115
'domain error' -: 11 T. etx >:&.> mtx
124116
mtx =. 10 T. 0
125-
techo^:chk 'gtdot3 a32'
126117
tod =. 6!:1''
127-
techo^:chk 'gtdot3 a32a'
128118
assert. 0 = >{{11 T. y}}t.''mtx NB. boxed mtx OK
129-
techo^:chk 'gtdot3 a32b'
130119
NB. the following line hang on freebsd
131120
assert. 1 = 11 T. mtx;2.0
132-
techo^:chk 'gtdot3 a32c'
133-
assert. GITHUBCI +. (2.3 > dly) *. 2 <: dly =. tod-~6!:1'' NB. verify delay
134-
techo^:chk 'gtdot3 a32d'
121+
assert. (2.3 > dly) *. (2-granularity) <: dly =. tod-~6!:1'' NB. verify delay
135122
tod =. 6!:1''
136123
assert. 1 = 11 T. mtx;0.1
137-
assert. GITHUBCI +. (0.3 > dly) *. 0.1 <: dly =. tod-~6!:1'' NB. verify delay
124+
assert. (0.3 > dly) *. (0.1-granularity) <: dly =. tod-~6!:1'' NB. verify delay
138125
tod =. 6!:1''
139126
assert. 1 = 11 T. mtx;0
140-
assert. GITHUBCI +. (0.3 > dly) *. 0 <: dly =. tod-~6!:1'' NB. verify no delay
127+
assert. (0.3 > dly) *. 0 <: dly =. tod-~6!:1'' NB. verify no delay
141128
mtx=.10 T. 1 NB. recursive
142129
assert. 0 = 11 T. mtx
143130
assert. 0 = 11 T. mtx NB. lock count=2

test/gtdot4.ijs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,24 @@ NB. Create 1 thread in pool 1; then verify that jobs in pool 1 are faster than t
1414
1: 0 T. 1
1515
1 -: 2 { 2 T. 1 NB. can't rely on waiters: terminating threads may still be waiting, or not started
1616
0 -: 2 { 2 T. 0
17+
granularity=: 2e_13
1718
stime =: 6!:1''
1819
1 = > 6!:3 t. 0"0 ] 6 # 1
19-
GITHUBCI +. 5 < stime -~ 6!:1''
20+
(5-granularity) < stime -~ 6!:1''
2021
stime =: 6!:1''
2122
1 = > 6!:3 t. 1"0 ] 6 # 1
22-
GITHUBCI +. 5 > stime -~ 6!:1''
23+
(5-granularity) > stime -~ 6!:1''
2324
delth'' NB. clear all threadpools
2425
0 -: 2 { 2 T. 1
2526
0 -: 2 { 2 T. 0
2627
stime =: 6!:1''
2728
1 = > 6!:3 t. 0"0 ] 6 # 1
28-
GITHUBCI +. 5 < stime -~ 6!:1''
29+
(5-granularity) < stime -~ 6!:1''
2930
stime =: 6!:1''
3031
1 = > 6!:3 t. 1"0 ] 6 # 1
31-
GITHUBCI +. 5 < stime -~ 6!:1''
32+
(5-granularity) < stime -~ 6!:1''
3233

33-
4!:55 ;:'delth stime'
34+
4!:55 ;:'delth granularity stime'
3435

3536
epilog''
3637

test/tsu.ijs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,15 @@ EMPTY
4646
NB. black list
4747
NB. gmbx.ijs is not an independent test
4848
NB. gfft and glapack - run separately with additional addons
49-
blacklist=: ((<testpath),each 'gmbx.ijs';'gfft.ijs';'glapack.ijs';'gcip1.ijs'),testfiles 'gmbx' NB. mapped boxed arrays no longer supported
49+
blacklist=: ((<testpath),each 'gmbx.ijs';'gfft.ijs';'glapack.ijs'),testfiles 'gmbx' NB. mapped boxed arrays no longer supported
50+
blacklist=: blacklist, (-. (<UNAME)e.<'Darwin')#(<testpath),each <'gcip1.ijs'
5051
blacklist=: blacklist, (IFRASPI<(IF64<UNAME-:'Linux')+.(IFWIN>IF64)+.IFIOS+.(UNAME-:'Wasm'))#(<testpath),each <'gregex.ijs' NB. require libjpcre2 binary
5152
blacklist=: blacklist, (-.IF64)#(<testpath),each <'g6x14.ijs' NB. require 64-bit
5253
blacklist=: blacklist, (1=1 { 8 T. '')#(<testpath),each 'gtdot.ijs';'gtdot1.ijs';'gtdot2.ijs';'gtdot3.ijs';'gtdot4.ijs' NB. require multithreading
5354
blacklist=: blacklist, (-.15!:23'')#(<testpath),each 'g15x.ijs';'g7x5.ijs';'gdll.ijs';'gdll_df.ijs';'gmmf.ijs';'gmmf1s.ijs';'gmmf1u.ijs';'gmmf1w.ijs' NB. 15!:0 unavailable
5455
blacklist=: blacklist, ('Wasm'-:UNAME)#(<testpath),each <'gstack.ijs' NB. crash
5556
blacklist=: blacklist, (IFQT*.'Wasm'-:UNAME)#(<testpath),each 'g331ps.ijs';'gsp422.ijs';'gsp432.ijs' NB. crash
5657
blacklist=: blacklist, IFIOS#(<testpath),each <'gipht.ijs' NB. crash if included in the whole suite, but ok if running alone
57-
NB. temp workaround
58-
blacklist=: blacklist, (UNAME-:'OpenBSD')#(<testpath),each <'gtdot.ijs'
59-
blacklist=: blacklist, (UNAME-:'FreeBSD')#(<testpath),each 'gsp.ijs';'gsp111.ijs';'gss.ijs'
6058

6159
blacklist=: ~.blacklist
6260
ddall =: blacklist -.~ testfiles 'g'

0 commit comments

Comments
 (0)