I often use a pattern where my code can run in one of two modes:
Record, where benchmark results are created
Playback, where previously recorded results are used in regression testing or post-processing
This leads to code snippets like:
record = true
if record
println("Recording mode...")
a = 42
@save "bench.jld" a
else
println("Playback mode...")
@load "bench.jld"
end
Running this leads to ErrorException("File bench.jld cannot be found") being thrown. Apparently the file is required to exist during macro expansion as opposed to at runtime.
Is this required in the current design of JLD or can this requirement be relaxed?
I often use a pattern where my code can run in one of two modes:
This leads to code snippets like:
Running this leads to
ErrorException("File bench.jld cannot be found")
being thrown. Apparently the file is required to exist during macro expansion as opposed to at runtime.Is this required in the current design of
JLD
or can this requirement be relaxed?