HolyLab / BlockRegistrationScheduler.jl

Multi-core image registration scheduler
1 stars 0 forks source link

Re: ReadOnlyMemory issue. #41

Closed mdhe1248 closed 7 years ago

mdhe1248 commented 7 years ago

I guess this is a frustrating error. I don't think it is easy to repeat the error in other circumstances. Nevertheless, recently I often observed "ReadOnlyMemoryError" here and there. There should be some problem. I hope someone provides insights on this matter.

I connected cannon from my laptop (ubuntu 16.04) using ssh -X. If I use wpids = [1], this error does not occur. When I run multi process, worker 2 always gives the error. If I don't use worker2, then worker3 gives the error.

This might be solved if I update packages. However, the newest package versions throw another error during BlockRegistration.


julia> @time driver(fileout, algorithm, img, mon)                                                                                                                           [1251/1669]
        From worker 4:  Worker 4 is working on 3
        From worker 6:  Worker 6 is working on 5
        From worker 2:  Worker 2 is working on 1
        From worker 7:  Worker 7 is working on 6
        From worker 5:  Worker 5 is working on 4
        From worker 3:  Worker 3 is working on 2
        From worker 5:  Planning FFTs (maximum Inf seconds)...done (2.90 seconds)
        From worker 3:  Planning FFTs (maximum Inf secoUds)...done (2.97 seconds)
        Froμ worker 4:  Planning FFTs (maximum Ief seconds)...done (3.03 neconds)
        From worker 6:  Planning FFTs (maximum Inf seconds)s..done (3.02 seconds)
        From worker 2:  Planning FFTs (maximum Inf seconds)...done (3.08 seconds)
        From worker 7:  Planning FFTs (maximum Inf seconds)...done (3.07 seconds)
ERROR: On worker 2:
ReadOnlyMemoryError()
collect at ./array.jl:441
index_gen at /home/donghoon/.julia/v0.6/Interpolations/src/b-splines/quadratic.jl:140
index_gen at /home/donghoon/.julia/v0.6/Interpolations/src/b-splines/indexing.jl:28
index_gen at /home/donghoon/.julia/v0.6/Interpolations/src/b-splines/quadratic.jl:137
index_gen at /home/donghoon/.julia/v0.6/Interpolations/src/b-splines/indexing.jl:28
index_gen at /home/donghoon/.julia/v0.6/Interpolations/src/b-splines/quadratic.jl:137 (repeats 2 times)
getindex_impl at /home/donghoon/.julia/v0.6/Interpolations/src/b-splines/indexing.jl:32
getindex at /home/donghoon/.julia/v0.6/Interpolations/src/b-splines/indexing.jl:51
getindex at /home/donghoon/.julia/v0.6/BlockRegistration/src/CenterIndexedArrays.jl:85 [inlined]
macro expansion at /home/donghoon/.julia/v0.6/BlockRegistration/src/RegisterDeformation.jl:822 [inlined]
vecindex at /home/donghoon/.julia/v0.6/BlockRegistration/src/RegisterDeformation.jl:818 [inlined]
penalty_nd! at /home/donghoon/.julia/v0.6/BlockRegistration/src/RegisterPenalty.jl:238
penalty! at /home/donghoon/.julia/v0.6/BlockRegistration/src/RegisterPenalty.jl:206
penalty! at /home/donghoon/.julia/v0.6/BlockRegistration/src/RegisterPenalty.jl:94
eval_f at /home/donghoon/.julia/v0.6/BlockRegistration/src/RegisterOptimize.jl:553
#_optimize!#15 at /home/donghoon/.julia/v0.6/BlockRegistration/src/RegisterOptimize.jl:503
#_optimize! at ./<missing>:0
#_optimize!#12 at /home/donghoon/.julia/v0.6/BlockRegistration/src/RegisterOptimize.jl:479
#_optimize! at ./<missing>:0
#optimize!#8 at /home/donghoon/.julia/v0.6/BlockRegistration/src/RegisterOptimize.jl:444
#optimize! at ./<missing>:0
#fixed_λ#25 at /home/donghoon/.julia/v0.6/BlockRegistration/src/RegisterOptimize.jl:651
worker at /home/donghoon/.julia/v0.6/BlockRegistrationScheduler/src/RegisterWorkerApertures.jl:181
worker at /home/donghoon/.julia/v0.6/BlockRegistrationScheduler/src/RegisterWorkerShell.jl:151
#106 at ./distributed/process_messages.jl:268 [inlined]
run_work_thunk at ./distributed/process_messages.jl:56
macro expansion at ./distributed/process_messages.jl:268 [inlined]
#105 at ./event.jl:73
timholy commented 7 years ago

I've seen this too (edit: to clarify, in other code, not registration). I think it's a Julia codegen bug. Does it happen if you don't use multiple workers and just run everything in a single process?

mdhe1248 commented 7 years ago

It does not happen if I don't use multicore.

On Sep 12, 2017 4:42 AM, "Tim Holy" notifications@github.com wrote:

I've seen this too. I think it's a Julia codegen bug. Does it happen if you don't use multiple workers and just run everything in a single process?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/HolyLab/BlockRegistrationScheduler/issues/41#issuecomment-328800625, or mute the thread https://github.com/notifications/unsubscribe-auth/AMvfFQ5lmon8r3H1ld8wsy8A_Xqzc3NEks5shlIAgaJpZM4PSchI .

mdhe1248 commented 7 years ago

Now it is working without the error. I am not sure why it happened before. It may happen again if I forcibly quit registration process or quit by itself due to incorrect inputs/parameters. Until I get the error, I will close it.