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

Julia crashes when I use the sin function on an array #262

Closed
Lattitude75 opened this issue May 30, 2020 · 2 comments
Closed

Julia crashes when I use the sin function on an array #262

Lattitude75 opened this issue May 30, 2020 · 2 comments

Comments

@Lattitude75
Copy link

I use the following driver for my card with mesa-opencl-icd loader and radeon driver.

0d:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / Radeon 520 Mobile] (rev 83)
	Subsystem: Hewlett-Packard Company Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / Radeon 520 Mobile]

I have been trying to use ArrayFire in Julia and after installing all the drivers, I have been able to import the package and also recognise my card.

ArrayFire v3.7.1 (OpenCL, 64-bit Linux, build d9d9b65)
[0] Clover: AMD HAINAN (DRM 2.50.0, 5.4.0-33-generic, LLVM 9.0.1), 2048 MB

Some functions work fine, like the following

using ArrayFire
a = rand(10,10)
ad = AFArray(a)
b = (ad+4)/2
b < a
abs.(a)
fft(a)

But, the following gives me a core dump.

julia> af.sin(a)
AFArray: ac_rtld error: shdr->sh_size & 3
ELF error: invalid section index

signal (11): Segmentation fault
in expression starting at REPL[8]:0
unknown function (ip: 0x7fd2136e8636)
unknown function (ip: 0x7fd2182748aa)
unknown function (ip: 0x7fd21827514e)
unknown function (ip: 0x7fd218271c34)
unknown function (ip: 0x7fd2182723c2)
unknown function (ip: 0x7fd2182605ec)
unknown function (ip: 0x7fd21ad40e49)
unknown function (ip: 0x7fd21ad41de4)
unknown function (ip: 0x7fd21a70729a)
unknown function (ip: 0x7fd21a964f2c)
af_get_data_ptr at /opt/arrayfire/lib64/libafopencl.so.3 (unknown line)
af_get_data_ptr at /opt/arrayfire/lib64/libaf.so.3 (unknown line)
get_data_ptr at /home/saipavanchitta/.julia/packages/ArrayFire/wYxcd/src/wrap.jl:748 [inlined]
convert_array at /home/saipavanchitta/.julia/packages/ArrayFire/wYxcd/src/util.jl:216
Array at /home/saipavanchitta/.julia/packages/ArrayFire/wYxcd/src/array.jl:33 [inlined]
toa at /home/saipavanchitta/.julia/packages/ArrayFire/wYxcd/src/util.jl:48
show at /home/saipavanchitta/.julia/packages/ArrayFire/wYxcd/src/util.jl:52
display at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:137
display at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:141
display at ./multimedia.jl:323
unknown function (ip: 0x7fd24d86adf8)
jl_f__apply_latest at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
#invokelatest#1 at ./essentials.jl:712 [inlined]
invokelatest at ./essentials.jl:711 [inlined]
print_response at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:161
unknown function (ip: 0x7fd22d0171f9)
print_response at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:146
unknown function (ip: 0x7fd22d016905)
do_respond at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:729
unknown function (ip: 0x7fd22d015203)
unknown function (ip: 0x7fd24d86adf8)
jl_f__apply_latest at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
#invokelatest#1 at ./essentials.jl:712 [inlined]
invokelatest at ./essentials.jl:711 [inlined]
run_interface at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/LineEdit.jl:2354
run_frontend at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:1055
run_repl at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:206
#764 at ./client.jl:383
jfptr_#764_8156.clone_1 at /usr/lib/x86_64-linux-gnu/julia/sys.so (unknown line)
unknown function (ip: 0x7fd24d86adf8)
jl_f__apply_latest at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
#invokelatest#1 at ./essentials.jl:712 [inlined]
invokelatest at ./essentials.jl:711 [inlined]
run_main_repl at ./client.jl:367
exec_options at ./client.jl:305
_start at ./client.jl:484
jfptr__start_2075.clone_1 at /usr/lib/x86_64-linux-gnu/julia/sys.so (unknown line)
unknown function (ip: 0x555958bf19d9)
unknown function (ip: 0x555958bf15a6)
__libc_start_main at /usr/bin/../lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x555958bf164d)
Allocations: 42364161 (Pool: 42351297; Big: 12864); GC: 43
Segmentation fault (core dumped)

And also this function

julia> b = randn(AFArray{Float64}, 100, 100)
ac_rtld error: shdr->sh_size & 3
ELF error: invalid section index

signal (11): Segmentation fault
in expression starting at REPL[2]:1
unknown function (ip: 0x7fabe65a4636)
unknown function (ip: 0x7fabeb1308aa)
unknown function (ip: 0x7fabeb13114e)
unknown function (ip: 0x7fabeb12dc34)
unknown function (ip: 0x7fabeb12e3c2)
unknown function (ip: 0x7fabeb11c5ec)
unknown function (ip: 0x7fabee2430c2)
unknown function (ip: 0x7fabee23d2a0)
unknown function (ip: 0x7fabee24495c)
unknown function (ip: 0x7fabee244a09)
unknown function (ip: 0x7fabeecb61e7)
af_randn at /opt/arrayfire/lib64/libafopencl.so.3 (unknown line)
af_randn at /opt/arrayfire/lib64/libaf.so.3 (unknown line)
randn at /home/saipavanchitta/.julia/packages/ArrayFire/wYxcd/src/random.jl:17
randn at /home/saipavanchitta/.julia/packages/ArrayFire/wYxcd/src/random.jl:21 [inlined]
randn at /home/saipavanchitta/.julia/packages/ArrayFire/wYxcd/src/random.jl:23
unknown function (ip: 0x7fac03f5d000)
unknown function (ip: 0x7fac227b775b)
unknown function (ip: 0x7fac227b7389)
unknown function (ip: 0x7fac227b78f0)
unknown function (ip: 0x7fac227b89c8)
unknown function (ip: 0x7fac227b9616)
unknown function (ip: 0x7fac227d1e08)
unknown function (ip: 0x7fac227d23c8)
jl_toplevel_eval_in at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
eval at ./boot.jl:331
eval_user_input at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:86
macro expansion at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:118 [inlined]
#26 at ./task.jl:358
unknown function (ip: 0x7fac227bccbb)
unknown function (ip: (nil))
Allocations: 9832591 (Pool: 9829263; Big: 3328); GC: 10
Segmentation fault (core dumped)

I am running Ubuntu 20.04 on the latest updates and drivers.

Please help me out.

@ghost
Copy link

ghost commented May 30, 2020

Seems that your ArrayFire library is having problem linking to OpenCL libraries. Report to https://github.com/arrayfire/arrayfire or try recompiling it on your system so it links correctly.

@Lattitude75
Copy link
Author

Lattitude75 commented Jun 1, 2020

Please refer to this link: arrayfire/arrayfire#2912. This issue is solved.

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

No branches or pull requests

1 participant