Skip to content

Commit

Permalink
JLD.save(filename, keyresult, result, keyx, x) crashes v0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
montyvesselinov committed Jul 16, 2017
1 parent a9225cd commit b1fedbd
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/ReusableFunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,18 @@ function saveresultfile(name::String, result::Any, x::Any; keyresult::String="re
rm(filename)
end
end
JLD.save(filename, keyresult, result, keyx, x)
#=
@show filename
@show keyresult
@show result
@show keyx
@show typeof(x)
@show x
=#
if !isfile(filename)
# JLD.save(filename, keyresult, result, keyx, x) # this crashes v0.6
JLD.save(filename, keyresult, result)
end
end

"Make a reusable function expecting both regular and keyword arguments"
Expand Down Expand Up @@ -123,7 +134,7 @@ function maker3function(f::Function, dirname::String; ignore_keywords::Array{Sym
!quiet && @show result
if result == nothing
result = f(x...; kw..., kwx...)
saveresultfile(filename, result, x)
saveresultfile(filename, result, x...)
else
global restarts += 1
end
Expand Down

0 comments on commit b1fedbd

Please sign in to comment.