On Mon, Sep 23, 2019 at 12:45 PM Dmitri A. Sergatskov <
address@hidden> wrote:
$ cat t2.m
h1=figure();
plot(randn(10));
fname = "t2.ofig"
hgsave(h1, fname)
h2=hgload(fname)
h1_l = get(h1);
h2_l = get(h2);
assert(h1, h2)
$ ls -l t2.ofig
ls: cannot access 't2.ofig': No such file or directory
octave:1> t2
fname = t2.ofig
error: hgload: unable to locate file t2.ofig
error: called from
hgload at line 60 column 7
t2 at line 5 column 3
octave:2> t2
fname = t2.ofig
h2 = 3
error: ASSERT errors for: assert (h1,h2)
Location | Observed | Expected | Reason
() 2 3 Abs err 1 exceeds tol 0 by 1
octave:3>
Adding pause(10) after hgsave() does not seem to change anything, so
it is not a timing issue.
What is going on here?
I'm not seeing the first problem with hgload. Here is my session
So I added pause(10) after hgsave and also changed hgsave to text format.
During those 10 seconds delay i run less t2.ofig and see that the file is there.
I also ran strace on this but all I see is:
<...>
read(5, "\4\0\0\0\0\0\0\0", 16) = 8
recvmsg(11, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(11, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=5, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 4, 8145) = 0 (Timeout)
recvmsg(11, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(11, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=5, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=14, events=POLLIN}], 4, 19864error: hgload: unable to locate file t2.ofig
error: called from
hgload at line 60 column 7
t2 at line 6 column 3
) = 1 ([{fd=5, revents=POLLIN}])
read(5, "\1\0\0\0\0\0\0\0", 16) = 8
<...>
This is repeatable 100% on 2 different computers with Fedora 31. I will try clang compile next.
Dmitri.
--