Hi  Nikhil -

Thanks for the bug report. I've included chapel-bugs here since that's
the right mailing list for bugs...

I don't see anything obviously wrong with your program.

I see from your error messages that you're using Chapel 1.8.0.
I can't reproduce the problem with trunk/ - although I get a
different error like
  IO.chpl:2290: error: cannot create a C string from a remote string
when I compile your program. But that problem is with writef -
and while worth fixing isn't the bug you're reporting. When I switched
it to use writeln, the program runs correctly for me.

Would you be willing to try checking out and building the trunk/
version to see if you still have this problem?  I also believe that
the warnings you describe have been addressed in that version.

Thanks very much,

-michael ferguson

On 03/28/2014 09:41 PM, Nikhil Padmanabhan wrote:
> Hello,
>
> I'm a newbie to Chapel, so apologies if I missed seeing this issue 
> somewhere...
>
> I just came across an edge case that surprised me while reading in a text 
> file; see the attached code and input data. Very quickly, I was trying to get 
> the various locales to read in consecutive chunks of a text file, and found 
> that on locales other than the one I opened the file on, it lets me read past 
> the file without an error.
>
> This does not happen if I replace the
>      read(x,y,z);
> with
>      (x,y,z) = read(real, real, real);
>
> I'm compiling the code with
>     chpl -o test_reading test_reading.chpl
>
> CHPL_COMM=gasnet
> CHPL_COMM_SUBSTRATE=mpi
>
> This is on an OS X 10.8.5 system, with gcc 4.7. The command I ran, and the 
> output is also attached.
>
> An unrelated comment :
>
> The writef statement triggers the warnings below while compiling --- I 
> realize this is not yet in the language spec though.
>
> Thanks in advance!
> -- Nikhil
>
> In file included from /tmp/chpl-npadmana-30889.deleteme/_main.c:39:0:
> /tmp/chpl-npadmana-30889.deleteme/IO.c: In function '_format_reader':
> /tmp/chpl-npadmana-30889.deleteme/IO.c:6797:7: warning: passing argument 3 of 
> 'qio_conv_parse' from incompatible pointer type [enabled by default]
> In file included from 
> /Users/npadmana/myWork/chapel/chapel-1.8.0/runtime//include/qio/qio-all.h:12:0,
>                   from 
> /Users/npadmana/myWork/chapel/chapel-1.8.0/runtime//include/chplio.h:16,
>                   from 
> /Users/npadmana/myWork/chapel/chapel-1.8.0/runtime//include/stdchpl.h:33,
>                   from /tmp/chpl-npadmana-30889.deleteme/chpl__header.h:31,
>                   from /tmp/chpl-npadmana-30889.deleteme/_main.c:1:
> /Users/npadmana/myWork/chapel/chapel-1.8.0/runtime//include/qio/qio_formatted.h:804:8:
>  note: expected 'size_t *' but argument is of type '_ref_uint64_t'
> In file included from /tmp/chpl-npadmana-30889.deleteme/_main.c:39:0:
> /tmp/chpl-npadmana-30889.deleteme/IO.c: In function '_extractMatch':
> /tmp/chpl-npadmana-30889.deleteme/IO.c:13103:5: warning: passing argument 6 
> of 'qio_channel_read_string' from incompatible pointer type [enabled by 
> default]
> In file included from 
> /Users/npadmana/myWork/chapel/chapel-1.8.0/runtime//include/qio/qio-all.h:12:0,
>                   from 
> /Users/npadmana/myWork/chapel/chapel-1.8.0/runtime//include/chplio.h:16,
>                   from 
> /Users/npadmana/myWork/chapel/chapel-1.8.0/runtime//include/stdchpl.h:33,
>                   from /tmp/chpl-npadmana-30889.deleteme/chpl__header.h:31,
>                   from /tmp/chpl-npadmana-30889.deleteme/_main.c:1:
> /Users/npadmana/myWork/chapel/chapel-1.8.0/runtime//include/qio/qio_formatted.h:375:7:
>  note: expected 'ssize_t * restrict' but argument is of type '_ref_int64_t'
>
>
> ---------------------------------
> Nikhil Padmanabhan
> [email protected] <mailto:[email protected]>


------------------------------------------------------------------------------
_______________________________________________
Chapel-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-bugs

Reply via email to