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]
test.dat
Description: Binary data
test_reading.chpl
Description: Binary data
test_reading.output
Description: Binary data
------------------------------------------------------------------------------
_______________________________________________ Chapel-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/chapel-users
