Closed rickhg12hs closed 10 years ago
Thanks for reporting. I am not able to replicate this. I am on:
Julia Version 0.3.0-prerelease+1261
Commit 16d9ef6* (2014-01-27 05:40 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin13.0.0)
CPU: Intel(R) Core(TM)2 Duo CPU P7550 @ 2.26GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY)
LAPACK: libopenblas
LIBM: libopenlibm
Looks like it's due to an integer overflow? You are on a 32bit system. Can you please re-run the tests by changing the ranges from 1:1000000
to 1:1000
in test.jl
lines 19 and 20? The result then should be changed to match 1001000
in lines 47 and 48.
Running the very latest Julia and Blocks master branch, errors are still encountered.
I had to run the test from the test directory so that test.csv
could be found (error otherwise).
$ pwd
/home/rick/.julia/Blocks/test
$ /usr/local/src/julia/julia/julia runtests.jl
loading packages...
running tests...
pmap array->array...
result: 1001000
result: 1001000
time: 8.807799999999999e-5
map array->array...
result: 1001000
result: 1001000
time: 3.22671e-5
pmap array->array...
result: 1001000
result: 1001000
time: 0.0002742981
map array->array...
result: 1001000
result: 1001000
time: 0.0001310169
pmap file->iostream...
ERROR: no method splitrange(Int64, Int32) in Block at /home/rick/.julia/Blocks/src/block_framework.jl:194
in Block at /home/rick/.julia/Blocks/src/block_framework.jl:215
in f_ios_pmap at /home/rick/.julia/Blocks/test/test.jl:23
in testfn at /home/rick/.julia/Blocks/test/test.jl:8
in do_all_tests at /home/rick/.julia/Blocks/test/test.jl:51
in include_from_node1 at loading.jl:120
while loading /home/rick/.julia/Blocks/test/test.jl,
in expression starting on line 59
while loading /home/rick/.julia/Blocks/test/runtests.jl, in expression starting on line 1
Ok. So the first test passed now, but it failed in the fifth.
This looks like another 32bit incompatibility; filesize
returns an Int64 where as Base.splitrange
takes Int32 on 32bit systems.
I have pushed a fix for now, and I hope there are no more such instances. I can get hold of a 32bit system only by tomorrow to run a full test. Please pull the master
branch and check this out in the meantime.
If I run the tests from the test directory, all pass.
It would be convenient if the current directory was irrelevant for running the tests.
Pirating how the DSP'ers do it in ~/.julia/DSP/test/windows.jl
here's how you could do it.
$ git diff
diff --git a/test/test.jl b/test/test.jl
index 618b3f0..6ce3150 100644
--- a/test/test.jl
+++ b/test/test.jl
@@ -1,6 +1,6 @@
using Blocks
-const datafile = "test.csv"
+const datafile = joinpath(dirname(@__FILE__),"test.csv")
const nloops = 10
function testfn(f::Function, s::String, exp_res)
Thanks! Done via https://github.com/tanmaykm/Blocks.jl/commit/06e2c3aadb775959ed94597ce807112bb15c8494.
I shall bump the package sha1
in a few days if there are no further issues.
Ready for a bump?
Done!
Yay! :+1:
Whoops!
~/.julia/METADATA/Blocks/versions/0.0.2/sha1 == ~/.julia/METADATA/Blocks/versions/0.0.1/sha1
Sorry. I think I messed up Pkg.tag
somehow. Will fix it in a few minutes.
Thanks for pointing it out. I have corrected METADATA. Please try now.
Yep, works now! Thanks.