I'm reading in an h5 file using the HDF5 package and need to invert it over 
the first two dimensions after reading it in, and I'm doing so in a 
@everywhere begin...end block, as the data has to be available on all 
workers. For some reason, doing both steps within one block fails. This 
works as expected:

nprocs()==CPU_CORES || addprocs(CPU_CORES-1)

@everywhere begin
  using HDF5
  data = h5read("myfile.h5", "data")
end

@everywhere begin
  for i = 1:size(data, 3)
    data[:, :, i] = data[:, :, i]'
  end
end

But this fails:

nprocs()==CPU_CORES || addprocs(CPU_CORES-1)
@everywhere begin
  using HDF5
  data = h5read("myfile.h5", "data")  

  for i = 1:size(data, 3)
    data[:, :, i] = data[:, :, i]'
  end
end

ERROR: error compiling anonymous: unsupported or misplaced expression using in 
function anonymous
 in eval at 
C:\cygwin\home\vagrant\buildbot\slave\package_win8_1-x64\build\base\sysimg.jl:7
 in anonymous at multi.jl:1305
 in anonymous at multi.jl:855
 in run_work_thunk at multi.jl:621
 in anonymous at task.jl:855


Reply via email to