Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail on Julia 0.3.3 #4

Closed
rened opened this issue Nov 26, 2014 · 14 comments · Fixed by #175
Closed

Tests fail on Julia 0.3.3 #4

rened opened this issue Nov 26, 2014 · 14 comments · Fixed by #175

Comments

@rened
Copy link
Contributor

rened commented Nov 26, 2014

Pkg.test("Mocha") succeeds on 0.3.2, but fails on 0.3.3 with the following error. Tested both with Mocha 0.0.2 as well as current master. Tested on OSX 10.9.

julia> VERSION
v"0.3.3"

julia> Pkg.test("Mocha")
INFO: Testing Mocha
26-Nov 15:25:54:INFO:root:Configuring Mocha...
26-Nov 15:25:54:INFO:root: * CUDA       disabled by default
26-Nov 15:25:54:INFO:root: * Native Ext disabled by default
26-Nov 15:25:54:INFO:root:Mocha configured, continue loading module...
-- Testing RawBLAS{Float32} Utilities
ERROR: ccall: could not find function sgemm_ in library libopenblas
 in gemm! at /Users/rene/.julia/v0.3/Mocha/src/utils/blas.jl:10
 in test_raw_blas at /Users/rene/.julia/v0.3/Mocha/test/utils/blas.jl:11
 in test_raw_blas at /Users/rene/.julia/v0.3/Mocha/test/utils/blas.jl:33
 in include at ./boot.jl:245
 in include_from_node1 at ./loading.jl:128
 in include at ./boot.jl:245
 in include_from_node1 at loading.jl:128
 in process_options at ./client.jl:285
 in _start at ./client.jl:354
 in _start at /Users/rene/local/julia/usr/lib/julia/sys.dylib
while loading /Users/rene/.julia/v0.3/Mocha/test/utils/blas.jl, in expression starting on line 37
while loading /Users/rene/.julia/v0.3/Mocha/test/runtests.jl, in expression starting on line 27

==================================================[ ERROR: Mocha ]===================================================

failed process: Process(`/Users/rene/local/julia/usr/bin/julia /Users/rene/.julia/v0.3/Mocha/test/runtests.jl`, ProcessExited(1)) [1]

=====================================================================================================================
INFO: No packages to install, update or remove
ERROR: Mocha had test errors
 in error at error.jl:21
 in test at pkg/entry.jl:718
 in anonymous at pkg/dir.jl:28
 in cd at ./file.jl:20
 in cd at pkg/dir.jl:28
 in test at pkg.jl:67

Thanks!

@jfsantos
Copy link

This seems to be a problem in the OpenBLAS library you got with Julia. I've had loads of that on OS X, but this was recently improved. Note that if you are using Julia from Homebrew, you may need to remove its dependencies and reinstall them (check last paragraph here).

@rened
Copy link
Contributor Author

rened commented Nov 26, 2014

Thanks for the hint! But I compiled Julia from source (both 0.3.2 and 0.3.3) and did not set any USE_SYSTEM_xxx, so I believe it should work in both cases.

@pluskid
Copy link
Owner

pluskid commented Nov 26, 2014

Hi, Thanks for reporting this! This might be an issue related to Julia changing to 64bit version of OpenBLAS in 0.3.3. There is a few place that I have to use an undocumented API to access the built-in OpenBLAS, but I think that API has changed after 0.3.2. I will test on a 0.3.3 installation and try to fix it. Didn't know julia v0.3.3 already released, cheers!

@rened
Copy link
Contributor Author

rened commented Nov 26, 2014

Great, thanks for the quick response! In the meantime I'll just use 0.3.2, no problem.

@pluskid
Copy link
Owner

pluskid commented Nov 26, 2014

@rened can you give me the output of the following command in your julia prompt (in v0.3.3)?

Base.blasfunc(:sgemm_)

@rened
Copy link
Contributor Author

rened commented Nov 26, 2014

That would be:

  | | |_| | | | (_| |  |  Version 0.3.3 (2014-11-23 20:19 UTC)
 _/ |\__'_|_|_|\__'_|  |
|__/                   |  x86_64-apple-darwin13.4.0

julia> Base.blasfunc(:sgemm_)
"sgemm_64_"

and

  | | |_| | | | (_| |  |  Version 0.3.2 (2014-10-21 22:05 UTC)
 _/ |\__'_|_|_|\__'_|  |
|__/                   |  x86_64-apple-darwin13.4.0

julia> Base.blasfunc(:sgemm_)
ERROR: blasfunc not defined

@pluskid
Copy link
Owner

pluskid commented Nov 26, 2014

@rened Cool! As I expected. It should have been fixed in bb633ca I just committed. Could you test if the latest master works on your side?

@pluskid
Copy link
Owner

pluskid commented Nov 26, 2014

To get the latest git version:

Pkg.clone("https://github.com/pluskid/Mocha.jl.git")

@rened
Copy link
Contributor Author

rened commented Nov 26, 2014

Works like a charm :-) Thanks a lot!

@chenych11
Copy link

It seems the Base.blasfunc is remove from the 0.5 version. And it fail to pass the test (see below).
I think the src/compatibility.jl file is out of date for julia v0.5. To make it work, modify it like this

using Compat

function blasfunc(name)
    try
        return Base.blasfunc(name)
    catch
        str_name = string(name)
        fnc_symb = eval(:(Base.@blasfunc $strname))
        fnc_name = string(fnc_symb)
        return fnc_name
    end
end 

julia> versioninfo()
Julia Version 0.5.0-dev+2089
Commit b97efac* (2016-01-12 00:36 UTC)
Platform Info:
System: Linux (x86_64-redhat-linux)
CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.3

julia> Pkg.test("Mocha")
INFO: Testing Mocha
WARNING: Method definition info(Any...) in module Base at util.jl:338 overwritten in module Logging at /home/cyc/.julia/v0.5/Logging/src/Logging.jl:61.
WARNING: Method definition warn(Any...) in module Base at util.jl:368 overwritten in module Logging at /home/cyc/.julia/v0.5/Logging/src/Logging.jl:61.
Configuring Mocha...

  • CUDA disabled by default
  • Native Ext disabled by default
    Mocha configured, continue loading module...
    ERROR: LoadError: LoadError: LoadError: UndefVarError: blasfunc not defined
    [inlined code] from /home/cyc/.julia/v0.5/Mocha/src/utils/blas.jl:9
    in anonymous at no file:0
    in include at ./boot.jl:262
    in include_from_node1 at ./loading.jl:401
    in include at ./boot.jl:262
    in include_from_node1 at ./loading.jl:401
    in eval at ./boot.jl:265
    [inlined code] from ./sysimg.jl:14
    in require at ./loading.jl:332
    in include at ./boot.jl:262
    in include_from_node1 at ./loading.jl:401
    in process_options at ./client.jl:245
    in _start at ./client.jl:301
    while loading /home/cyc/.julia/v0.5/Mocha/src/utils/blas.jl, in expression starting on line 8
    while loading /home/cyc/.julia/v0.5/Mocha/src/Mocha.jl, in expression starting on line 15
    while loading /home/cyc/.julia/v0.5/Mocha/test/runtests.jl, in expression starting on line 8
    ================================[ ERROR: Mocha ]================================

failed process: Process(/opt/julia/0.5-dev/bin/julia --check-bounds=yes --code-coverage=none --color=yes /home/cyc/.julia/v0.5/Mocha/test/runtests.jl, ProcessExited(1)) [1]

ERROR: Base.Pkg.PkgError("Mocha had test errors")
in test at pkg/entry.jl:671
in anonymous at pkg/dir.jl:31
in cd at file.jl:47
in cd at pkg/dir.jl:31
in test at pkg.jl:228
in eval at ./boot.jl:265

@pluskid
Copy link
Owner

pluskid commented Jan 14, 2016

@chenych11 Thanks for reporting this! I have incorporated your fix. Could you test if the latest code works on your side? Thanks!

@lostanlen
Copy link
Contributor

Thank you for the fix @chenych11. My Travis CI still relies on Mocha v0.1.0, thus fails on the 0.5.0-dev Julia branch. Could you please make a bugfix release v0.1.1. with this change ?

@pluskid
Copy link
Owner

pluskid commented Feb 29, 2016

@lostanlen
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants