A bit more information: the error seems to be occurring in the function
`fit!` in algorithms/proxgrad.jl
<https://github.com/madeleineudell/LowRankModels.jl/blob/dataframe-ux/src/algorithms/proxgrad.jl>.
There's almost no calling of C functions, so very little chance for memory
management problems: the only possible problems I can imagine are in

1) gemm! (eg line 59
<https://github.com/madeleineudell/LowRankModels.jl/blob/dataframe-ux/src/algorithms/proxgrad.jl#L59>
)
2) accessing out-of-bounds entries via an ArrayView (eg line 84
<https://github.com/madeleineudell/LowRankModels.jl/blob/dataframe-ux/src/algorithms/proxgrad.jl#L84>
)
3) accessing a garbage-collected variable (maybe accessing an array entry
via an array view?)

I've checked sizes of matrices via a bunch of @assert statements, and the
error occurs nondeterministically, which leads me to think that something
like 3) is happening.

Any ideas how we've managed to modify an object after freeing it?

On Fri, Jan 29, 2016 at 10:14 AM, Nandana Sengupta <nandana....@gmail.com>
wrote:

> I'm using the Julia package LowRankModels (
> https://github.com/madeleineudell/LowRankModels.jl/tree/dataframe-ux) and
> coming across a malloc error when making a single innocuous change to my
> code.
>
>
> For instance in the following sample code, changing a single parameter
> (the rank k) from 10 to 40 makes the model go from running smoothly to
> producing a malloc error.
>
>
> Would really appreciate any pointers towards what might be going on /any
> tips to debug this error. Details and code below. Thanks!
>
>
> #########################
>
>
> Wording of error: "julia(9849,0x7fff705d0300) malloc: *** error for object
> 0x7f96a332f408: incorrect checksum for freed object - object was probably
> modified after being freed.
>
> *** set a breakpoint in malloc_error_break to debug"
>
>
> Julia Version: 0.4.1
>
>
> Branch of LowRankModels: dataframe-ux
>
>
> Link to Data:
> https://dl.dropboxusercontent.com/u/24399038/GSS2014cleanestCV10.csv
>
>
> Julia code that reproduces the error:
>
>
>
> ##########################
>
>
> using DataFrames
>
> # branch of LowRankModels found at
> https://github.com/NandanaSengupta/LowRankModels.jl/tree/dataframe-ux
>
> using LowRankModels
>
>
> ### loading data table
>
> df = readtable("GSS2014cleanestCV10.csv");
>
> # eliminate first (id) column
>
> df1 = df[:, 2:size(df)[2] ];
>
>
>
> # vector of datatypes -- 3 types of columns: real, categorical and ordinal
>
> datatypes = Array(Symbol, size(df1)[2])
>
> datatypes[1:23] = :real
>
> datatypes[24:54] = :ord
>
> datatypes[55:size(df1)[2]] = :cat
>
>
>
>
> ################## run GLRM AND cross_validate with rank k = 10
> ##############
>
> ######## Runs without any error
>
>
> glrm_10 = GLRM(df1, 10, datatypes)
>
>
> srand(10)
>
> t1, t2, t3, t4 = cross_validate(glrm_10, nfolds = 5, params = Params(),
> init = init_svd!);
>
>
>
> ################## run GLRM AND cross_validate with rank k = 40
> ##############
>
> ######## malloc error on cross_validate
>
>
> glrm_40 = GLRM(df1, 40, datatypes) #, prob_scale = false)
>
>
> srand(40)
>
> t1, t2, t3, t4 = cross_validate(glrm_40, nfolds = 5, params = Params(),
> init = init_svd!);
>



-- 
Madeleine Udell
Postdoctoral Fellow at the Center for the Mathematics of Information
California Institute of Technology
*https://courses2.cit.cornell.edu/mru8
<https://courses2.cit.cornell.edu/mru8>*
(415) 729-4115

Reply via email to