Hello,

I am a graduate student at the University of Illinois working on processing
raster files in R.

We are trying to parallelize the process and are working towards enabling
asynchronous writes. To this end, we are using the 'mmap' package created
by you. I had an issue I was hoping you could help me with:

We are using the 'snow' package and using 'mmap' to map chunks of the image
in different clusters. The relevant snippet of the code is below:

*clusterMap(cl,function(fun,i,args,x,tr,filename,outbands) *
*{*
*  # Stuff to split raster into independent chunks*
*  out <- mmap(filename,mode=real64())*
*  # Process chunk of file*
*  munmap(out)*
*  return(NULL)*
*
},i,MoreArgs=list(fun=fun,x=x,tr=tr,args=args,filename=filename,outbands=outbands))
*
*
*
What it's meant to do is send different chunks to different nodes of a
cluster (or to different cores of a single CPU, which is what I'm presently
doing) runs perfectly fine on linux, so I don't think it's a problem with
the way the chunks are created since they are designed to be completely
independent of each other. The error message I get is:

*Error in checkForRemoteErrors(val) : *
*  2 nodes produced errors; first error: invalid mmap pointer*

The error does not occur if I only 'mmap' and 'munmap' and do not do any
operations on the file. Strangely enough, the code works on Linux, but not
on Windows. From the source for 'mmap' I found that the linux backed in the
Unix 'mmap' while on Windows, the backend is 'MapViewOfFile', which leads
me to believe that the issue stems from a difference in the underlying OS.
My adventures with R are only beginning, so I was hoping someone could shed
more light on this matter.

Thank you very much!

-Pritam

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to