[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54622] test importdata fails in dev octave wi
From: |
John Donoghue |
Subject: |
[Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows |
Date: |
Mon, 10 Sep 2018 14:29:13 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134 |
Follow-up Comment #44, bug #54622 (project octave):
Looking at the issue in dlmread.
I added some print statements to dlmready, but havent had a change to take a
real look to see if it tells anything usefull yet:
diff -r f7ef179096ee libinterp/corefcn/dlmread.cc
--- a/libinterp/corefcn/dlmread.cc Thu Sep 06 11:01:14 2018 -0400
+++ b/libinterp/corefcn/dlmread.cc Mon Sep 10 10:24:11 2018 -0400
@@ -310,6 +310,8 @@
std::istringstream tmp_stream;
+ printf("dlmread cmax=%d rmax=%d, rcnt=%d, r0=%d, r1=%d\n", (int)cmax,
(int)rmax, (int)rcnt, (int)r0, (int)r1);
+
// Read the data one field at a time, growing the data matrix as needed.
while (getline (*input, line))
{
@@ -317,7 +319,7 @@
if ((! sep_is_wspace || auto_sep_is_wspace)
&& line.find_first_not_of (" \t") == std::string::npos)
continue;
-
+printf("getline: '%s'\n", line.c_str());
// Infer separator from file if delimiter is blank.
if (sep.empty ())
{
@@ -396,7 +398,7 @@
pos1 = line.find_first_not_of (" \t"); // Skip leading whitespace.
else
pos1 = 0;
-
+printf("doloop pos1=%d rmax=%d cmax=%d\n", (int)pos1, (int)rmax, (int)cmax);
do
{
octave_quit ();
@@ -430,7 +432,7 @@
else
rdata.resize (rmax, cmax, empty_value);
}
-
+printf("v='%s'\n", str.c_str());
tmp_stream.str (str);
tmp_stream.clear ();
@@ -439,6 +441,7 @@
{
if (tmp_stream.eof ())
{
+ printf("set %lf\n", x);
if (iscmplx)
cdata(i,j++) = x;
else
@@ -447,6 +450,7 @@
else
{
int next_char = std::tolower (tmp_stream.peek ());
+ printf("not end - next=%d\n", next_char);
if (next_char == 'i' || next_char == 'j')
{
// Process pure imaginary numbers.
@@ -494,6 +498,7 @@
{
// octave_read_double() parsing failed
j++; // Leave data initialized to empty_value
+ printf("read double failed\n");
}
pos1 = pos2 + 1;
The on running:
d = dlmread('num.txt', '\t', 0,0, "emptyvalue", NA)
(where num.txt is file #44946)
Running the command before the test suite:
>> d = dlmread('num.txt', '\t', 0,0, "emptyvalue", NA)
dlmread cmax=0 rmax=32, rcnt=0, r0=0, r1=-2
getline: '3.1 Inf NA'
doloop pos1=0 rmax=32 cmax=2
v='3.1'
set 3.100000
v='Inf'
not end - next=-1
v='NA'
set nan
getline: '-Inf NaN 128'
doloop pos1=0 rmax=32 cmax=3
v='-Inf'
not end - next=-1
v='NaN'
not end - next=-1
v='128'
set 128.000000
d =
3.1000 Inf NA
-Inf NaN 128.0000
>>
Running it after the test suite was run:
>> d = dlmread('num.txt', '\t', 0,0, "emptyvalue", NA)
dlmread cmax=0 rmax=32, rcnt=0, r0=0, r1=-2
getline: '3.1 Inf NA'
doloop pos1=0 rmax=32 cmax=2
v='3.1'
set 3.100000
v='Inf'
not end - next=255
v='NA'
set nan
getline: '-Inf NaN 128'
doloop pos1=0 rmax=32 cmax=3
v='-Inf'
not end - next=255
v='NaN'
not end - next=255
v='128'
set 128.000000
d =
3.1000 NA NA
NA NA 128.0000
>>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?54622>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, (continued)
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, John Donoghue, 2018/09/07
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, Rik, 2018/09/07
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, Dan Sebald, 2018/09/07
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, Rik, 2018/09/07
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, John Donoghue, 2018/09/07
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, Rik, 2018/09/07
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, Dan Sebald, 2018/09/07
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, Rik, 2018/09/07
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, Rik, 2018/09/10
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, Rik, 2018/09/10
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows,
John Donoghue <=
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, John Donoghue, 2018/09/10
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, Rik, 2018/09/10
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, Dan Sebald, 2018/09/10
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, Dan Sebald, 2018/09/10
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, Dan Sebald, 2018/09/10
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, Dan Sebald, 2018/09/10
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, John Donoghue, 2018/09/11
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, John Donoghue, 2018/09/11
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, Dan Sebald, 2018/09/11
- [Octave-bug-tracker] [bug #54622] test importdata fails in dev octave with windows, Rik, 2018/09/11