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

Migrate to Julia 0.5-dev #118

Closed
jeff-regier opened this issue Feb 11, 2016 · 9 comments · Fixed by #135
Closed

Migrate to Julia 0.5-dev #118

jeff-regier opened this issue Feb 11, 2016 · 9 comments · Fixed by #135
Assignees

Comments

@jeff-regier
Copy link
Owner

That is, add "nightly" to .travis.yml without causing tests to fail.

@jeff-regier
Copy link
Owner Author

@kpamnany How did you get Celeste running on Julia 0.5? I get a segmentation fault when I try running benchmark_elbo_with_hessian.jl.

Calculating ELBO.

signal (11): Segmentation fault
while loading /home/jeff/git/Celeste.jl/bin/benchmark_elbo_with_hessian.jl, in expression starting on line 155
subtract_kl_value_wrapper at /home/jeff/.julia/v0.5/Celeste/src/ElboKL.jl:81
_calc_hessian at /home/jeff/.julia/v0.5/ForwardDiff/src/api/hessian.jl:98
unknown function (ip: 0x7f47661d158b)
[inline] at /home/jeff/Downloads/julia/src/julia_internal.h:69
jl_call_method_internal at /home/jeff/Downloads/julia/src/gf.c:1915
#hessian#62 at /home/jeff/.julia/v0.5/ForwardDiff/src/api/hessian.jl:69
unknown function (ip: 0x7f476620029e)
[inline] at /home/jeff/Downloads/julia/src/julia_internal.h:69
jl_call_method_internal at /home/jeff/Downloads/julia/src/gf.c:1915
unknown function (ip: 0x7f476620407c)
unknown function (ip: 0x7f47662040ae)
[inline] at /home/jeff/Downloads/julia/src/julia_internal.h:69
jl_call_method_internal at /home/jeff/Downloads/julia/src/gf.c:1915
subtract_kl! at /home/jeff/.julia/v0.5/Celeste/src/ElboKL.jl:106
unknown function (ip: 0x7f476620c011)
unknown function (ip: 0x7f476620c24e)
[inline] at /home/jeff/Downloads/julia/src/julia_internal.h:69
jl_call_method_internal at /home/jeff/Downloads/julia/src/gf.c:1915
elbo at /home/jeff/.julia/v0.5/Celeste/src/ElboDeriv.jl:1119
unknown function (ip: 0x7f4766283d8f)
unknown function (ip: 0x7f476628400e)
[inline] at /home/jeff/Downloads/julia/src/julia_internal.h:69
jl_call_method_internal at /home/jeff/Downloads/julia/src/gf.c:1915
do_call at /home/jeff/Downloads/julia/src/interpreter.c:66
eval at /home/jeff/Downloads/julia/src/interpreter.c:185
eval at /home/jeff/Downloads/julia/src/interpreter.c:189
eval_body at /home/jeff/Downloads/julia/src/interpreter.c:552
jl_interpret_toplevel_thunk_with at /home/jeff/Downloads/julia/src/interpreter.c:582
jl_toplevel_eval_flex at /home/jeff/Downloads/julia/src/toplevel.c:552
[inline] at /home/jeff/Downloads/julia/src/toplevel.c:421
jl_toplevel_eval_flex at /home/jeff/Downloads/julia/src/toplevel.c:487
jl_parse_eval_all at /home/jeff/Downloads/julia/src/ast.c:784
jl_load at /home/jeff/Downloads/julia/src/toplevel.c:577
include at ./boot.jl:264
jl_apply_generic at /home/jeff/Downloads/julia/src/gf.c:1918
include_from_node1 at ./loading.jl:417
unknown function (ip: 0x7f4970519f0c)
jl_apply_generic at /home/jeff/Downloads/julia/src/gf.c:1918
process_options at ./client.jl:248
_start at ./client.jl:300
unknown function (ip: 0x7f49705150d9)
jl_apply_generic at /home/jeff/Downloads/julia/src/gf.c:1918
unknown function (ip: 0x401b13)
unknown function (ip: 0x4016df)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x401725)
Allocations: 77101224 (Pool: 77043587; Big: 57637); GC: 773
Segmentation fault
``

@kpamnany
Copy link
Collaborator

Not sure why.

$ ./julia -E versioninfo\(\)
Julia Version 0.5.0-dev+2313
Commit e22c20c* (2016-01-26 17:47 UTC)
Platform Info:
  System: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1
nothing
$ echo $JULIA_NUM_THREADS
18
$ ./julia ~/.julia/v0.5/Celeste/bin/benchmark_elbo_with_hessian.jl 
WARNING: New definition 
    write(GZip.GZipStream, Array{#T<:Any, N<:Any}) at /home/kpamnany/.julia/v0.5/GZip/src/GZip.jl:456
is ambiguous with: 
    write(Base.IO, Array{UInt8, N<:Any}) at io.jl:154.
To fix, define 
    write(GZip.GZipStream, Array{UInt8, N<:Any})
before the new definition.
WARNING: Method definition cfitsio_typecode(Type{Int64}) in module Libcfitsio at /home/kpamnany/.julia/v0.5/FITSIO/src/libcfitsio.jl:162 overwritten at /home/kpamnany/.julia/v0.5/FITSIO/src/libcfitsio.jl:162.
Loading data.
Intializing ModelParams.
Getting VP from sources.
Processing the bands.
  Initializing band 1 patches.  Initializing band 1 tiled image sources.
  Initializing band 2 patches.  Initializing band 2 tiled image sources.
  Initializing band 3 patches.  Initializing band 3 tiled image sources.
  Initializing band 4 patches.  Initializing band 4 tiled image sources.
  Initializing band 5 patches.  Initializing band 5 tiled image sources.

Calculating ELBO.
  9.713185 seconds (19.57 M allocations: 10.120 GB, 11.15% gc time)
  4.873643 seconds (14.80 M allocations: 9.191 GB, 23.20% gc time)

@kpamnany
Copy link
Collaborator

You can try to set Threaded=false in ElboDeriv.jl, or export JULIA_NUM_THREADS=1 before running to rule out threads as the problem. Beyond that... hmm.

@jeff-regier
Copy link
Owner Author

It still fails with Threaded=false :-( The errors look like they have
something to do with ForwardDiff.jl, but the unit tests for ForwardDiff.jl
all pass.

$ julia5 -E versioninfo\(\)
Julia Version 0.5.0-dev+2399
Commit 1f7c72e (2016-01-29 12:28 UTC)
Platform Info:
  System: Linux (x86_64-unknown-linux-gnu)
  CPU: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Core2)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1
nothing

On Thu, Feb 11, 2016 at 4:00 PM kpamnany notifications@github.com wrote:

You can try to set Threaded=false in ElboDeriv.jl, or export
JULIA_NUM_THREADS=1 before running to rule out threads as the problem.
Beyond that... hmm.


Reply to this email directly or view it on GitHub
#118 (comment)
.

@kpamnany
Copy link
Collaborator

Any idea why it says line 155 below? It's a 29 line file...

signal (11): Segmentation fault
while loading /home/jeff/git/Celeste.jl/bin/benchmark_elbo_with_hessian.jl, in expression starting on line 155

@jeff-regier
Copy link
Owner Author

No, that's kind of weird. It's a 29 line file on my machine too.

$ wc -l benchmark_elbo_with_hessian.jl 
29 benchmark_elbo_with_hessian.jl

I've seen this kind of thing before though, where Julia reports the line number from a different file. It may be unrelated to the seg fault, well, except in that it makes it the seg fault harder to locate.

@kpamnany
Copy link
Collaborator

Can try to get a backtrace through gdb?

@jeff-regier
Copy link
Owner Author

I just checked out the version of Julia you're using (Julia Version 0.5.0-dev+2313; commit e22c20c). That "fixes" the problem. The problem reappears when I switch back to the newer version of Julia. I suggest we don't upgrade our versions of Julia 0.5 for awhile....

@kpamnany
Copy link
Collaborator

lol... sounds good to me.

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.

2 participants