Skip to content

Commit

Permalink
gtdot5
Browse files Browse the repository at this point in the history
  • Loading branch information
bilam committed Dec 19, 2024
1 parent 0bb737e commit 341d49d
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 1 deletion.
68 changes: 68 additions & 0 deletions test/gtdot5.ijs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
prolog './gtdot5.ijs'
NB. T. t. ------------------------------------------------------------------

NB. **************************************** threads & tasks **********************************
NB. 64-bit only

3 : 0''
if. IFWIN do.
sleep=: usleep@>.@(1e6&*)
else.
sleep=: 6!:3
end.
1
)

NB. wait until there are y waiting threads
wthr=: {{ while. y ~: {. 2 T.'' do. 6!:3]0.001 end. 1 }}
delth =: {{ while. 1 T. '' do. 55 T. '' end. 1 }} NB. delete all worker threads
delth'' NB. make sure we start with an empty system

N=: 24 NB. max # worker threads

NB. create all available threads
1: 0&T."1^:(0 < #) ''$~ (0 >. N-1 T. ''),0
N = 1 T.''
wthr N

p1=: 3 : 0
for_i. i.100 do.
ALL=: ALL, (3 T.'')
end.
EMPTY
)

p2=: 3 : 0
for_i. i.100 do.
ALL=: ALL, ,~(3 T.'')
end.
EMPTY
)

t1=: 3 : 0
ALL=: 0$0
pyx=. (p1 t.'')"0 i. 16
1:&>pyx
echo #~.ALL
echo #/.~ ALL
EMPTY
)

t2=: 3 : 0
ALL=: 0 0$0
pyx=. (p2 t.'')"0 i. 16
1:&>pyx
echo #~.ALL
echo #/.~ ALL
EMPTY
)

t1''
t2''

delth''

4!:55 ;:'ALL delth N p1 p2 t1 t2 sleep wthr'

epilog''

8 changes: 7 additions & 1 deletion test/tsu.ijs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ end.
EMPTY
)

NB. 15!:0 available
3 : 0 ''
try. cdok=: 15!:23'' catch. cdok=: 1 end.
EMPTY
)

NB. black list
NB. gmbx.ijs is not an independent test
NB. gfft and glapack - run separately with additional addons
Expand All @@ -51,7 +57,7 @@ blacklist=: blacklist, (-. (<UNAME)e.<'Darwin')#(<testpath),each <'gcip1.ijs'
blacklist=: blacklist, (IFRASPI<(IF64<UNAME-:'Linux')+.(IFWIN>IF64)+.IFIOS+.(UNAME-:'Wasm'))#(<testpath),each <'gregex.ijs' NB. require libjpcre2 binary
blacklist=: blacklist, (-.IF64)#(<testpath),each <'g6x14.ijs' NB. require 64-bit
blacklist=: blacklist, (1=1 { 8 T. '')#(<testpath),each 'gtdot.ijs';'gtdot1.ijs';'gtdot2.ijs';'gtdot3.ijs';'gtdot4.ijs';'gtdot5.ijs' NB. require multithreading
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
blacklist=: blacklist, (-.cdok)#(<testpath),each 'g15x.ijs';'g7x5.ijs';'gdll.ijs';'gdll_df.ijs';'gmmf.ijs';'gmmf1s.ijs';'gmmf1u.ijs';'gmmf1w.ijs' NB. 15!:0 unavailable
blacklist=: blacklist, ('Wasm'-:UNAME)#(<testpath),each <'gstack.ijs' NB. crash
blacklist=: blacklist, (IFQT*.'Wasm'-:UNAME)#(<testpath),each 'g331ps.ijs';'gsp422.ijs';'gsp432.ijs' NB. crash
blacklist=: blacklist, IFIOS#(<testpath),each <'gipht.ijs' NB. crash if included in the whole suite, but ok if running alone
Expand Down

0 comments on commit 341d49d

Please sign in to comment.