Re: [julia-users] How to load data from a *.mat file on all workers in Julia 0.4.5 without require()?
Thanks Tim, The second link helped me figure out the issue(s)/bug(s). Really appreciate you guys! On Tuesday, April 12, 2016 at 3:54:58 PM UTC+5, Tim Holy wrote: > > This is covered is multiple previous posts to the mailing list. > > https://groups.google.com/forum/#!searchin/julia-users/@everywhere$20using/julia-users/5Xf7duBT6WI/Q8sCr44qBwAJ > > https://groups.google.com/d/msg/julia-users/KKscQCby0GM/cOr2Dr3aAAAJ > > Best, > --Tim > > On Tuesday, April 12, 2016 03:41:48 AM 'Jhan Jar' via julia-users wrote: > > Hi, > > > > In Julia 0.3.5, the following loaded data on all workers: > > > > addprocs(3) > > require("data_loading_script.jl") > > > > Contents of my data_loading_script.jl were akin to: > > > > using MAT > > source_file = matopen(data_filename) > > > > var1 = read(source_file, "var1"); > > var2 = read(source_file, "var2") > > . > > . > > varN = read(source_file, "varN") > > > > close(source_file) > > > > Now, to make it work without require() in Julia 0.4.5 I changed > > data_loading_script.jl > > to: > > @everywhere begin > > using MAT > > source_file = matopen(data_filename) > > > > var1 = read(source_file, "var1"); > > var2 = read(source_file, "var2") > > . > > . > > varN = read(source_file, "varN") > > > > close(source_file) > > end > > > > And when I do a include("data_loading_script.jl"), the data/vars get > loaded > > on all workers, but the REPL displays: > > > > WARNING: replacing module MAT > > WARNING: Method definition read(Union{HDF5.HDF5Group, HDF5.HDF5Datatype, > > HDF5.HD > > F5Dataset}, Type{Bool}) in module MAT_HDF5 at > > C:\Users\XYZ\.julia\v0.4\MAT\src\MA > > T_HDF5.jl:565 overwritten in module MAT_HDF5 at > > C:\Users\XYZ\.julia\v0.4\MAT\src\ > > MAT_HDF5.jl:565. > > WARNING: Method definition read(Union{HDF5.HDF5Group, HDF5.HDF5Datatype, > > HDF5.HD > > F5Dataset}, Type{Array{Bool, N<:Any}}) in module MAT_HDF5 at > > C:\Users\XYZ\.julia\ > > v0.4\MAT\src\MAT_HDF5.jl:569 overwritten in module MAT_HDF5 at > > C:\Users\XYZ\.juli > > a\v0.4\MAT\src\MAT_HDF5.jl:569. > > WARNING: replacing module MAT > > WARNING: Method definition read(Union{HDF5.HDF5Group, HDF5.HDF5Datatype, > > HDF5.HD > > F5Dataset}, Type{Bool}) in module MAT_HDF5 at > > C:\Users\XYZ\.julia\v0.4\MAT\src\MA > > T_HDF5.jl:565 overwritten in module MAT_HDF5 at > > C:\Users\XYZ\.julia\v0.4\MAT\src\ > > MAT_HDF5.jl:565. > > WARNING: Method definition readWARNING: replacing module MAT > > (Union{HDF5.HDF5Group, HDF5WARNING: Method definition > > read.(HDF5DatatypeUnion, { > > HDF5HDF5..HDF5DatasetHDF5Group}, , HDF5Type.{HDF5DatatypeArray, > {HDF5Bool., > > HDF5 > > DatasetN<:}Any, }Type}{)Bool in module MAT_HDF5} at > > C:\Users\XYZ\.julia\v0.4\MAT\ > > src\MAT_HDF5.jl:569) overwritten in module MAT_HDF5 in module MAT_HDF5 > at > > C:\Use > > rs\XYZ\.julia\v0.4\MAT\src\MAT_HDF5.jl:569 at > > C:\Users\XYZ\.julia\v0.4\MAT\src\MAT > > _HDF5.jl:565. > > overwritten in module MAT_HDF5 at > > C:\Users\XYZ\.julia\v0.4\MAT\src\MAT_HDF5.jl:5 > > 65. > > WARNING: Method definition read(Union{HDF5.HDF5Group, HDF5.HDF5Datatype, > > HDF5.HD > > F5Dataset}, Type{Array{Bool, N<:Any}}) in module MAT_HDF5 at > > C:\Users\XYZ\.julia\ > > v0.4\MAT\src\MAT_HDF5.jl:569 overwritten in module MAT_HDF5 at > > C:\Users\XYZ\.juli > > a\v0.4\MAT\src\MAT_HDF5.jl:569. > > > > > > What am I doing wrong? > > > > Thanks. > >
[julia-users] How to load data from a *.mat file on all workers in Julia 0.4.5 without require()?
Hi, In Julia 0.3.5, the following loaded data on all workers: addprocs(3) require("data_loading_script.jl") Contents of my data_loading_script.jl were akin to: using MAT source_file = matopen(data_filename) var1 = read(source_file, "var1"); var2 = read(source_file, "var2") . . varN = read(source_file, "varN") close(source_file) Now, to make it work without require() in Julia 0.4.5 I changed data_loading_script.jl to: @everywhere begin using MAT source_file = matopen(data_filename) var1 = read(source_file, "var1"); var2 = read(source_file, "var2") . . varN = read(source_file, "varN") close(source_file) end And when I do a include("data_loading_script.jl"), the data/vars get loaded on all workers, but the REPL displays: WARNING: replacing module MAT WARNING: Method definition read(Union{HDF5.HDF5Group, HDF5.HDF5Datatype, HDF5.HD F5Dataset}, Type{Bool}) in module MAT_HDF5 at C:\Users\XYZ\.julia\v0.4\MAT\src\MA T_HDF5.jl:565 overwritten in module MAT_HDF5 at C:\Users\XYZ\.julia\v0.4\MAT\src\ MAT_HDF5.jl:565. WARNING: Method definition read(Union{HDF5.HDF5Group, HDF5.HDF5Datatype, HDF5.HD F5Dataset}, Type{Array{Bool, N<:Any}}) in module MAT_HDF5 at C:\Users\XYZ\.julia\ v0.4\MAT\src\MAT_HDF5.jl:569 overwritten in module MAT_HDF5 at C:\Users\XYZ\.juli a\v0.4\MAT\src\MAT_HDF5.jl:569. WARNING: replacing module MAT WARNING: Method definition read(Union{HDF5.HDF5Group, HDF5.HDF5Datatype, HDF5.HD F5Dataset}, Type{Bool}) in module MAT_HDF5 at C:\Users\XYZ\.julia\v0.4\MAT\src\MA T_HDF5.jl:565 overwritten in module MAT_HDF5 at C:\Users\XYZ\.julia\v0.4\MAT\src\ MAT_HDF5.jl:565. WARNING: Method definition readWARNING: replacing module MAT (Union{HDF5.HDF5Group, HDF5WARNING: Method definition read.(HDF5DatatypeUnion, { HDF5HDF5..HDF5DatasetHDF5Group}, , HDF5Type.{HDF5DatatypeArray, {HDF5Bool., HDF5 DatasetN<:}Any, }Type}{)Bool in module MAT_HDF5} at C:\Users\XYZ\.julia\v0.4\MAT\ src\MAT_HDF5.jl:569) overwritten in module MAT_HDF5 in module MAT_HDF5 at C:\Use rs\XYZ\.julia\v0.4\MAT\src\MAT_HDF5.jl:569 at C:\Users\XYZ\.julia\v0.4\MAT\src\MAT _HDF5.jl:565. overwritten in module MAT_HDF5 at C:\Users\XYZ\.julia\v0.4\MAT\src\MAT_HDF5.jl:5 65. WARNING: Method definition read(Union{HDF5.HDF5Group, HDF5.HDF5Datatype, HDF5.HD F5Dataset}, Type{Array{Bool, N<:Any}}) in module MAT_HDF5 at C:\Users\XYZ\.julia\ v0.4\MAT\src\MAT_HDF5.jl:569 overwritten in module MAT_HDF5 at C:\Users\XYZ\.juli a\v0.4\MAT\src\MAT_HDF5.jl:569. What am I doing wrong? Thanks.
[julia-users] Re: Deprecation of `require` and parallel code execution.
Would it also work for pmap()? I don't have any @parallel loops. On Sunday, April 10, 2016 at 12:39:25 AM UTC+5, Eduardo Lenz wrote: > > Hi. > > Use include("file.jl") and add @everywhere in front of the definition of > every function to be used inside the @parallel loop. > > []´s > > On Saturday, April 9, 2016 at 12:02:02 PM UTC-3, Jhan Jar wrote: >> >> Hi, >> >> In Julia 0.3.5, the following loaded the data and code/functions on all >> workers: >> >> addprocs(3) >> require("data_loading_script.jl") >> require("functions.jl") >> >> Now, Julia 0.4.5 warns about deprecation of require and suggests >> switching to 'using' or 'import'. >> >> What is the equivalent in Julia 0.4.5 for the above three lines that >> worked fine in Julia 0.3.x? >> >>
[julia-users] Deprecation of `require` and parallel code execution.
Hi, In Julia 0.3.5, the following loaded the data and code/functions on all workers: addprocs(3) require("data_loading_script.jl") require("functions.jl") Now, Julia 0.4.5 warns about deprecation of require and suggests switching to 'using' or 'import'. What is the equivalent in Julia 0.4.5 for the above three lines that worked fine in Julia 0.3.x?
Re: [julia-users] Is it possible to grab REPL contents after a .jl file completes execution ?
Thank you Karpinski and Sachs. It appears, that for now, a workaround outside Julia is the only way. On Monday, March 21, 2016 at 6:54:22 PM UTC+5, Josef Sachs wrote: > > > On Mon, 21 Mar 2016 09:39:40 -0400, Stefan Karpinski said: > > > Could you just pipe the output of non-interactive Julia to the `tee` > > command? > > I'd still like to be able to pipe the output of non-non-interactive Julia. > > https://github.com/JuliaLang/julia/issues/14776 >
[julia-users] Is it possible to grab REPL contents after a .jl file completes execution ?
Hi, I have a main .jl script which calls other .jl scripts. All scripts display output. The sources of output are println()s and tic-toc pair. The scripts take hours to complete. So far my guess is that the last thing main script should do is save all text displayed on REPL to a file. Is this possible? Does the julia REPL have an equivalent of the Linux "tee" shell command? I m on MS Win7 and Julia 0.3 release. Thanks!