# Sys.WORD\_SIZE gives wrong bit size

**URL:** <https://discourse.julialang.org/t/sys-word-size-gives-wrong-bit-size/29879>\
**Category:** New to Julia\
**Created:** [October 14, 2019, 1:13am UTC](https://discourse.julialang.org/t/sys-word-size-gives-wrong-bit-size/29879 "2019-10-14T01:13:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nirvik](https://avatars.discourse-cdn.com/v4/letter/n/8491ac/32.png) [@Nirvik](https://discourse.julialang.org/u/Nirvik)\
**Post date:** [October 14, 2019, 1:13am UTC](https://discourse.julialang.org/t/sys-word-size-gives-wrong-bit-size/29879/1 "2019-10-14T01:13:36Z")

</div>

I was trying to use ODE solvers from MATLAB using the MATLABDiffEq package, however i find a load error due to matlab path not being found. I found that the function _matlab\_libpath_ gets the the MATLAB path variable using the Sys.WORD\_SIZE:

```
matlab_home = matlab_homepath()
matlab_lib_dir = if islinux()
    Sys.WORD_SIZE == 32 ? "glnx86" : "glnxa64"
elseif isapple()
    Sys.WORD_SIZE == 32 ? "maci" : "maci64"
elseif iswindows()
    Sys.WORD_SIZE == 32 ? "win32" : "win64"
end
matlab_libpath = joinpath(matlab_home, "bin", matlab_lib_dir)
if !isdir(matlab_libpath)
    error("The MATLAB library path could not be found.")
end
return matlab_libpath

```

However my system is 64 bit and hence the right value for **matlab\_lib\_dir** should be glnx64 but Sys.WORD\_SIZE returns 32. Why is it spitting out the wrong system bit information?

I am using Ubuntu 18.04 in 64bit AMD chipset.  
Thanks

---

<div class="post-metadata">

**Author:** ![greg\_plowman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/greg_plowman/32/8100_2.png) [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)\
**Post date:** [October 14, 2019, 2:26am UTC](https://discourse.julialang.org/t/sys-word-size-gives-wrong-bit-size/29879/2 "2019-10-14T02:26:22Z")

</div>

Is there any chance you installed a 32-bit version of Julia?

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [October 14, 2019, 7:06am UTC](https://discourse.julialang.org/t/sys-word-size-gives-wrong-bit-size/29879/3 "2019-10-14T07:06:50Z")

</div>

Related to the question above, how did you install julia?

---

<div class="post-metadata">

**Author:** ![Nirvik](https://avatars.discourse-cdn.com/v4/letter/n/8491ac/32.png) [@Nirvik](https://discourse.julialang.org/u/Nirvik)\
**Post date:** [October 14, 2019, 1:16pm UTC](https://discourse.julialang.org/t/sys-word-size-gives-wrong-bit-size/29879/4 "2019-10-14T13:16:04Z")

</div>

Yup, my bad…got it from snapstore instead of the Julia official package. And 32bit version was installed.  
Corrected it now. Thanks for the help !
