Hi,

I'm curious what's expected for the following sample code.  I consistently
run into an issue where opening the file on a locale in a local block
causes a remote data access violation.  Wondering if I'm misunderstanding a
concept or if it's a bug.

Thanks!
Brian

$ ./a.out -nl 2
file_locale.chpl:7: error: cannot access remote data in local block
count = 1164970

-----

use IO;

for loc in Locales {
  on loc {
    local {
      var count = 0;
      var infile = open("data.txt", iomode.r);
      var row: string;
      for row in infile.lines() {
        count += 1;
      }
      writeln("count = ", count);
    }
  }
}
------------------------------------------------------------------------------
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to