Re: [Plplot-devel] Infinite Yielding issue

2016-12-27 Thread Pedro Vicente
Hi Phil

The removal of the templates does not need to be done after all.
see my email from 
today 2.46 PM  "Infinite Yielding issue"
that has a git patch or my 
3.16PM email that has the actual source code files.

I'll send more details, once we get all in sync in communication.

-Pedro








  - Original Message - 
  From: p.d.rosenb...@gmail.com 
  To: Pedro Vicente ; Alan W. Irwin 
  Cc: PLplot development list 
  Sent: Tuesday, December 27, 2016 6:21 PM
  Subject: RE: [Plplot-devel] Infinite Yielding issue


  This is really brief, I think we are all getting a little overexcited here 
very close to the release date.

   

  This is a functionality reducing, backwards incompatible API change. I know 
for one that it will not only cause build errors in some of my code, but 
because I use wxPLplotwindow classes in some of my code it will mean I 
have to revert to using wxPLstream and duplicate all the code from 
wxPLplotwindow to restore my functionality. This is why I made the class 
templated in the first place. It also future proofs us for future wxWindow 
derived classes and significantly eases linking problems. So there are very 
good design reasons for the current state.

   

  That said, if we really can't solve the current problems with the existing 
model, then we should change. However we certainly should not do that in a 
rushed manner in the days leading up to release.

   

  Note that up to now the bug Pedro reported exists on one remote x server. It 
does not appear to affect the Cygwin x server when used remotely, nor Xming. I 
would suggest that if we wish to release approximately on time, then we restore 
the previous API and release with a note saying that this remote X server has a 
compatibility issue and that users should check the git repo for updates.

   

  Meanwhile I can still think of two or three ways we can quite likely sort 
this without losing functionality or generating backwards incompatible changes. 
But trying to do that over the Christmas break is just not doable for me. I can 
start looking at it properly in january.

   

  Also would it be possible to make use of trac to keep up to date on this 
issue? There are now a number of threads all referring to this problem/change 
in different ways with cross posting that means chronology doesn't make sense 
and I'm finding it impossible in the time I have to make sense of it all.

   

  So it turns out that this was not as brief as I hoped, but I hope you get my 
intention. In particular, I'm hugely grateful Pedro for your efforts on this. 
You've done a huge amount to push towards fixing this. It is easy for the tone 
of an email to be misinterpreted as grumpy, but please don’t think this is the 
case here – in fact the opposite, it's great to see interest in the device, but 
I think we all just need to take a breath, remember that some of us have young 
children and that this time of year means that PLplot is not everyone's top 
priority.

   

  Does that make sense?

   

  Sent from my Windows 10 phone

   

  From: Pedro Vicente
  Sent: 27 December 2016 19:46
  To: Alan W. Irwin
  Cc: Phil Rosenberg; PLplot development list
  Subject: Re: [Plplot-devel] Infinite Yielding issue

   

  @Alan, Phil

   

   

  >However, there is something we could try, which is,

  >keep the current way of wxPLplotwindow beging a template,

  >and at the same time overriding the Create() function (with template).

   

  ok, I implemented this, attached

   

  this

   

  1) will not break current template use

  2) will fix the bug

   

  Limitation:

  template can only be used with wxFrame (or a class that implements 

  Create() with the same

  signature)

   

  test demo and example 01 run OK in CentOS, output is below

   

   

   

  14:42:47: Debug: wxPLplotwindow::wxPLplotwindow

  14:42:47: Debug: wxPLplotwindow::Create()

  14:42:47: Debug: wxPLplotwindow::CreateStream()

  14:42:47: Debug: plD_init_wxwidgets(): enter

  14:42:47: Debug: wxPLDevice(): enter

  14:42:47: Debug: wxPLDevice(): gc done

  14:42:47: Debug: wxPLDevice(): m_interactiveTextGcdc done

  14:42:47: Debug: wxPLDevice(): SetDC done

  14:42:47: Debug: wxPLDevice(): leave

  14:42:47: Debug: plD_init_wxwidgets(): leave

  14:42:47: Debug: frame->Create

  14:42:47: Debug: Plot()

  14:42:48: Debug: wxPLplotwindow::OnCreate

  14:42:48: Debug: wxPLplotwindow::CreateStream()

   

   

   

  On 2016-12-27 12:58, Alan W. Irwin wrote:

  > On 2016-12-27 10:09-0500 Pedro Vicente wrote:

  > 

  >> @Alan

  >> 

  >>> Isn't that loss of functionality by definition a backwards

  >>> incompatibility in the API for the plplotwxwidgets library?

  >> 

  >> yes

  >> 

  >> but for the current (5.11.1) release compared to the new implemented 

  >> examples,

  >> the effect is the same

  >> 

  >> previously the

Re: [Plplot-devel] Infinite Yielding issue

2016-12-27 Thread Alan W. Irwin
Hi Phil:

You have made many good points.  For example, I wholeheartedly second
your comment "In particular, I'm hugely grateful Pedro for your
efforts on this." Also, I completely agree with you it is bad to even
attempt to release anywhere near the Christmas holidays.  My
apologies for getting us into that situation which I propose to
rectify by putting the release on hold until you fix this issue.
See more on that below.

On 2016-12-27 23:21- p.d.rosenb...@gmail.com wrote:

> Note that up to now the bug Pedro reported exists on one remote x
server. It does not appear to affect the Cygwin x server when used
remotely, nor Xming. I would suggest that if we wish to release
approximately on time, then we restore the previous API and release
with a note saying that this remote X server has a compatibility issue
and that users should check the git repo for updates.

This summary of the limited nature of the issue may have been correct at
one point but unfortunately it is not correct now.

For example, the tip of the master branch bombs for me (Debian Jessie
with either remote X display with an X terminal or direct X display)
right now with the infinite Yielding loop generated whenever I build
the test_wxPLplotDemo target.  And I am virtually positive you would
run into the same situation if you made the same test on your Ubuntu
platform because I don't think there is anything particularly special
about Debian Jessie's version of the wxwidgets and gtk+ libraries.

All the latest wx-related commits for master tip are yours, e.g.,

995e75e Made some items clearer in the wxWigdets Demo
65e7b3c Fix bug with plotting in wxPLplotDemo
67ef7be Added a function to check if the window is ready to accept plot 
commands.
bf79603 Revert "wxwidgets binding: workaround fix for delayed OnCreate event"
c111bad Revert "wxwidgets binding: modification of workaround fix for delayed 
OnCreate event"
ca58e7c Use /dev/urandom in preference to /dev/random in wxWidgets driver.

And two of those reverted Pedro's commits so I don't think there is
anything of Pedro's in master tip right now.  So if I really did wish
to make a rushed release in the next few days, you would have to tell
me which of your commits above you think should be reverted.  And I
think we both prefer you take the time to make a solid fix instead
before we release!

> Meanwhile I can still think of two or three ways we can quite likely
sort this without losing functionality or generating backwards
incompatible changes. But trying to do that over the Christmas break
is just not doable for me. I can start looking at it properly in
january.

OK.  Please do that, and I will do what I should have done from the
start which is to delay the release until you have properly solved
this release-critical issue.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-27 Thread p.d.rosenberg
This is really brief, I think we are all getting a little overexcited here very 
close to the release date.

This is a functionality reducing, backwards incompatible API change. I know for 
one that it will not only cause build errors in some of my code, but because I 
use wxPLplotwindow classes in some of my code it will mean I have to 
revert to using wxPLstream and duplicate all the code from wxPLplotwindow to 
restore my functionality. This is why I made the class templated in the first 
place. It also future proofs us for future wxWindow derived classes and 
significantly eases linking problems. So there are very good design reasons for 
the current state.

That said, if we really can't solve the current problems with the existing 
model, then we should change. However we certainly should not do that in a 
rushed manner in the days leading up to release.

Note that up to now the bug Pedro reported exists on one remote x server. It 
does not appear to affect the Cygwin x server when used remotely, nor Xming. I 
would suggest that if we wish to release approximately on time, then we restore 
the previous API and release with a note saying that this remote X server has a 
compatibility issue and that users should check the git repo for updates.

Meanwhile I can still think of two or three ways we can quite likely sort this 
without losing functionality or generating backwards incompatible changes. But 
trying to do that over the Christmas break is just not doable for me. I can 
start looking at it properly in january.

Also would it be possible to make use of trac to keep up to date on this issue? 
There are now a number of threads all referring to this problem/change in 
different ways with cross posting that means chronology doesn't make sense and 
I'm finding it impossible in the time I have to make sense of it all.

So it turns out that this was not as brief as I hoped, but I hope you get my 
intention. In particular, I'm hugely grateful Pedro for your efforts on this. 
You've done a huge amount to push towards fixing this. It is easy for the tone 
of an email to be misinterpreted as grumpy, but please don’t think this is the 
case here – in fact the opposite, it's great to see interest in the device, but 
I think we all just need to take a breath, remember that some of us have young 
children and that this time of year means that PLplot is not everyone's top 
priority.

Does that make sense?

Sent from my Windows 10 phone

From: Pedro Vicente
Sent: 27 December 2016 19:46
To: Alan W. Irwin
Cc: Phil Rosenberg; PLplot development list
Subject: Re: [Plplot-devel] Infinite Yielding issue

@Alan, Phil


>However, there is something we could try, which is,
>keep the current way of wxPLplotwindow beging a template,
>and at the same time overriding the Create() function (with template).

ok, I implemented this, attached

this

1) will not break current template use
2) will fix the bug

Limitation:
template can only be used with wxFrame (or a class that implements 
Create() with the same
signature)

test demo and example 01 run OK in CentOS, output is below



14:42:47: Debug: wxPLplotwindow::wxPLplotwindow
14:42:47: Debug: wxPLplotwindow::Create()
14:42:47: Debug: wxPLplotwindow::CreateStream()
14:42:47: Debug: plD_init_wxwidgets(): enter
14:42:47: Debug: wxPLDevice(): enter
14:42:47: Debug: wxPLDevice(): gc done
14:42:47: Debug: wxPLDevice(): m_interactiveTextGcdc done
14:42:47: Debug: wxPLDevice(): SetDC done
14:42:47: Debug: wxPLDevice(): leave
14:42:47: Debug: plD_init_wxwidgets(): leave
14:42:47: Debug: frame->Create
14:42:47: Debug: Plot()
14:42:48: Debug: wxPLplotwindow::OnCreate
14:42:48: Debug: wxPLplotwindow::CreateStream()



On 2016-12-27 12:58, Alan W. Irwin wrote:
> On 2016-12-27 10:09-0500 Pedro Vicente wrote:
>
>> @Alan
>>
>>> Isn't that loss of functionality by definition a backwards
>>> incompatibility in the API for the plplotwxwidgets library?
>>
>> yes
>>
>> but for the current (5.11.1) release compared to the new implemented 
>> examples,
>> the effect is the same
>>
>> previously the way to start the demo was
>>
>> wxPLplotwindow *frame = new wxPLplotwindow();
>>
>> and now is
>>
>> wxPLplotwindow *frame = new wxPLplotwindow();
>>
>> and because wxPLplotwindow is a child of a wxFrame,
>> the visible effect is exactly the same, a frame window that shows a 
>> plot.
>
> @Pedro:
>
> Thanks for that clarification.  So if users stick with the old way of
> creating frame they will get a build error (which I assume is the
> reason why Laurent is now getting build errors with his own code that
> links to the plplotwxwidgets library).  I do not say that in a
> critical way since if the choices are unreliability on some platforms
> versus changing our API in a backwards-incompatible way, then we must
&g

Re: [Plplot-devel] Infinite Yielding issue

2016-12-27 Thread Pedro Vicente
@Alan

> So if users stick with the old way of
> creating frame they will get a build error

yes

However, there is something we could try, which is,
keep the current way of wxPLplotwindow beging a template,
and at the same time overriding the Create() function (with template).

this could mean that the template would only work for wxFrame, like
now

wxPLplotwindow *frame = new wxPLplotwindow();

but that would not break current applications

I'll try that later today

-Pedro


On 2016-12-27 12:58, Alan W. Irwin wrote:
> On 2016-12-27 10:09-0500 Pedro Vicente wrote:
>
>> @Alan
>>
>>> Isn't that loss of functionality by definition a backwards
>>> incompatibility in the API for the plplotwxwidgets library?
>>
>> yes
>>
>> but for the current (5.11.1) release compared to the new implemented 
>> examples,
>> the effect is the same
>>
>> previously the way to start the demo was
>>
>> wxPLplotwindow *frame = new wxPLplotwindow();
>>
>> and now is
>>
>> wxPLplotwindow *frame = new wxPLplotwindow();
>>
>> and because wxPLplotwindow is a child of a wxFrame,
>> the visible effect is exactly the same, a frame window that shows a 
>> plot.
>
> @Pedro:
>
> Thanks for that clarification.  So if users stick with the old way of
> creating frame they will get a build error (which I assume is the
> reason why Laurent is now getting build errors with his own code that
> links to the plplotwxwidgets library).  I do not say that in a
> critical way since if the choices are unreliability on some platforms
> versus changing our API in a backwards-incompatible way, then we must
> take the latter choice.
>
> @Phil:
>
> Do you agree with Pedro there is no obvious way out of this choice? 
> If
> so, then so be it, but we do have to warn users in the release notes
> of this backwards-incompatible change.
>
> Alan
> __
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and 
> Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state
> implementation for stellar interiors (freeeos.sf.net); the Time
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
> software package (plplot.sf.net); the libLASi project
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
> and the Linux Brochure Project (lbproject.sf.net).
> __
>
> Linux-powered Science
> __

-- 
Pedro Vicente
pedro.vice...@space-research.org
http://www.space-research.org/

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-27 Thread Alan W. Irwin
On 2016-12-27 10:09-0500 Pedro Vicente wrote:

> @Alan
>
>> Isn't that loss of functionality by definition a backwards
>> incompatibility in the API for the plplotwxwidgets library?
>
> yes
>
> but for the current (5.11.1) release compared to the new implemented 
> examples,
> the effect is the same
>
> previously the way to start the demo was
>
> wxPLplotwindow *frame = new wxPLplotwindow();
>
> and now is
>
> wxPLplotwindow *frame = new wxPLplotwindow();
>
> and because wxPLplotwindow is a child of a wxFrame,
> the visible effect is exactly the same, a frame window that shows a plot.

@Pedro:

Thanks for that clarification.  So if users stick with the old way of
creating frame they will get a build error (which I assume is the
reason why Laurent is now getting build errors with his own code that
links to the plplotwxwidgets library).  I do not say that in a
critical way since if the choices are unreliability on some platforms
versus changing our API in a backwards-incompatible way, then we must
take the latter choice.

@Phil:

Do you agree with Pedro there is no obvious way out of this choice? If
so, then so be it, but we do have to warn users in the release notes
of this backwards-incompatible change.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-27 Thread Pedro Vicente
@Alan

> Isn't that loss of functionality by definition a backwards
> incompatibility in the API for the plplotwxwidgets library?

yes

but for the current (5.11.1) release compared to the new implemented 
examples,
the effect is the same

previously the way to start the demo was

wxPLplotwindow *frame = new wxPLplotwindow();

and now is

wxPLplotwindow *frame = new wxPLplotwindow();

and because wxPLplotwindow is a child of a wxFrame,
the visible effect is exactly the same, a frame window that shows a 
plot.

-Pedro



On 2016-12-27 02:12, Alan W. Irwin wrote:
> On 2016-12-26 21:30-0500 Pedro Vicente wrote:
>
>> @Alan, Phil
>>
>>> Now that we have such a widely tested solution, would you be 
>>> willing
>>> to write a short summary paragraph concerning the changes in the
>>> plplotwxwidgets library API?
>>
>> here it goes. The API really has no visible changes, but has a loss 
>> of functionality
>> (use of templates, i.e, ability to do plots other than in wxFrame 
>> windows)
>
> @Phil and Pedro:
>
> Isn't that loss of functionality by definition a backwards
> incompatibility in the API for the plplotwxwidgets library?  If Phil
> and you confirm that interpretation, I will need to warn about
> that in the release notes.
>
> Important questions below for Phil.
>
>>
>> "Fixed a bug that happened in test_wxPLplotDemo for  some Linux 
>> configurations.
>> The effect of the bug was a segmentation fault, due to the fact that 
>> an invalid
>> plot stream pointer was used. The cause of the stream pointer being 
>> invalid
>> is that the frame window did not initialize in a timely manner. This 
>> behaviour is a
>> wxWidgets feature that can or cannot happen in GTK/X11 window 
>> systems.
>> The solution for test_wxPLplotDemo was to initialize the stream in 
>> the function
>> Create(), which is done immediatley, instead of doing it on the 
>> function OnCreate(),
>> that is called later and executed at an indeterminated time. Note: 
>> the possiblility and request of creating
>> the stream in OnCreate() is still present, because this is a feature 
>> of the driver needed elsewhere.
>> A side effect of creating the new function Create() for the class 
>> wxPLplotwindow,
>> is that the class cannot be a template. At this time the class is 
>> descendant from
>> wxFrame, so only wxFrame windows can be created."
>>
>>
>>> To help you figure out what to say, here is how to discover the
>>> changes since plplot-5.11.1 in the library API and our demo that 
>>> links
>>> with that library:
>>> git diff --ignore-all-space plplot-5.11.1 bindings/wxwidgets/*.h
>>
>>
>> I did not got back in time this way, because all the other changes 
>> were made by Phil.
>>
>> Basically what I did was start with the current master of 
>> wxPLplotwindow and
>>
>> 1) override a function Create()
>> 2) do an auxilirary function CreateStream() that contains the code 
>> that was previously in
>> OnCreate(). This function is both called by Create() and OnCreate(). 
>> A boolean
>> flag assures that is only executed 1 time.
>> 3) Moved the event trigering that was previously on the 
>> wxPLplotwindow constructor
>> by ::Connect() calls
>> to a static event table
>>
>> This change 3) was not really needed, it was just to reflect the 
>> current way of handling events
>>
>> http://docs.wxwidgets.org/3.1/overview_events.html
>>
>> either by the static event table or by ::Bind()
>>
>>
>> feel free to change anything in the description.
>
> @ Pedro:
>
> Thanks for the above description of what you did.
>
> @Phil:
>
> I need your answers to the following questions.
>
> 1. Can you spot any release-critical issues with Pedro's present
>two-commit fix (i.e., any trouble you can forsee for our Unix
>and/or Windows users if we release with this)?
>
> 2. Are there any essential short-term changes you want to make to his
>approach for this release?  (Essential here means release-critical
>as used in question 1.)
>
> 3. Are there any long-term (post-release) changes you want to make to
>his approach?
>
> Your answers to these questions are release critical so I would
> appreciate your timely response to them.
>
> Alan
> __
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and 
> Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state
> implementation for stellar interiors (freeeos.sf.net); the Time
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
> software package (plplot.sf.net); the libLASi project
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
> and the Linux Brochure Project (lbproject.sf.net).
> __
>
> Linux-powered Science
> __

-- 
Pedro Vicente
pedro.vice...@space-research.org
http://www.space-research.org/

--
Check out the vibrant tech 

Re: [Plplot-devel] Infinite Yielding issue

2016-12-26 Thread Alan W. Irwin
On 2016-12-26 21:30-0500 Pedro Vicente wrote:

> @Alan, Phil
>
>> Now that we have such a widely tested solution, would you be willing
>> to write a short summary paragraph concerning the changes in the
>> plplotwxwidgets library API?
>
> here it goes. The API really has no visible changes, but has a loss of 
> functionality
> (use of templates, i.e, ability to do plots other than in wxFrame windows)

@Phil and Pedro:

Isn't that loss of functionality by definition a backwards
incompatibility in the API for the plplotwxwidgets library?  If Phil
and you confirm that interpretation, I will need to warn about
that in the release notes.

Important questions below for Phil.

>
> "Fixed a bug that happened in test_wxPLplotDemo for  some Linux 
> configurations.
> The effect of the bug was a segmentation fault, due to the fact that an 
> invalid
> plot stream pointer was used. The cause of the stream pointer being invalid
> is that the frame window did not initialize in a timely manner. This 
> behaviour is a
> wxWidgets feature that can or cannot happen in GTK/X11 window systems.
> The solution for test_wxPLplotDemo was to initialize the stream in the 
> function
> Create(), which is done immediatley, instead of doing it on the function 
> OnCreate(),
> that is called later and executed at an indeterminated time. Note: the 
> possiblility and request of creating
> the stream in OnCreate() is still present, because this is a feature of the 
> driver needed elsewhere.
> A side effect of creating the new function Create() for the class 
> wxPLplotwindow,
> is that the class cannot be a template. At this time the class is descendant 
> from
> wxFrame, so only wxFrame windows can be created."
>
>
>> To help you figure out what to say, here is how to discover the
>> changes since plplot-5.11.1 in the library API and our demo that links
>> with that library:
>> 
>> git diff --ignore-all-space plplot-5.11.1 bindings/wxwidgets/*.h
>
>
> I did not got back in time this way, because all the other changes were made 
> by Phil.
>
> Basically what I did was start with the current master of wxPLplotwindow and
>
> 1) override a function Create()
> 2) do an auxilirary function CreateStream() that contains the code that was 
> previously in
> OnCreate(). This function is both called by Create() and OnCreate(). A 
> boolean
> flag assures that is only executed 1 time.
> 3) Moved the event trigering that was previously on the wxPLplotwindow 
> constructor
> by ::Connect() calls
> to a static event table
>
> This change 3) was not really needed, it was just to reflect the current way 
> of handling events
>
> http://docs.wxwidgets.org/3.1/overview_events.html
>
> either by the static event table or by ::Bind()
>
>
> feel free to change anything in the description.

@ Pedro:

Thanks for the above description of what you did.

@Phil:

I need your answers to the following questions.

1. Can you spot any release-critical issues with Pedro's present
two-commit fix (i.e., any trouble you can forsee for our Unix
and/or Windows users if we release with this)?

2. Are there any essential short-term changes you want to make to his
approach for this release?  (Essential here means release-critical
as used in question 1.)

3. Are there any long-term (post-release) changes you want to make to
his approach?

Your answers to these questions are release critical so I would
appreciate your timely response to them.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-26 Thread Pedro Vicente
@Alan, Phil

> Now that we have such a widely tested solution, would you be willing
> to write a short summary paragraph concerning the changes in the
> plplotwxwidgets library API?

here it goes. The API really has no visible changes, but has a loss of 
functionality
(use of templates, i.e, ability to do plots other than in wxFrame windows)

"Fixed a bug that happened in test_wxPLplotDemo for  some Linux 
configurations.
 The effect of the bug was a segmentation fault, due to the fact that an 
invalid
plot stream pointer was used. The cause of the stream pointer being invalid
is that the frame window did not initialize in a timely manner. This 
behaviour is a
wxWidgets feature that can or cannot happen in GTK/X11 window systems.
The solution for test_wxPLplotDemo was to initialize the stream in the 
function
Create(), which is done immediatley, instead of doing it on the function 
OnCreate(),
that is called later and executed at an indeterminated time. Note: the 
possiblility and request of creating
the stream in OnCreate() is still present, because this is a feature of the 
driver needed elsewhere.
A side effect of creating the new function Create() for the class 
wxPLplotwindow,
is that the class cannot be a template. At this time the class is descendant 
from
wxFrame, so only wxFrame windows can be created."


> To help you figure out what to say, here is how to discover the
> changes since plplot-5.11.1 in the library API and our demo that links
> with that library:
>
> git diff --ignore-all-space plplot-5.11.1 bindings/wxwidgets/*.h


I did not got back in time this way, because all the other changes were made 
by Phil.

Basically what I did was start with the current master of wxPLplotwindow and

1) override a function Create()
2) do an auxilirary function CreateStream() that contains the code that was 
previously in
OnCreate(). This function is both called by Create() and OnCreate(). A 
boolean
flag assures that is only executed 1 time.
3) Moved the event trigering that was previously on the wxPLplotwindow 
constructor
by ::Connect() calls
to a static event table

This change 3) was not really needed, it was just to reflect the current way 
of handling events

http://docs.wxwidgets.org/3.1/overview_events.html

either by the static event table or by ::Bind()


feel free to change anything in the description.
I did not mention the new debug print option of wxWidgets in cmake,
because you implemented that feature, but that should be mentioned also.


-Pedro






- Original Message - 
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
To: "Pedro Vicente" <pedro.vice...@space-research.org>
Cc: "Phil Rosenberg" <p.d.rosenb...@gmail.com>; "PLplot development list" 
<Plplot-devel@lists.sourceforge.net>
Sent: Monday, December 26, 2016 5:09 PM
Subject: Re: [Plplot-devel] Infinite Yielding issue


> On 2016-12-24 20:24-0500 Pedro Vicente wrote:
>
>> Hi Alan
>>
>>> Then collect those two files in a tarball using
>>> tar zcf wxwidgets_experimental_commits2.tar.gz 00*
>>
>> I did the git am as explained, and
>> wxwidgets_experimental_commits2.tar.gz
>> is attached
>>
>> examples/c/x01c -dev wxwidgets
>> and
>> test_wxPLplotDemo
>>
>> run with no problems on all my tests
>>
>
> Hi Pedro:
>
> Thanks very much for that compiler warning fix and big testing effort
> on a Windows platform and 4 Linux platforms for this latest iteration
> of your two-commit fix.
>
> I tested this latest version here in the same way I did the previous
> iteration, and all was well.
>
> Now that we have such a widely tested solution, would you be willing
> to write a short summary paragraph concerning the changes in the
> plplotwxwidgets library API?  I cannot write such a summary myself
> because I don't know the correct C++ terminology to use.
>
> That summary would likely help Phil make up his mind about whether we
> will adopt your latest iteration of the fix or try something else.
> However, please write that paragraph with a somewhat larger audience in 
> mind
> than just Phil.  Because if he decides to go with your fix, then I
> will want to include your summary paragraph in our release notes to
> aid those (like you and Greg Jung) who are developing their own
> applications and libraries that link with the plplotwxwidgets library
> and who will therefore have to change those applications and libraries
> to be compatible with our changes.  So the summary should answer the
> question what is the minimum that an outside developer need to know about 
> the
> the changes to the plplotwxwidgets library API?
>
> To help you figure out what to say, here is how to discover the
> changes since plplot-5.11.1 in the library API an

Re: [Plplot-devel] Infinite Yielding issue

2016-12-26 Thread Alan W. Irwin
On 2016-12-24 20:24-0500 Pedro Vicente wrote:

> Hi Alan
>
>> Then collect those two files in a tarball using
>> tar zcf wxwidgets_experimental_commits2.tar.gz 00*
>
> I did the git am as explained, and
> wxwidgets_experimental_commits2.tar.gz
> is attached
>
> examples/c/x01c -dev wxwidgets
> and
> test_wxPLplotDemo
>
> run with no problems on all my tests
>

Hi Pedro:

Thanks very much for that compiler warning fix and big testing effort
on a Windows platform and 4 Linux platforms for this latest iteration
of your two-commit fix.

I tested this latest version here in the same way I did the previous
iteration, and all was well.

Now that we have such a widely tested solution, would you be willing
to write a short summary paragraph concerning the changes in the
plplotwxwidgets library API?  I cannot write such a summary myself
because I don't know the correct C++ terminology to use.

That summary would likely help Phil make up his mind about whether we
will adopt your latest iteration of the fix or try something else.
However, please write that paragraph with a somewhat larger audience in mind
than just Phil.  Because if he decides to go with your fix, then I
will want to include your summary paragraph in our release notes to
aid those (like you and Greg Jung) who are developing their own
applications and libraries that link with the plplotwxwidgets library
and who will therefore have to change those applications and libraries
to be compatible with our changes.  So the summary should answer the
question what is the minimum that an outside developer need to know about the
the changes to the plplotwxwidgets library API?

To help you figure out what to say, here is how to discover the
changes since plplot-5.11.1 in the library API and our demo that links
with that library:

git diff --ignore-all-space plplot-5.11.1 bindings/wxwidgets/*.h

git diff --ignore-all-space plplot-5.11.1 examples/c++/wxPLplotDemo.cpp

Obviously, the extra include to allow for the possibility of debugging
output in bindings/wxwidgets/wxPLplotstream.h is not an API change,
but it looks like there have been substantial backwards-incompatible
changes in the plplotwxwidgets library API as indicated by
the changes in bindings/wxwidgets/wxPLplotwindow.h.

Those API changes appear also to be confirmed by that second git diff
result above (although some of those changes were an addition of a
locate mode and nothing to do with API changes so your summary doesn't
need to mention that locate mode addition).

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-24 Thread Pedro Vicente

Hi Alan


Then collect those two files in a tarball using
tar zcf wxwidgets_experimental_commits2.tar.gz 00*


I did the git am as explained, and
wxwidgets_experimental_commits2.tar.gz
is attached

examples/c/x01c -dev wxwidgets
and
test_wxPLplotDemo

run with no problems on all my tests


Half an hour ago it was the start of Christmas Eve day for me, and
that happened several hours ago for you and quite a while ago for
Phil.  So Merry Christmas and Happy New Year! to both of you and everybody 
else on this

list.


Merry Christmas and Happy New Year as well to everyone

-Pedro


- Original Message - 
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>

To: "Pedro Vicente" <pedro.vice...@space-research.org>
Cc: "Phil Rosenberg" <p.d.rosenb...@gmail.com>; "PLplot development list" 
<Plplot-devel@lists.sourceforge.net>

Sent: Saturday, December 24, 2016 3:42 AM
Subject: Re: [Plplot-devel] Infinite Yielding issue



On 2016-12-24 01:13-0500 Pedro Vicente wrote:


Hi Alan

some more upbeat news about the example error , it's gone :-)


It's gone here too.  :-)

So thanks very much Pedro for this early Christmas present!

[...]

I also removed this "PLDLLIMPEXP_WX"

class PLDLLIMPEXP_WX wxPLplotwindow : public wxFrame


That change causes a build issue on Linux if you are using

export CXXFLAGS="-O3 -fvisibility=hidden -Wuninitialized"
export CFLAGS="-O3 -fvisibility=hidden -Wuninitialized"
export FFLAGS="-O3 -Wuninitialized -Wunused"

which I highly recommend on Linux to check for symbol visibility
issues on that platform (and to partially check for visibility
issues on Windows as well, but in this case it sounds like it
was not needed, but it should do no harm on that platform.)

So I had to amend your present (second) commit to put it back.


I searched  in all the source code and could not find this symbol ?


The unix find command is good for such tasks:

software@raven> find . -type f |grep -v .git |xargs grep PLDLLIMPEXP_WX
./bindings/wxwidgets/wxPLplot_nanosec.h.in:PLDLLIMPEXP_WX void
./bindings/wxwidgets/wxPLplotwindow.h:class PLDLLIMPEXP_WX wxPLplotwindow 
: public wxFrame
./bindings/wxwidgets/wxPLplotstream.h:class PLDLLIMPEXP_WX wxPLplotstream 
: public plstream
./bindings/wxwidgets/deprecated_wxPLplotwindow.h:class PLDLLIMPEXP_WX 
wxPLplotwindow : public wxWindow
./bindings/wxwidgets/deprecated_wxPLplotstream.h.in:class PLDLLIMPEXP_WX 
wxPLplotstream : public plstream

./include/pldll.h.in:  #define PLDLLIMPEXP_WXPLDLLEXPORT
./include/pldll.h.in:  #define PLDLLIMPEXP_WX_DATA( type )PLDLLEXPORT 
type

./include/pldll.h.in:  #define PLDLLIMPEXP_WXPLDLLIMPORT
./include/pldll.h.in:  #define PLDLLIMPEXP_WX_DATA( type )PLDLLIMPORT 
type


Just in case you are curious about find, the above command says get me
all the names of all the files in the source tree, drop all the .git
ones (i.e., drop the git repository to focus on just files in the working 
directory),

then search all those remaining files for PLDLLIMPEXP_WX.  The result
was 9 hits (9 lines somewhere in our source tree files that refer to
PLDLLIMPEXP_WX).

From these results, you can see that the way I use that macro in
wxPLplotwindow.h has also been used for a long time in
wxPLplotstream.h, deprecated_wxPLplotwindow.h, and
deprecated_wxPLplotstream.h.in.  Also, that macro is defined in
include/pldll.h.in (which as you will discover has some complicated
preprocessing logic).

N.B. Use of such *IMPEXP* macros is an integral part of our symbol 
visibility support.



let me know if something on my patch is not clear


I slightly amended the commit message on your first (modified) commit
to indicate this complete fix would be in two commits, amended the
second (present) commit to put back PLDLLIMPEXP_WX again, greatly
expanded the commit message of that second commit using your own 
description

that you made in your post describing that commit, filled in a Tested
by: place-holding section for you that you should later fill out with
all the platforms you tested these two commits on, and finally added
my own Tested by: section.

Would you also look at one compiler warning I got because of the above
-Wuninitialized option?  Here was that complete warning:

/home/software/plplot/HEAD/plplot.git/bindings/wxwidgets/wxPLplotwindow.cpp: 
In member function ‘void wxPLplotwindow::setUseGraphicsContext(bool)’:
/home/software/plplot/HEAD/plplot.git/bindings/wxwidgets/wxPLplotwindow.cpp:326:33: 
warning: ‘drawDc’ may be used uninitialized in this function 
[-Wmaybe-uninitialized]

 m_stream.SetDC( drawDc );

A lot of the time such warnings are spurious so you have to quiet them
by initializing something that shouldn't really need it.  But
sometimes they really do point to a serious problem with something
that is uninitialized because of bad code logic.

Anyhow, please _amend_ (i.e., do not make a 3rd commit) your sec

Re: [Plplot-devel] Infinite Yielding issue

2016-12-24 Thread Alan W. Irwin
On 2016-12-24 12:36-0500 Pedro Vicente wrote:

> Hi Alan
>
> Glad it's working !
> I'll go through your email later, but a fix for the warning is just changing 
> at line 313 of wxPLplotwindow.cpp
> wxDC *drawDc;
> to
> wxDC *drawDc = NULL;
> the warning is just because of the preprocessor macro

Glad it is nothing serious.  Please go ahead and make the above change
to quiet the warning when you amend your second commit.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-24 Thread Pedro Vicente
Hi Alan

Glad it's working !
I'll go through your email later, but a fix for the warning is just changing 
at line 313 of wxPLplotwindow.cpp
wxDC *drawDc;
to
wxDC *drawDc = NULL;
the warning is just because of the preprocessor macro
-Pedro
- Original Message - 
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
To: "Pedro Vicente" <pedro.vice...@space-research.org>
Cc: "Phil Rosenberg" <p.d.rosenb...@gmail.com>; "PLplot development list" 
<Plplot-devel@lists.sourceforge.net>
Sent: Saturday, December 24, 2016 3:42 AM
Subject: Re: [Plplot-devel] Infinite Yielding issue


> On 2016-12-24 01:13-0500 Pedro Vicente wrote:
>
>> Hi Alan
>>
>> some more upbeat news about the example error , it's gone :-)
>
> It's gone here too.  :-)
>
> So thanks very much Pedro for this early Christmas present!
>
> [...]
>> I also removed this "PLDLLIMPEXP_WX"
>>
>> class PLDLLIMPEXP_WX wxPLplotwindow : public wxFrame
>
> That change causes a build issue on Linux if you are using
>
> export CXXFLAGS="-O3 -fvisibility=hidden -Wuninitialized"
> export CFLAGS="-O3 -fvisibility=hidden -Wuninitialized"
> export FFLAGS="-O3 -Wuninitialized -Wunused"
>
> which I highly recommend on Linux to check for symbol visibility
> issues on that platform (and to partially check for visibility
> issues on Windows as well, but in this case it sounds like it
> was not needed, but it should do no harm on that platform.)
>
> So I had to amend your present (second) commit to put it back.
>
>> I searched  in all the source code and could not find this symbol ?
>
> The unix find command is good for such tasks:
>
> software@raven> find . -type f |grep -v .git |xargs grep PLDLLIMPEXP_WX
> ./bindings/wxwidgets/wxPLplot_nanosec.h.in:PLDLLIMPEXP_WX void
> ./bindings/wxwidgets/wxPLplotwindow.h:class PLDLLIMPEXP_WX wxPLplotwindow 
> : public wxFrame
> ./bindings/wxwidgets/wxPLplotstream.h:class PLDLLIMPEXP_WX wxPLplotstream 
> : public plstream
> ./bindings/wxwidgets/deprecated_wxPLplotwindow.h:class PLDLLIMPEXP_WX 
> wxPLplotwindow : public wxWindow
> ./bindings/wxwidgets/deprecated_wxPLplotstream.h.in:class PLDLLIMPEXP_WX 
> wxPLplotstream : public plstream
> ./include/pldll.h.in:  #define PLDLLIMPEXP_WXPLDLLEXPORT
> ./include/pldll.h.in:  #define PLDLLIMPEXP_WX_DATA( type )PLDLLEXPORT 
> type
> ./include/pldll.h.in:  #define PLDLLIMPEXP_WXPLDLLIMPORT
> ./include/pldll.h.in:  #define PLDLLIMPEXP_WX_DATA( type )PLDLLIMPORT 
> type
>
> Just in case you are curious about find, the above command says get me
> all the names of all the files in the source tree, drop all the .git
> ones (i.e., drop the git repository to focus on just files in the working 
> directory),
> then search all those remaining files for PLDLLIMPEXP_WX.  The result
> was 9 hits (9 lines somewhere in our source tree files that refer to
> PLDLLIMPEXP_WX).
>
> From these results, you can see that the way I use that macro in
> wxPLplotwindow.h has also been used for a long time in
> wxPLplotstream.h, deprecated_wxPLplotwindow.h, and
> deprecated_wxPLplotstream.h.in.  Also, that macro is defined in
> include/pldll.h.in (which as you will discover has some complicated
> preprocessing logic).
>
> N.B. Use of such *IMPEXP* macros is an integral part of our symbol 
> visibility support.
>
>> let me know if something on my patch is not clear
>
> I slightly amended the commit message on your first (modified) commit
> to indicate this complete fix would be in two commits, amended the
> second (present) commit to put back PLDLLIMPEXP_WX again, greatly
> expanded the commit message of that second commit using your own 
> description
> that you made in your post describing that commit, filled in a Tested
> by: place-holding section for you that you should later fill out with
> all the platforms you tested these two commits on, and finally added
> my own Tested by: section.
>
> Would you also look at one compiler warning I got because of the above
> -Wuninitialized option?  Here was that complete warning:
>
> /home/software/plplot/HEAD/plplot.git/bindings/wxwidgets/wxPLplotwindow.cpp: 
> In member function ‘void wxPLplotwindow::setUseGraphicsContext(bool)’:
> /home/software/plplot/HEAD/plplot.git/bindings/wxwidgets/wxPLplotwindow.cpp:326:33:
>  
> warning: ‘drawDc’ may be used uninitialized in this function 
> [-Wmaybe-uninitialized]
>  m_stream.SetDC( drawDc );
>
> A lot of the time such warnings are spurious so you have to quiet them
> by initializing something that shouldn't really need it.  But
> sometimes they really do point to a serious problem with something
> tha

Re: [Plplot-devel] Infinite Yielding issue

2016-12-24 Thread Alan W. Irwin

On 2016-12-24 01:13-0500 Pedro Vicente wrote:


Hi Alan

some more upbeat news about the example error , it's gone :-)


It's gone here too.  :-)

So thanks very much Pedro for this early Christmas present!

[...]

I also removed this "PLDLLIMPEXP_WX"

class PLDLLIMPEXP_WX wxPLplotwindow : public wxFrame


That change causes a build issue on Linux if you are using

export CXXFLAGS="-O3 -fvisibility=hidden -Wuninitialized"
export CFLAGS="-O3 -fvisibility=hidden -Wuninitialized"
export FFLAGS="-O3 -Wuninitialized -Wunused"

which I highly recommend on Linux to check for symbol visibility
issues on that platform (and to partially check for visibility
issues on Windows as well, but in this case it sounds like it
was not needed, but it should do no harm on that platform.)

So I had to amend your present (second) commit to put it back.


I searched  in all the source code and could not find this symbol ?


The unix find command is good for such tasks:

software@raven> find . -type f |grep -v .git |xargs grep PLDLLIMPEXP_WX
./bindings/wxwidgets/wxPLplot_nanosec.h.in:PLDLLIMPEXP_WX void
./bindings/wxwidgets/wxPLplotwindow.h:class PLDLLIMPEXP_WX wxPLplotwindow : 
public wxFrame
./bindings/wxwidgets/wxPLplotstream.h:class PLDLLIMPEXP_WX wxPLplotstream : 
public plstream
./bindings/wxwidgets/deprecated_wxPLplotwindow.h:class PLDLLIMPEXP_WX 
wxPLplotwindow : public wxWindow
./bindings/wxwidgets/deprecated_wxPLplotstream.h.in:class PLDLLIMPEXP_WX 
wxPLplotstream : public plstream
./include/pldll.h.in:  #define PLDLLIMPEXP_WXPLDLLEXPORT
./include/pldll.h.in:  #define PLDLLIMPEXP_WX_DATA( type )PLDLLEXPORT type
./include/pldll.h.in:  #define PLDLLIMPEXP_WXPLDLLIMPORT
./include/pldll.h.in:  #define PLDLLIMPEXP_WX_DATA( type )PLDLLIMPORT type

Just in case you are curious about find, the above command says get me
all the names of all the files in the source tree, drop all the .git
ones (i.e., drop the git repository to focus on just files in the working 
directory),
then search all those remaining files for PLDLLIMPEXP_WX.  The result
was 9 hits (9 lines somewhere in our source tree files that refer to
PLDLLIMPEXP_WX).


From these results, you can see that the way I use that macro in

wxPLplotwindow.h has also been used for a long time in
wxPLplotstream.h, deprecated_wxPLplotwindow.h, and
deprecated_wxPLplotstream.h.in.  Also, that macro is defined in
include/pldll.h.in (which as you will discover has some complicated
preprocessing logic).

N.B. Use of such *IMPEXP* macros is an integral part of our symbol visibility 
support.


let me know if something on my patch is not clear


I slightly amended the commit message on your first (modified) commit
to indicate this complete fix would be in two commits, amended the
second (present) commit to put back PLDLLIMPEXP_WX again, greatly
expanded the commit message of that second commit using your own description
that you made in your post describing that commit, filled in a Tested
by: place-holding section for you that you should later fill out with
all the platforms you tested these two commits on, and finally added
my own Tested by: section.

Would you also look at one compiler warning I got because of the above
-Wuninitialized option?  Here was that complete warning:

/home/software/plplot/HEAD/plplot.git/bindings/wxwidgets/wxPLplotwindow.cpp: In 
member function ‘void wxPLplotwindow::setUseGraphicsContext(bool)’:
/home/software/plplot/HEAD/plplot.git/bindings/wxwidgets/wxPLplotwindow.cpp:326:33:
 warning: ‘drawDc’ may be used uninitialized in this function 
[-Wmaybe-uninitialized]
 m_stream.SetDC( drawDc );

A lot of the time such warnings are spurious so you have to quiet them
by initializing something that shouldn't really need it.  But
sometimes they really do point to a serious problem with something
that is uninitialized because of bad code logic.

Anyhow, please _amend_ (i.e., do not make a 3rd commit) your second
commit to either quiet this warning if it is spurious or deal with the
bad code logic if that turns out to be the issue, test these two
commits thoroughly on all your platforms including Windows, and fill
in the commit message Tested by: section of the second commit with
that platform list.

Quick directions again for amending the last commit on a topic branch.

If a file is changed (i.e., you fixed the above warning).  Then stage
that changed file with "git add" and get that change into your last
commit by using "git commit --amend".  If there are no file changes,
then simply use "git commit --amend" to modify the commit message of
the last commit.  Note amending a commit is very useful if you
have second thoughts about some aspect of it, want to update the
commit message or whatever.  But the --amend option only works
on the _last_ commit so make it a very strong habit to review your
last commit completely to make sure it is good before you make another
commit because that second commit makes it impossible to amend
the first.  (I 

Re: [Plplot-devel] Infinite Yielding issue

2016-12-23 Thread Pedro Vicente
PS:


this is the ouput of the example


pvn@server:~/plplot-plplot/build$ examples/c/x01c -dev wxwidgets
PLplot library version: 5.11.1
00:36:21: Debug: plD_init_wxwidgets(): enter
00:36:21: Debug: wxPLDevice(): enter
00:36:21: Debug: wxPLDevice(): gc done
00:36:21: Debug: wxPLDevice(): m_interactiveTextGcdc done
00:36:21: Debug: SetupMemoryMap(): enter
00:36:21: Debug: SetupMemoryMap(): mapName start
00:36:21: Debug: SetupMemoryMap(): mapName done
00:36:21: Debug: SetupMemoryMap(): m_outputMemoryMap.create call
00:36:21: Debug: SetupMemoryMap(): m_outputMemoryMap.create done
00:36:21: Debug: wxPLplotwindow::wxPLplotwindow
00:36:21: Debug: SetupMemoryMap(): leave
00:36:21: Debug: wxPLDevice(): leave
00:36:21: Debug: plD_init_wxwidgets(): leave
00:36:21: Debug: wxPLplotwindow::OnCreate
00:36:21: Debug: plD_init_wxwidgets(): enter
00:36:21: Debug: wxPLDevice(): enter
00:36:21: Debug: wxPLDevice(): gc done
00:36:21: Debug: wxPLDevice(): m_interactiveTextGcdc done
00:36:21: Debug: wxPLDevice(): SetDC done
00:36:21: Debug: wxPLDevice(): leave
00:36:21: Debug: plD_init_wxwidgets(): leave
00:36:21: Debug: wxPLplotwindow::OnCreate

- Original Message - 
From: "Pedro Vicente" <pedro.vice...@space-research.org>
To: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
Cc: "PLplot development list" <Plplot-devel@lists.sourceforge.net>
Sent: Saturday, December 24, 2016 1:13 AM
Subject: Re: [Plplot-devel] Infinite Yielding issue


> Hi Alan
>
> some more upbeat news about the example error , it's gone :-)
>
> It's the first time I do this commit patch procedure , so I just did
>
> git format-patch -1
>
> with my new changes (after doing a new branch, from the master, then
> patching your changes, wrote my changes,
> commited, merged into master, did a new patch, phew :-) )
>
> I did not wrote much in the patch , but here it is, basically I 
> reintroduced
> the wxPLplotwindow::OnCreate() event (keeping the wxPLplotwindow::Create()
> also)
>
> I think what was happening is that the PLViewer needs the
> wxPLplotwindow::OnCreate()  to create the stream , since
> wxPLplotwindow::Create() is not called for PLViewer.
>
>
> I also removed this "PLDLLIMPEXP_WX"
>
> class PLDLLIMPEXP_WX wxPLplotwindow : public wxFrame
>
> I searched  in all the source code and could not find this symbol ?
>
>
>> That produces for gcc a symbol visibility that is similar to
>> visibility on Windows platforms. That is, I don't think your changes
>> would have built on Windows.
>
> It builds on Windows.
> also, I think
>
> class "something" wxPLplotwindow : public wxFrame
>
> I believe is not a valid C++ construct
>
> let me know if something on my patch is not clear
>
>
> -Pedro
>
>
> - Original Message - 
> From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
> To: "Pedro Vicente" <pedro.vice...@space-research.org>
> Cc: "Phil Rosenberg" <p.d.rosenb...@gmail.com>; "PLplot development list"
> <Plplot-devel@lists.sourceforge.net>
> Sent: Friday, December 23, 2016 2:50 PM
> Subject: Re: [Plplot-devel] Infinite Yielding issue
>
>
>> On 2016-12-23 01:40-0500 Pedro Vicente wrote:
>>
>>> Alan, Phil
>>>
>>> I went ahead and did a patch commit for option 3), attached,
>>> that has this:
>>>
>>> (note: I wrote the code in Windows, then ftp to Linux, I got some
>>> warnings
>>> about line endings, just do
>>> dos2unix if any thing shows up)
>>
>> Hi Pedro:
>>
>> Your change is extremly promising because for the first time I get the
>> same debug output here as you do on Ubunutu.  In other words we have
>> a deterministic order for the first time!
>>
>> However, your commit needs some code revision.  I did some of that
>> here, but there is more for you to do there to avoid the new bitmap
>> errors I detected when running the wxwidgets device driver which
>> launches wxPLViewer and communicates with it to get the plot displayed.
>> I suspect the revision you have done for the wxPLViewer code is
>> somehow interfering with that use of the wxPLViewer application.
>>
>> Now for the details.
>>
>> Your formatted patch (which by the way has no Windows line endings in
>> it) applied relatively cleanly here aside from minor whitespace issues,
>> but
>> did not build.
>>
>> That build issue was caused by incorrect symbol visibility for your
>> changes.  I found that issue on
>> Linux by using the -fvisibility=hidden option, e.g.,
>>
>> software@raven> printenv |grep FL
>> CXXFLAGS=-O3 -fvisibility=hidden -W

Re: [Plplot-devel] Infinite Yielding issue

2016-12-23 Thread Pedro Vicente

Hi Alan

some more upbeat news about the example error , it's gone :-)

It's the first time I do this commit patch procedure , so I just did

git format-patch -1

with my new changes (after doing a new branch, from the master, then 
patching your changes, wrote my changes,

commited, merged into master, did a new patch, phew :-) )

I did not wrote much in the patch , but here it is, basically I reintroduced 
the wxPLplotwindow::OnCreate() event (keeping the wxPLplotwindow::Create() 
also)


I think what was happening is that the PLViewer needs the 
wxPLplotwindow::OnCreate()  to create the stream , since

wxPLplotwindow::Create() is not called for PLViewer.


I also removed this "PLDLLIMPEXP_WX"

class PLDLLIMPEXP_WX wxPLplotwindow : public wxFrame

I searched  in all the source code and could not find this symbol ?



That produces for gcc a symbol visibility that is similar to
visibility on Windows platforms. That is, I don't think your changes
would have built on Windows.


It builds on Windows.
also, I think

class "something" wxPLplotwindow : public wxFrame

I believe is not a valid C++ construct

let me know if something on my patch is not clear


-Pedro


- Original Message - 
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>

To: "Pedro Vicente" <pedro.vice...@space-research.org>
Cc: "Phil Rosenberg" <p.d.rosenb...@gmail.com>; "PLplot development list" 
<Plplot-devel@lists.sourceforge.net>

Sent: Friday, December 23, 2016 2:50 PM
Subject: Re: [Plplot-devel] Infinite Yielding issue



On 2016-12-23 01:40-0500 Pedro Vicente wrote:


Alan, Phil

I went ahead and did a patch commit for option 3), attached,
that has this:

(note: I wrote the code in Windows, then ftp to Linux, I got some 
warnings

about line endings, just do
dos2unix if any thing shows up)


Hi Pedro:

Your change is extremly promising because for the first time I get the
same debug output here as you do on Ubunutu.  In other words we have
a deterministic order for the first time!

However, your commit needs some code revision.  I did some of that
here, but there is more for you to do there to avoid the new bitmap
errors I detected when running the wxwidgets device driver which
launches wxPLViewer and communicates with it to get the plot displayed.
I suspect the revision you have done for the wxPLViewer code is
somehow interfering with that use of the wxPLViewer application.

Now for the details.

Your formatted patch (which by the way has no Windows line endings in
it) applied relatively cleanly here aside from minor whitespace issues, 
but

did not build.

That build issue was caused by incorrect symbol visibility for your 
changes.  I found that issue on

Linux by using the -fvisibility=hidden option, e.g.,

software@raven> printenv |grep FL
CXXFLAGS=-O3 -fvisibility=hidden -Wuninitialized
CFLAGS=-O3 -fvisibility=hidden -Wuninitialized
FFLAGS=-O3 -Wuninitialized -Wunused

That produces for gcc a symbol visibility that is similar to
visibility on Windows platforms. That is, I don't think your changes
would have built on Windows.

The visibility fix was to replace

class wxPLplotwindow : public wxFrame

by

class PLDLLIMPEXP_WX wxPLplotwindow : public wxFrame

in bindings/wxwidgets/wxPLplotwindow.h.

I attach the revised version of your patch with this change and
several line-ending and style changes applied.  However, to quote from
that revised commit message (in the new Tested by: section for me)

I got "the same as the Ubuntu results above which is the first time the
two platforms have the same debugging output meaning we appear to have
a deterministic solution!"

"HOWEVER. There are run-time problems (invalid bitmap) with these
changes for wxPLViewer if you use that in conjunction with -dev
wxwidgets so this should not be the final version of this commit."

software@raven> examples/c/x01c -dev wxwidgets
PLplot library version: 5.11.1
10:54:55: Debug: nanosecs since epoch = 2210969809300109: 
plD_init_wxwidgets(): enter
10:54:55: Debug: nanosecs since epoch = 2210969845142231: wxPLDevice(): 
enter
10:54:55: Debug: nanosecs since epoch = 2210969845351899: wxPLDevice(): gc 
done
10:54:55: Debug: nanosecs since epoch = 2210969867143754: wxPLDevice(): 
m_interactiveTextGcdc done
10:54:55: Debug: nanosecs since epoch = 2210969867214649: 
SetupMemoryMap(): enter
10:54:55: Debug: nanosecs since epoch = 2210969868074842: 
SetupMemoryMap(): mapName start
10:54:55: Debug: nanosecs since epoch = 2210969868110859: 
SetupMemoryMap(): mapName done
10:54:55: Debug: nanosecs since epoch = 2210969868140426: 
SetupMemoryMap(): m_outputMemoryMap.create call
10:54:55: Debug: nanosecs since epoch = 2210969868201560: 
SetupMemoryMap(): m_outputMemoryMap.create done
10:54:55: Debug: nanosecs since epoch = 2210970015888076: 
wxPLplotwindow::wxPLplotwindow
10:54:55: Debug: nanosecs since epoch = 2210970031998161: 
SetupMemoryMap(): leave

Re: [Plplot-devel] Infinite Yielding issue

2016-12-23 Thread Alan W. Irwin
On 2016-12-23 16:43-0500 Pedro Vicente wrote:

> by the way, what are the commands to do comprehensing testing?

That script should be able to run on all Unix systems and Unix-like
systems (i.e., Cygwin and MinGW-w64/MSYS2), but not currently for MSVC
("raw Windows").  However, Arjen plans to investigate a possibility for
running that script on MSVC platforms as well in 2017.

So for now, on Unix or Unix-like systems, I suggest you run

scripts/comprehensive_test.sh --cmake_added_options "-DDEFAULT_NO_DEVICES=ON 
-DPLD_wxwidgets=ON -DDEFAULT_NO_BINDINGS=ON -DENABLE_wxwidgets=ON 
-DENABLE_cxx=ON -DPLPLOT_WX_DEBUG_OUTPUT=ON -DPLPLOT_WX_NANOSEC=ON" 
--do_test_noninteractive no --do_ctest no

I used exactly those options recently myself.

Those options are constraints on the script to keep it from doing
time-consuming (several hours?) tests that you probably don't
need/want to run right now.

So my suggested options constrain the script to just test the
plplotwxwidgets library and the wxwidgets device driver for our 3
major configurations and 3 different build trees. (So you will see the
tests repeat 9 times for those combinations.) There are no
noninteractive tests of the wxwidgets device driver or plplotwxwidgets
library.  But to avoid the non-interactive C++ tests, we further
constrain the script above to avoid all the non-interactive testing.

As a result of these constraints the script just builds the
test_interactive target for our 9 combinations.  For each of those
combinations, that target in turn depends on test_wxPLplotDemo (to
test the plplotwxwidgets library) and test_c_wxwidgets (to test the
wxwidgets device driver).  You can also reduce the combinations if you
like using additional constraint options for the script.

Run

scripts/comprehensive_test.sh --help

to see about those further possibilities if the 9 combinations turn
out to be too much.  :-)

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-23 Thread Pedro Vicente
by the way, what are the commands to do comprehensing testing?

-Pedro

- Original Message - 
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
To: "Pedro Vicente" <pedro.vice...@space-research.org>; "Phil Rosenberg" 
<p.d.rosenb...@gmail.com>; "PLplot development list" 
<plplot-devel@lists.sourceforge.net>
Sent: Friday, December 23, 2016 4:30 PM
Subject: Re: [Plplot-devel] Infinite Yielding issue


> On 2016-12-23 15:18-0500 Pedro Vicente wrote:
>
>> Hi Alan
>>
>> I applied the patch on CentOS;
>> no errors on build
>> wxPLplotwindow demo does the plot
>> same error on the same example
>
> Thanks, Pedro, for verifying my revision of your commit applies
> cleanly there and for verifying the run-time error I discovered with
> your commit.  And good luck fixing whatever the trouble is that is
> causing that error.
>
> With regard to your suggestion for finding other ways to have
> collaborative git development, this is a really critical time for us
> trying to find a rock-solid fix for this release-critical issue so I
> would prefer we discuss your suggestion post-release when we are all
> more relaxed and have time to consider your suggestion carefully.
>
> Alan
> __
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and 
> Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state
> implementation for stellar interiors (freeeos.sf.net); the Time
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
> software package (plplot.sf.net); the libLASi project
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
> and the Linux Brochure Project (lbproject.sf.net).
> __
>
> Linux-powered Science
> __
> 


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-23 Thread Pedro Vicente
Hi Alan

>With regard to your suggestion for finding other ways to have
>collaborative git development, this is a really critical time for us
>trying to find a rock-solid fix for this release-critical issue so I
>would prefer we discuss your suggestion post-release when we are all
>more relaxed and have time to consider your suggestion carefully.

on better thinking doing a "dev" branch where things have errors might not 
be a good idea,
the less entropy the better.

so, this patch exchange is better i.m.o

I''ll check the errors later

-Pedro


- Original Message - 
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
To: "Pedro Vicente" <pedro.vice...@space-research.org>; "Phil Rosenberg" 
<p.d.rosenb...@gmail.com>; "PLplot development list" 
<plplot-devel@lists.sourceforge.net>
Sent: Friday, December 23, 2016 4:30 PM
Subject: Re: [Plplot-devel] Infinite Yielding issue


> On 2016-12-23 15:18-0500 Pedro Vicente wrote:
>
>> Hi Alan
>>
>> I applied the patch on CentOS;
>> no errors on build
>> wxPLplotwindow demo does the plot
>> same error on the same example
>
> Thanks, Pedro, for verifying my revision of your commit applies
> cleanly there and for verifying the run-time error I discovered with
> your commit.  And good luck fixing whatever the trouble is that is
> causing that error.
>
> With regard to your suggestion for finding other ways to have
> collaborative git development, this is a really critical time for us
> trying to find a rock-solid fix for this release-critical issue so I
> would prefer we discuss your suggestion post-release when we are all
> more relaxed and have time to consider your suggestion carefully.
>
> Alan
> __
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and 
> Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state
> implementation for stellar interiors (freeeos.sf.net); the Time
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
> software package (plplot.sf.net); the libLASi project
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
> and the Linux Brochure Project (lbproject.sf.net).
> __
>
> Linux-powered Science
> __
> 


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-23 Thread Alan W. Irwin
On 2016-12-23 15:18-0500 Pedro Vicente wrote:

> Hi Alan
>
> I applied the patch on CentOS;
> no errors on build
> wxPLplotwindow demo does the plot
> same error on the same example

Thanks, Pedro, for verifying my revision of your commit applies
cleanly there and for verifying the run-time error I discovered with
your commit.  And good luck fixing whatever the trouble is that is
causing that error.

With regard to your suggestion for finding other ways to have
collaborative git development, this is a really critical time for us
trying to find a rock-solid fix for this release-critical issue so I
would prefer we discuss your suggestion post-release when we are all
more relaxed and have time to consider your suggestion carefully.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-23 Thread Pedro Vicente
Hi Alan

I applied the patch on CentOS;
no errors on build
wxPLplotwindow demo does the plot
same error on the same example

I have a small suggestion:
instead of emailling patches and applyting them to multiple machines (I 
have 4)
what about doing a remote branch called "development"  and just commmit 
and push directly there,
even if you get errors like this?
that would make sharing more immediate

I'll take a llok at those errors later

results:

I got this warning

[pedro.vicente@rhw9121 plplot-plplot]$ git am < 
0001-wxwidgets-binding-fix-for-delayed-OnCreate-event.patch
Applying: wxwidgets binding: fix for delayed OnCreate event
.git/rebase-apply/patch:355: new blank line at EOF.
+
warning: 1 line adds whitespace errors.

then

make VERBOSE=1 test_wxPLplotDemo

15:06:20: Debug: wxPLplotwindow::wxPLplotwindow
15:06:20: Debug: wxPLplotwindow::Create()
15:06:20: Debug: wxPLplotwindow::CreateFrame()
15:06:20: Debug: plD_init_wxwidgets(): enter
15:06:20: Debug: wxPLDevice(): enter
15:06:20: Debug: wxPLDevice(): gc done
15:06:20: Debug: wxPLDevice(): m_interactiveTextGcdc done
15:06:20: Debug: wxPLDevice(): SetDC done
15:06:20: Debug: wxPLDevice(): leave
15:06:20: Debug: plD_init_wxwidgets(): leave
15:06:20: Debug: frame->Create
15:06:20: Debug: Plot()

then

[pedro.vicente@rhw9121 build]$ examples/c/x01c -dev wxwidgets
PLplot library version: 5.11.1
15:11:37: Debug: plD_init_wxwidgets(): enter
15:11:37: Debug: wxPLDevice(): enter
15:11:37: Debug: wxPLDevice(): gc done
15:11:37: Debug: wxPLDevice(): m_interactiveTextGcdc done
15:11:37: Debug: SetupMemoryMap(): enter
15:11:37: Debug: SetupMemoryMap(): mapName start
15:11:37: Debug: SetupMemoryMap(): mapName done
15:11:37: Debug: SetupMemoryMap(): m_outputMemoryMap.create call
15:11:37: Debug: SetupMemoryMap(): m_outputMemoryMap.create done
15:11:38: Debug: wxPLplotwindow::wxPLplotwindow
15:11:38: Debug: SetupMemoryMap(): leave
15:11:38: Debug: wxPLDevice(): leave
15:11:38: Debug: plD_init_wxwidgets(): leave
../src/gtk/bitmap.cpp(941): assert ""IsOk()"" failed in GetWidth(): 
invalid bitmap






On 2016-12-23 14:50, Alan W. Irwin wrote:
> On 2016-12-23 01:40-0500 Pedro Vicente wrote:
>
>> Alan, Phil
>>
>> I went ahead and did a patch commit for option 3), attached,
>> that has this:
>>
>> (note: I wrote the code in Windows, then ftp to Linux, I got some 
>> warnings about line endings, just do
>> dos2unix if any thing shows up)
>
> Hi Pedro:
>
> Your change is extremly promising because for the first time I get 
> the
> same debug output here as you do on Ubunutu.  In other words we have
> a deterministic order for the first time!
>
> However, your commit needs some code revision.  I did some of that
> here, but there is more for you to do there to avoid the new bitmap
> errors I detected when running the wxwidgets device driver which
> launches wxPLViewer and communicates with it to get the plot 
> displayed.
> I suspect the revision you have done for the wxPLViewer code is
> somehow interfering with that use of the wxPLViewer application.
>
> Now for the details.
>
> Your formatted patch (which by the way has no Windows line endings in
> it) applied relatively cleanly here aside from minor whitespace 
> issues, but
> did not build.
>
> That build issue was caused by incorrect symbol visibility for your
> changes.  I found that issue on
> Linux by using the -fvisibility=hidden option, e.g.,
>
> software@raven> printenv |grep FL
> CXXFLAGS=-O3 -fvisibility=hidden -Wuninitialized
> CFLAGS=-O3 -fvisibility=hidden -Wuninitialized
> FFLAGS=-O3 -Wuninitialized -Wunused
>
> That produces for gcc a symbol visibility that is similar to
> visibility on Windows platforms. That is, I don't think your changes
> would have built on Windows.
>
> The visibility fix was to replace
>
> class wxPLplotwindow : public wxFrame
>
> by
>
> class PLDLLIMPEXP_WX wxPLplotwindow : public wxFrame
>
> in bindings/wxwidgets/wxPLplotwindow.h.
>
> I attach the revised version of your patch with this change and
> several line-ending and style changes applied.  However, to quote 
> from
> that revised commit message (in the new Tested by: section for me)
>
> I got "the same as the Ubuntu results above which is the first time 
> the
> two platforms have the same debugging output meaning we appear to 
> have
> a deterministic solution!"
>
> "HOWEVER. There are run-time problems (invalid bitmap) with these
> changes for wxPLViewer if you use that in conjunction with -dev
> wxwidgets so this should not be the final version of this commit."
>
> software@raven> examples/c/x01c -dev wxwidgets
> PLplot library version: 5.11.1
> 10:54:55: Debug: nanosecs since epoch = 2210969809300109:
> plD_init_wxwidgets(): enter
> 10:54:55: Debug: nanosecs since epoch = 2210969845142231: 
> wxPLDevice(): enter
> 10:54:55: Debug: nanosecs since epoch = 2210969845351899:
> wxPLDevice(): gc done
> 10:54:55: Debug: nanosecs since epoch = 2210969867143754:
> wxPLDevice(): m_interactiveTextGcdc done
> 10:54:55: 

Re: [Plplot-devel] Infinite Yielding issue

2016-12-23 Thread Alan W. Irwin

On 2016-12-23 01:40-0500 Pedro Vicente wrote:


Alan, Phil

I went ahead and did a patch commit for option 3), attached,
that has this:

(note: I wrote the code in Windows, then ftp to Linux, I got some warnings 
about line endings, just do

dos2unix if any thing shows up)


Hi Pedro:

Your change is extremly promising because for the first time I get the
same debug output here as you do on Ubunutu.  In other words we have
a deterministic order for the first time!

However, your commit needs some code revision.  I did some of that
here, but there is more for you to do there to avoid the new bitmap
errors I detected when running the wxwidgets device driver which
launches wxPLViewer and communicates with it to get the plot displayed.
I suspect the revision you have done for the wxPLViewer code is
somehow interfering with that use of the wxPLViewer application.

Now for the details.

Your formatted patch (which by the way has no Windows line endings in
it) applied relatively cleanly here aside from minor whitespace issues, but
did not build.

That build issue was caused by incorrect symbol visibility for your changes.  I 
found that issue on
Linux by using the -fvisibility=hidden option, e.g.,

software@raven> printenv |grep FL
CXXFLAGS=-O3 -fvisibility=hidden -Wuninitialized
CFLAGS=-O3 -fvisibility=hidden -Wuninitialized
FFLAGS=-O3 -Wuninitialized -Wunused

That produces for gcc a symbol visibility that is similar to
visibility on Windows platforms. That is, I don't think your changes
would have built on Windows.

The visibility fix was to replace

class wxPLplotwindow : public wxFrame

by

class PLDLLIMPEXP_WX wxPLplotwindow : public wxFrame

in bindings/wxwidgets/wxPLplotwindow.h.

I attach the revised version of your patch with this change and
several line-ending and style changes applied.  However, to quote from
that revised commit message (in the new Tested by: section for me)

I got "the same as the Ubuntu results above which is the first time the
two platforms have the same debugging output meaning we appear to have
a deterministic solution!"

"HOWEVER. There are run-time problems (invalid bitmap) with these
changes for wxPLViewer if you use that in conjunction with -dev
wxwidgets so this should not be the final version of this commit."

software@raven> examples/c/x01c -dev wxwidgets
PLplot library version: 5.11.1
10:54:55: Debug: nanosecs since epoch = 2210969809300109: plD_init_wxwidgets(): 
enter
10:54:55: Debug: nanosecs since epoch = 2210969845142231: wxPLDevice(): enter
10:54:55: Debug: nanosecs since epoch = 2210969845351899: wxPLDevice(): gc done
10:54:55: Debug: nanosecs since epoch = 2210969867143754: wxPLDevice(): 
m_interactiveTextGcdc done
10:54:55: Debug: nanosecs since epoch = 2210969867214649: SetupMemoryMap(): 
enter
10:54:55: Debug: nanosecs since epoch = 2210969868074842: SetupMemoryMap(): 
mapName start
10:54:55: Debug: nanosecs since epoch = 2210969868110859: SetupMemoryMap(): 
mapName done
10:54:55: Debug: nanosecs since epoch = 2210969868140426: SetupMemoryMap(): 
m_outputMemoryMap.create call
10:54:55: Debug: nanosecs since epoch = 2210969868201560: SetupMemoryMap(): 
m_outputMemoryMap.create done
10:54:55: Debug: nanosecs since epoch = 2210970015888076: 
wxPLplotwindow::wxPLplotwindow
10:54:55: Debug: nanosecs since epoch = 2210970031998161: SetupMemoryMap(): 
leave
10:54:55: Debug: nanosecs since epoch = 2210970032100417: wxPLDevice(): leave
10:54:55: Debug: nanosecs since epoch = 2210970032134179: plD_init_wxwidgets(): 
leave
software@raven> ../src/gtk/bitmap.cpp(923): assert "IsOk()" failed in 
GetWidth(): invalid bitmap

So Pedro, my version of your patch should be applied there with

git am < /tmp/0001-wxwidgets-binding-fix-for-delayed-OnCreate-event.patch

You should use that command on a fresh topic branch without your
changes, i.e., latest master from SF.  And make sure it is my
version of your patch you apply and not your own patch of the same name.

Please use my revision of your patch that way to preserve the style and line 
ending
issues I fixed and the tested-by section I inserted in the commit message
rather than just cherry-picking the visibility fix.

The next step after that is to build the wxwidgets, wxPLViewer, and
x01c targets and try the experiment above.  Assuming you will see the same
bitmap error as above, then please revise your patch again to
fix that.

(Just use "git add" to stage additional changes you want to add to
your commit, and "git commit --amend" to add those staged changes to
your commit.  This very common git pattern avoids a series of
non-working commits which are successive approximations to the final
working commit.)

Then follow up by testing the second revision of your patch on all
systems accessible to you by building the test_wxPLplotDemo and
test_c_wxwidgets targets on each of them.  (The latter does the above
experiment on a small subset of the examples with all prerequisite
targets built first automatically.)  Then send that 

Re: [Plplot-devel] Infinite Yielding issue

2016-12-22 Thread Pedro Vicente

Alan, Phil

I went ahead and did a patch commit for option 3), attached,
that has this:

(note: I wrote the code in Windows, then ftp to Linux, I got some warnings 
about line endings, just do

dos2unix if any thing shows up)

Subject: [PATCH] wxwidgets binding: fix for delayed OnCreate event

The delayed call of the create event (OnCreate()) on wxApp::OnInit() is a 
wxWidgets feature.

To avoid that, the fix is to remove the event creation completely,
and instead override Create().
For this to happen, the wxPLplotwindow class cannot be templated.
Other changes are that events are now handled by a static event table,
using wxDECLARE_EVENT_TABLE().
An auxiliary function CreateStream() creates the stream in Create().
The code of wxPLplotwindow was moved to a new source file wxPLplotwindow.cpp

Tested by: Pedro Vicente <pedro.vice...@rhw9121.star1.nesdis.noaa.gov>
on Ubuntu Linux 16.04 with wxwidgets3.0 package installed.
Results from building the test_wxPLplotDemo target:

01:06:35: Debug: wxPLplotwindow::wxPLplotwindow
01:06:35: Debug: wxPLplotwindow::Create()
01:06:35: Debug: wxPLplotwindow::CreateFrame()
01:06:35: Debug: plD_init_wxwidgets(): enter
01:06:35: Debug: wxPLDevice(): enter
01:06:35: Debug: wxPLDevice(): gc done
01:06:35: Debug: wxPLDevice(): m_interactiveTextGcdc done
01:06:35: Debug: wxPLDevice(): SetDC done
01:06:35: Debug: wxPLDevice(): leave
01:06:35: Debug: plD_init_wxwidgets(): leave
01:06:35: Debug: frame->Create
01:06:35: Debug: Plot()

NOTE:

previous to the creation of Create(), the same code was tested using
the event creation of OnCreate(): the error still happens in this case

00:48:12: Debug: wxPLplotwindow::wxPLplotwindow
00:48:12: Debug: frame->Create
00:48:12: Debug: Plot() FALSE IsReady()
00:48:12: Debug: wxPLplotwindow::OnCreate
00:48:12: Debug: plD_init_wxwidgets(): enter
00:48:12: Debug: wxPLDevice(): enter
00:48:12: Debug: wxPLDevice(): gc done
00:48:12: Debug: wxPLDevice(): m_interactiveTextGcdc done
00:48:12: Debug: wxPLDevice(): SetDC done
00:48:12: Debug: wxPLDevice(): leave
00:48:12: Debug: plD_init_wxwidgets(): leave





- Original Message - 
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
To: "Pedro Vicente" <pedro.vice...@space-research.org>; "Phil Rosenberg" 
<p.d.rosenb...@gmail.com>; "PLplot development list" 
<Plplot-devel@lists.sourceforge.net>

Sent: Thursday, December 22, 2016 11:05 PM
Subject: Re: [Plplot-devel] Infinite Yielding issue



Hi Pedro:

On 2016-12-22 18:34-0500 Pedro Vicente wrote:


@Alan

[...]
[The wxwidgets developer] says we cannot expect a timely response from 
the "create" event in wxApp::OnInit(),

which is the way wxPLplotDemo has.

so, we have to change that, it just cannot be like it is now.


Good point!



@Phil

[Three] options


Your ideas for fixing this issue are rightly directed to Phil because I 
don't have much
expertise to help you in this area.  Therefore, I will confine what I say 
in response to

just one issue with case 3 that you brought up.


But [option 3] would probably break existing applications.
but at the moment this is the only solution that we know has no potencial 
issues.


I don't think we should be too concerned with breaking applications since
Phil's wxwidgets approach is still pretty new and experimental, and it
was breaking them in any case as you have been demonstrating.  :-)

I am not tuned in to wxwidgets very much, but I never heard of anyone
using the old plplotwxwidgets library for anything.  And the only use
of Phil's new plplotwxwidgets library I have heard of up to this point
is your use and Greg Jung's use.  In his case he used that library as
a means of getting the GDL (Gnu Data Language) project (see
<https://en.wikipedia.org/wiki/GNU_Data_Language> to provide
PLplot-generated plots on Windows. But I am pretty sure his approach
was a private experiment and is not an official part of GDL. So I
suspect that it is just you and Greg that we would be inconveniencing
here, but I assume both of you would be happy to accept that
inconvenience if the result was that from then on you were building
your apps and libraries on top of a plplotwxwidgets library that was
rock solid.

It sounds like case 3 is the only rock-solid solution we have up to
now so my naive vote would be for that solution unless Phil comes up
with a different rock-solid solution that he prefers.  So please
thrash it out between you, and I look forward to the decision you two
make and the implementation that will quickly follow that decision
about the best way to fix this issue in a fundamental way.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and 
Astronomy,

University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeeph

Re: [Plplot-devel] Infinite Yielding issue

2016-12-22 Thread Alan W. Irwin
Hi Pedro:

On 2016-12-22 18:34-0500 Pedro Vicente wrote:

> @Alan
[...]
> [The wxwidgets developer] says we cannot expect a timely response from the 
> "create" event in 
> wxApp::OnInit(),
> which is the way wxPLplotDemo has.
>
> so, we have to change that, it just cannot be like it is now.

Good point!

>
> @Phil
>
> [Three] options

Your ideas for fixing this issue are rightly directed to Phil because I don't 
have much
expertise to help you in this area.  Therefore, I will confine what I say in 
response to
just one issue with case 3 that you brought up.

> But [option 3] would probably break existing applications.
> but at the moment this is the only solution that we know has no potencial 
> issues.

I don't think we should be too concerned with breaking applications since
Phil's wxwidgets approach is still pretty new and experimental, and it
was breaking them in any case as you have been demonstrating.  :-)

I am not tuned in to wxwidgets very much, but I never heard of anyone
using the old plplotwxwidgets library for anything.  And the only use
of Phil's new plplotwxwidgets library I have heard of up to this point
is your use and Greg Jung's use.  In his case he used that library as
a means of getting the GDL (Gnu Data Language) project (see
 to provide
PLplot-generated plots on Windows. But I am pretty sure his approach
was a private experiment and is not an official part of GDL. So I
suspect that it is just you and Greg that we would be inconveniencing
here, but I assume both of you would be happy to accept that
inconvenience if the result was that from then on you were building
your apps and libraries on top of a plplotwxwidgets library that was
rock solid.

It sounds like case 3 is the only rock-solid solution we have up to
now so my naive vote would be for that solution unless Phil comes up
with a different rock-solid solution that he prefers.  So please
thrash it out between you, and I look forward to the decision you two
make and the implementation that will quickly follow that decision
about the best way to fix this issue in a fundamental way.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-22 Thread Pedro Vicente
@Alan


>Does that seem like a reasonable plan for dealing with the fairly
>large release uncertainties created by this issue?

yes

this is the response from the developer


> This is not completely unexpected, the window is only really created when
> it's "realized" in GTK+/X11 terms, which can take quite some time, in
> particular if a remote X server is used. But why should it matter? Just 
> run
> the event loop until the "create" event is received and do whatever
> initialization you need to do once it happens, you don't have to (and 
> won't
> be able to) do it directly in OnInit().

he says we cannot expect a timely response from the "create" event in 
wxApp::OnInit(),
which is the way wxPLplotDemo has.

so, we have to change that, it just cannot be like it is now.

@Phil

several options

1)

remove the frame creation from wxApp::OnInit(),

I don't know where to move it to (or even if it is possible) , but the wxApp 
methods could provide some insight.

http://docs.wxwidgets.org/3.1/classwx_app_console.html

2)

leave the frame creation in wxApp::OnInit(),

this requires that the  "create" event  must not be triggered, so we cannot 
call for OnCreate().

Since the frame creation must be done in the "create" functions (either in 
Create() or OnCreate())
that leaves only the Create()  function.

But , like Phil mentioned , the class that eventually creates the plot could 
not be a wxFrame,
so the Create()  function cannot be overriden.

But maybe we can do the template valid only for classes that have similar 
Create() functions to wxFrame, and where
it is possible to override Create() ?

I don't know wich classes are the intended targets of the plot, maybe also 
dialogs?

3) other option would be not to do the templated plot window, and do a 
version only for wxFrame,
and override the Create() function, and make the frame in wxApp::OnInit().

But this would probably break existing applications.
but at the moment this is the only solution that we know has no potencial 
issues.


> However, that might be the wrong thing to do since the issue is we
> don't really understand what is going on here. So I think we really need a 
> fundamental solution for this issue that
> you guys understand before we release PLplot.

yes, no point in switching to another commit version that could have or not 
the same problem.


> But finding
> a fundamental solution to this issue is important enough that I think
> we should put off that commit (if necessary) until 5 days from now
> (Tuesday,December 27th when I was planning to make the release).

ok


-Pedro

- Original Message - 
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
To: "Pedro Vicente" <pedro.vice...@space-research.org>; "Phil Rosenberg" 
<p.d.rosenb...@gmail.com>; "PLplot development list" 
<Plplot-devel@lists.sourceforge.net>
Sent: Thursday, December 22, 2016 5:07 PM
Subject: RE: [Plplot-devel] Infinite Yielding issue


> On 2016-12-22 09:48-0500 Pedro Vicente wrote:
>
>> Hi Phil
>>
>> there is a response from a developer
>>
>> https://groups.google.com/forum/#!topic/wx-dev/wsk--AlQNzU
>
> To Pedro and Phil:
>
> I hope that developer is responsive to Pedro's supplementary question,
> but so far he hasn't been.  Therefore, Pedro, I suggest you follow
> Phil's advice to try other wxwidgets help avenues as well such as the
> "wxWidgets trac system" he mentioned for getting help.
>
> Meanwhile, I discovered just this morning that I now
> have the infinite Yielding loop when attempting to build the
> test_wxPLplotDemo target.  I believe that is the first time
> that anybody other than Pedro has encountered this issue.
>
> And if I use
>
> git checkout master^
>
> the test_wxPLplotDemo infinite Yielding loop goes away, i.e., I get
>
> 12:43:03: Debug: nanosecs since epoch = 2131058112372533: 
> wxPLplotwindow::wxPLplotwindow
> 12:43:03: Debug: nanosecs since epoch = 2131058122107520: frame->Create
> 12:43:03: Debug: nanosecs since epoch = 2131058129943746: 
> wxPLplotwindow::OnCreate
> 12:43:03: Debug: nanosecs since epoch = 2131058145174385: 
> plD_init_wxwidgets(): enter
> 12:43:03: Debug: nanosecs since epoch = 2131058145277524: wxPLDevice(): 
> enter
> 12:43:03: Debug: nanosecs since epoch = 2131058145349163: wxPLDevice(): gc 
> done
> 12:43:03: Debug: nanosecs since epoch = 2131058145447089: wxPLDevice(): 
> m_interactiveTextGcdc done
> 12:43:03: Debug: nanosecs since epoch = 2131058145489262: wxPLDevice(): 
> SetDC done
> 12:43:03: Debug: nanosecs since epoch = 2131058145596088: wxPLDevice(): 
> leave
> 12:43:03: Debug: nanosecs since epoch = 2131058145629197: 
> plD_init_wxwidgets(): leave
> 12:43:03: Debug: nano

Re: [Plplot-devel] Infinite Yielding issue

2016-12-22 Thread Alan W. Irwin
On 2016-12-22 09:48-0500 Pedro Vicente wrote:

> Hi Phil
>
> there is a response from a developer
>
> https://groups.google.com/forum/#!topic/wx-dev/wsk--AlQNzU

To Pedro and Phil:

I hope that developer is responsive to Pedro's supplementary question,
but so far he hasn't been.  Therefore, Pedro, I suggest you follow
Phil's advice to try other wxwidgets help avenues as well such as the
"wxWidgets trac system" he mentioned for getting help.

Meanwhile, I discovered just this morning that I now
have the infinite Yielding loop when attempting to build the
test_wxPLplotDemo target.  I believe that is the first time
that anybody other than Pedro has encountered this issue.

And if I use

git checkout master^

the test_wxPLplotDemo infinite Yielding loop goes away, i.e., I get

12:43:03: Debug: nanosecs since epoch = 2131058112372533: 
wxPLplotwindow::wxPLplotwindow
12:43:03: Debug: nanosecs since epoch = 2131058122107520: frame->Create
12:43:03: Debug: nanosecs since epoch = 2131058129943746: 
wxPLplotwindow::OnCreate
12:43:03: Debug: nanosecs since epoch = 2131058145174385: plD_init_wxwidgets(): 
enter
12:43:03: Debug: nanosecs since epoch = 2131058145277524: wxPLDevice(): enter
12:43:03: Debug: nanosecs since epoch = 2131058145349163: wxPLDevice(): gc done
12:43:03: Debug: nanosecs since epoch = 2131058145447089: wxPLDevice(): 
m_interactiveTextGcdc done
12:43:03: Debug: nanosecs since epoch = 2131058145489262: wxPLDevice(): SetDC 
done
12:43:03: Debug: nanosecs since epoch = 2131058145596088: wxPLDevice(): leave
12:43:03: Debug: nanosecs since epoch = 2131058145629197: plD_init_wxwidgets(): 
leave
12:43:03: Debug: nanosecs since epoch = 2131058166078403: Plot()

But the infinite loop comes back again if I use

git checkout master

where to be clear master =

995e75e Made some items clearer in the wxWigdets Demo

I am pretty sure I tested 995e75e previously by building the
test_wxPLplotDemo target without encountering the infinite loop.  So
it is possible the infinite loop depends on delicate timing conditions
that come and go  However, I also tried Pedro's simple example
again, and that does not have an infinite loop this morning.

My instincts as release manager are to make another commit that
reverses the effect of 995e75e which I believe was also Pedro's plan
with a deadline of tomorrow (Friday) if he could not get advice
on a definitive fix.

However, that might be the wrong thing to do since the issue is we
don't really understand what is going on here.  For example, making
another commit that puts us back to the equivalent of

65e7b3c Fix bug with plotting in wxPLplotDemo

may still leave some users out there that experience the infinite
loop even when all of Pedro's tests of 65e7b3c and mine seem fine.

So I think we really need a fundamental solution for this issue that
you guys understand before we release PLplot.  So I appreciate you
both spending some time on this issue by, e.g., exploring all avenues
such as the "wxWidgets trac system" that Phil mentioned for getting
help and also reading through wxwidgets documentation and tutorials
to try and figure out for yourselves what is going on.

In sum, I believe Pedro's plan was to suggest I make that commit to
return us to the equivalent of 65e7b3c tomorrow (Friday) if he or Phil
got no useful responses to their questions on wxwidgets forums
concerning Pedro's simple example of the problem by then.  But finding
a fundamental solution to this issue is important enough that I think
we should put off that commit (if necessary) until 5 days from now
(Tuesday,December 27th when I was planning to make the release).  And
at that point we should decide whether to release using the equivalent
of 65e7b3c or delay the release for several more days (and maybe into
the first week in 2017) until we do get a fundamental fix that you
guys understand.

Does that seem like a reasonable plan for dealing with the fairly
large release uncertainties created by this issue?

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list

Re: [Plplot-devel] Infinite Yielding issue

2016-12-22 Thread Pedro Vicente
Hi Phil

there is a response from a developer

https://groups.google.com/forum/#!topic/wx-dev/wsk--AlQNzU

-Pedro


On 2016-12-22 04:58, p.d.rosenb...@gmail.com wrote:
> Hi Pedro
>
> It's great that you set that up. I would suggest that you post it to
> the wxWidgets trac system too. The forum is great for advice on how 
> we
> can change things, and doublemax really knows what he’s talking
> about, but the wxWidgets devs only use trac for dealing with bug
> reports. If it is left on the forum then it will get lost.
>
> Phil
>
> Sent from my Windows 10 phone
>
> FROM: Alan W. Irwin [1]
> SENT: 22 December 2016 05:39
> TO: Pedro Vicente [2]; Phil Rosenberg [3]; PLplot development list 
> [4]
> SUBJECT: Re: [Plplot-devel] Infinite Yielding issue
>
> Hi Pedro:
>
> More thoughts:
>
> I like your example because it follows the first rule of debugging
>
> which is to simplify the example that shows the strange behaviour.
>
> And I get success on my platform, and you don't on yours which
>
> confirms there is a problem (either there is a bug in wxwidgets/GTK+
>
> or your simple example uses that software incorrectly). But it is a
> huge
>
> simplification that PLplot is no longer involved, and I highly
>
> approve.
>
> And with regard to the actual problem demonstrated by this simple
>
> example, I am still left wondering if you might be exposing some
>
> wxwidgets or GTK+ bug on your fast hardware there that my slow
>
> hardware does not expose here?  So just for fun, can you get access
> to
>
> a Linux system on a moderately slow PC there to try this simple
>
> example?  It doesn't have to be superslow. But I do have a
>
> nine-year-old PC running at 2.4GHz with two cpus. So if you can find 
> a
>
> Linux PC that has roughly the same speed as that, you might find a
>
> platform where you obtain success with your simple example which 
> might
>
> be a clue about the cause of this issue.
>
> Alan
>
> __
>
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and
> Astronomy,
>
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state
>
> implementation for stellar interiors (freeeos.sf.net); the Time
>
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
>
> software package (plplot.sf.net); the libLASi project
>
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
>
> and the Linux Brochure Project (lbproject.sf.net).
>
> __
>
> Linux-powered Science
>
> __
>
>
>
> Links:
> --
> [1] mailto:ir...@beluga.phys.uvic.ca
> [2] mailto:pedro.vice...@space-research.org
> [3] mailto:p.d.rosenb...@gmail.com
> [4] mailto:plplot-devel@lists.sourceforge.net

-- 
Pedro Vicente
pedro.vice...@space-research.org
http://www.space-research.org/

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-22 Thread p.d.rosenberg
Hi Pedro
It's great that you set that up. I would suggest that you post it to the 
wxWidgets trac system too. The forum is great for advice on how we can change 
things, and doublemax really knows what he’s talking about, but the wxWidgets 
devs only use trac for dealing with bug reports. If it is left on the forum 
then it will get lost.

Phil

Sent from my Windows 10 phone

From: Alan W. Irwin
Sent: 22 December 2016 05:39
To: Pedro Vicente; Phil Rosenberg; PLplot development list
Subject: Re: [Plplot-devel] Infinite Yielding issue

Hi Pedro:

More thoughts:

I like your example because it follows the first rule of debugging
which is to simplify the example that shows the strange behaviour.
And I get success on my platform, and you don't on yours which
confirms there is a problem (either there is a bug in wxwidgets/GTK+
or your simple example uses that software incorrectly). But it is a huge
simplification that PLplot is no longer involved, and I highly
approve.

And with regard to the actual problem demonstrated by this simple
example, I am still left wondering if you might be exposing some
wxwidgets or GTK+ bug on your fast hardware there that my slow
hardware does not expose here?  So just for fun, can you get access to
a Linux system on a moderately slow PC there to try this simple
example?  It doesn't have to be superslow. But I do have a
nine-year-old PC running at 2.4GHz with two cpus. So if you can find a
Linux PC that has roughly the same speed as that, you might find a
platform where you obtain success with your simple example which might
be a clue about the cause of this issue.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-21 Thread Alan W. Irwin
Hi Pedro:

More thoughts:

I like your example because it follows the first rule of debugging
which is to simplify the example that shows the strange behaviour.
And I get success on my platform, and you don't on yours which
confirms there is a problem (either there is a bug in wxwidgets/GTK+
or your simple example uses that software incorrectly). But it is a huge
simplification that PLplot is no longer involved, and I highly
approve.

And with regard to the actual problem demonstrated by this simple
example, I am still left wondering if you might be exposing some
wxwidgets or GTK+ bug on your fast hardware there that my slow
hardware does not expose here?  So just for fun, can you get access to
a Linux system on a moderately slow PC there to try this simple
example?  It doesn't have to be superslow. But I do have a
nine-year-old PC running at 2.4GHz with two cpus. So if you can find a
Linux PC that has roughly the same speed as that, you might find a
platform where you obtain success with your simple example which might
be a clue about the cause of this issue.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-21 Thread Alan W. Irwin
On 2016-12-21 23:14-0500 Pedro Vicente wrote:

> I did a simple wxWidgets app (no PLplot) that shows the issue
>
> it's here , wx_demo.cpp
>
> https://github.com/pedro-vicente/plplot-wxwidgets
[...]

> 18:33:43: Debug: wxFrameTest::wxFrameTest
> 18:33:43: Debug: frame->Create
> 18:33:43: Debug: wxFrameTest::Show
> 18:33:43: Debug: frame->Show
> 18:33:43: Debug: FALSE frame->IsReady
> 18:33:43: Debug: wxFrameTest::OnSize
> 18:33:43: Debug: wxFrameTest::OnCreate
> 18:33:43: Debug: wxFrameTest::CreateStream

Hi Pedro:

I had some difficulty obtaining wx_demo.cpp, and you may want to update your
instructions in the newsgroup to make it easier to do so.

Here is how I obtained, built, and ran it (on Debian Jessie)

irwin@raven> wget 
https://raw.githubusercontent.com/pedro-vicente/plplot-wxwidgets/master/wx_plplot/wx_demo.cpp
irwin@raven> g++ $(wx-config --cppflags --libs ) wx_demo.cpp 
irwin@raven> ./a.out
21:00:14: Debug: wxFrameTest::wxFrameTest
21:00:15: Debug: frame->Create
21:00:15: Debug: wxFrameTest::Show
21:00:15: Debug: wxFrameTest::OnSize
21:00:15: Debug: wxFrameTest::OnSize
21:00:15: Debug: wxFrameTest::OnCreate
21:00:15: Debug: wxFrameTest::CreateStream
21:00:15: Debug: frame->Show
21:00:15: Debug: TRUE frame->IsReady
21:00:15: Debug: wxFrameTest::OnPaint

I assume that is the intended result because I got no FALSE on my
platform unlike you which immediately shows something is going on that is not
predictable.  I am not signed up with google, but feel free to add my
results (and download and build instructions for that matter) to the
wxWidgets forum on google.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-21 Thread Pedro Vicente
@Alan


> It appears your proposed solution to swap the order in which Yield and
> Show are called works on your CentOS platform which has always given
> you the most trouble.  If it works on all of them please prepare the 
> relevant commit

ok,

I just posted a question about this on the wxWidgets forum


https://groups.google.com/forum/#!topic/wx-dev/wsk--AlQNzU

If noboby replies in a day or 2, I''ll commit that workaround patch.
It would be nice to sort this out if we can.

@Phil

I did a simple wxWidgets app (no PLplot) that shows the issue

it's here , wx_demo.cpp

https://github.com/pedro-vicente/plplot-wxwidgets

I get this output (OnCreate is called after the main app tries to test 
frame->IsReady() )
the stream here is simulated by a boolean

18:33:43: Debug: wxFrameTest::wxFrameTest
18:33:43: Debug: frame->Create
18:33:43: Debug: wxFrameTest::Show
18:33:43: Debug: frame->Show
18:33:43: Debug: FALSE frame->IsReady
18:33:43: Debug: wxFrameTest::OnSize
18:33:43: Debug: wxFrameTest::OnCreate
18:33:43: Debug: wxFrameTest::CreateStream


- Original Message - 
From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
To: "Pedro Vicente" <pedro.vice...@space-research.org>; "Phil Rosenberg" 
<p.d.rosenb...@gmail.com>; "PLplot development list" 
<plplot-devel@lists.sourceforge.net>
Sent: Wednesday, December 21, 2016 7:36 PM
Subject: RE: [Plplot-devel] Infinite Yielding issue


> On 2016-12-21 23:25- p.d.rosenb...@gmail.com wrote:
>
>> Sorry I have not been able to look at this today. I have had family 
>> things on.
>
>> Thanks for looking into that. I half suspected that might be the
> case. So after everything I said about contracts with the Show
> function, it seems it is already broken ☹
>
> To Pedro and Phil:
>
> Since we are all running out of time not only because of family activities
> during this season but also because the release date is only 6 days
> from now, I suggest we come up with a quick compromise fix for this
> release even if you guys don't completely understand why it works.
>
> Here is my suggestion for such a fix.
>
> @Pedro:
>
> It appears your proposed solution to swap the order in which Yield and
> Show are called works on your CentOS platform which has always given
> you the most trouble.  So that sounds promising for a quick fix, but
> please also test your proposed solution on all platforms accessible to
> you including your Windows platform (just in case a change since you
> last tested that platform has somehow clobbered wxwidgets on that
> platform).  If it works on all of them please prepare the relevant
> commit (with a tested by: paragraph listing all the platforms you
> tested for future reference just in case we run into trouble with this
> part of our wxwidgets-related software ever again) and send it to me
> for one final test that it also works here. Assuming all those tests
> work, I will push that commit, and we will be done with this bug for
> at least this release!
>
> Alan
>
> __
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and 
> Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state
> implementation for stellar interiors (freeeos.sf.net); the Time
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
> software package (plplot.sf.net); the libLASi project
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
> and the Linux Brochure Project (lbproject.sf.net).
> __
>
> Linux-powered Science
> __
> 


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-21 Thread Alan W. Irwin
On 2016-12-21 23:25- p.d.rosenb...@gmail.com wrote:

> Sorry I have not been able to look at this today. I have had family things on.

> Thanks for looking into that. I half suspected that might be the
case. So after everything I said about contracts with the Show
function, it seems it is already broken ☹

To Pedro and Phil:

Since we are all running out of time not only because of family activities
during this season but also because the release date is only 6 days
from now, I suggest we come up with a quick compromise fix for this
release even if you guys don't completely understand why it works.

Here is my suggestion for such a fix.

@Pedro:

It appears your proposed solution to swap the order in which Yield and
Show are called works on your CentOS platform which has always given
you the most trouble.  So that sounds promising for a quick fix, but
please also test your proposed solution on all platforms accessible to
you including your Windows platform (just in case a change since you
last tested that platform has somehow clobbered wxwidgets on that
platform).  If it works on all of them please prepare the relevant
commit (with a tested by: paragraph listing all the platforms you
tested for future reference just in case we run into trouble with this
part of our wxwidgets-related software ever again) and send it to me
for one final test that it also works here. Assuming all those tests
work, I will push that commit, and we will be done with this bug for
at least this release!

Alan

__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-21 Thread p.d.rosenberg
Sorry I have not been able to look at this today. I have had family things on.

Thanks for looking into that. I half suspected that might be the case. So after 
everything I said about contracts with the Show function, it seems it is 
already broken ☹

I suspect that actually this is a wxWidgets bug. But the documentation around 
Create is sparse. Probably we should generate a minimal example and report it 
to wxWidgets.

Sent from my Windows 10 phone

From: Pedro Vicente
Sent: 21 December 2016 22:06
To: Alan W. Irwin; Phil Rosenberg; PLplot development list
Subject: Re: [Plplot-devel] Infinite Yielding issue

@Phil

it seems the problem on the code in the current master is that the Yield(0 
is called before Show()

if I change to after Show(), like this, I get the result below


wxPLplotwindow *frame = new wxPlDemoFrame();
frame->Create( NULL, wxID_ANY, wxT( "wxPLplotDemo" ) );
PLPLOT_wxLogDebug("frame->Create");
frame->SetIcon( wxIcon( graph ) );
frame->Show();

//We must wait for the Create event to be processed and the
//wxPLplotstream to be prepared
while (!frame->IsReady())
{
PLPLOT_wxLogDebug("Plot() Yielding");
wxGetApp().Yield();
}

//Now we can set up our frame and do the plotting
Plot( frame );



16:27:38: Debug: frame->Create
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: Plot() Yielding
16:27:38: Debug: wxPLplotwindow::OnCreate
16:27:39: Debug: plD_init_wxwidgets(): enter
16:27:39: Debug: wxPLDevice(): enter
16:27:39: Debug: wxPLDevice(): gc done
16:27:39: Debug: wxPLDevice(): m_interactiveTextGcdc done
16:27:39: Debug: wxPLDevice(): SetDC done
16:27:39: Debug: wxPLDevice(): leave
16:27:39: Debug: plD_init_wxwidgets(): leave
16:27:39: Debug: Plot()



- Original Message - 
From: "Pedro Vicente" <pedro.vice...@space-research.org>
To: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>; "Phil Rosenberg" 
<p.d.rosenb...@gmail.com>; "PLplot development list" 
<plplot-devel@lists.sourceforge.net>
Sent: Tuesday, December 20, 2016 11:58 PM
Subject: Re: [Plplot-devel] Infinite Yielding issue


> @Alan, Phil
>
> all works on the commit *before* current master, detailed results below
>
>
> @Phil
>
> Would you mind sending a few lines explaining how the Yield() function 
> works
> and its effect here?
> I get a few different results, and I would just like to understand what is
> happening here.
>
> Also, it would be really great if you could replicate my results.
>
> Maybe the VirtualBox on Windows?
> If you do,  a must is to install the GuestCD Additions that allows full
> screen and both ways copy and paste to host.
> Otherwise you get a tiny window with Linux running inside Windows.
> By the way on debian I could not install the GuestCD Additions.
>
> Or even an old machine that you have lying around, if you do a complete 
> new
> install of ubuntu.
>
> ubuntu 14.04
> ubuntu 16.04
>
> ok, but curiously we don't have a Yield() wait
>
> 65e7b3c Fix bug with plotting in wxPLplotDemo
>
> 23:31:38: Debug: wxPLplotwindow::wxPLplotwindow
> 23:31:38: Debug: frame->Create
> 23:31:38: Debug: wxPLplotwindow::OnCreate
> 23:31:38: Debug: plD_init_wxwidgets(): enter
> 23:31:38: Debug: wxPLDevice(): enter
> 23:31:38: Debug: wxPLDevice(): gc done
> 23:31:38: Debug: wxPLDevice(): m_interactiveTextGcdc done
> 23:31:38: Debug: wxPLDevice(): SetDC done
> 23:31:38: Debug: wxPLDevice(): leave
> 23:31:38: Debug: plD_init_wxwidgets(): leave
> 23:31:38: Debug: Plot()
>
>
> debian 8.0
>
> also ok, but the result has one Yield()  call
> on CentOS I got many Yield()  calls
>
> 23:31:38: Debug: wxPLplotwindow::wxPLplotwindow
> 23:31:38: Debug: frame->Create
> 23:31:38: Debug: Plot() Yielding
> 23:31:38: Debug: wxPLplotwindow::OnCreate
> 23:31:38: Debug: plD_init_wxwidgets(): enter
> 23:31:38: Debug: wxPLDevice(): enter
> 23:31:38: Debug: wxPLDevice(): gc done
> 23:31:38: Debug: wxPLDevice(): m_interactiveTextGcdc done
> 23:31:38: Debug: wxPLDevice(): SetDC done
> 23:31:38: Debug: wxPLDevice(): leave
> 23:31:38: Debug: plD_init_wxwidgets(): leave
> 23:31:38: Debug: Plot()
>
>
>
>
> - Original Message - 
> From: "Pedro Vicente" <pedro.vice...@space-research.org>
> To: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>; "Phil Rosenberg"
> <p

Re: [Plplot-devel] Infinite Yielding issue

2016-12-20 Thread Pedro Vicente
@Alan, Phil

all works on the commit *before* current master, detailed results below


@Phil

Would you mind sending a few lines explaining how the Yield() function works 
and its effect here?
I get a few different results, and I would just like to understand what is 
happening here.

Also, it would be really great if you could replicate my results.

Maybe the VirtualBox on Windows?
If you do,  a must is to install the GuestCD Additions that allows full 
screen and both ways copy and paste to host.
Otherwise you get a tiny window with Linux running inside Windows.
By the way on debian I could not install the GuestCD Additions.

Or even an old machine that you have lying around, if you do a complete new 
install of ubuntu.

ubuntu 14.04
ubuntu 16.04

ok, but curiously we don't have a Yield() wait

65e7b3c Fix bug with plotting in wxPLplotDemo

23:31:38: Debug: wxPLplotwindow::wxPLplotwindow
23:31:38: Debug: frame->Create
23:31:38: Debug: wxPLplotwindow::OnCreate
23:31:38: Debug: plD_init_wxwidgets(): enter
23:31:38: Debug: wxPLDevice(): enter
23:31:38: Debug: wxPLDevice(): gc done
23:31:38: Debug: wxPLDevice(): m_interactiveTextGcdc done
23:31:38: Debug: wxPLDevice(): SetDC done
23:31:38: Debug: wxPLDevice(): leave
23:31:38: Debug: plD_init_wxwidgets(): leave
23:31:38: Debug: Plot()


debian 8.0

also ok, but the result has one Yield()  call
on CentOS I got many Yield()  calls

23:31:38: Debug: wxPLplotwindow::wxPLplotwindow
23:31:38: Debug: frame->Create
23:31:38: Debug: Plot() Yielding
23:31:38: Debug: wxPLplotwindow::OnCreate
23:31:38: Debug: plD_init_wxwidgets(): enter
23:31:38: Debug: wxPLDevice(): enter
23:31:38: Debug: wxPLDevice(): gc done
23:31:38: Debug: wxPLDevice(): m_interactiveTextGcdc done
23:31:38: Debug: wxPLDevice(): SetDC done
23:31:38: Debug: wxPLDevice(): leave
23:31:38: Debug: plD_init_wxwidgets(): leave
23:31:38: Debug: Plot()




- Original Message - 
From: "Pedro Vicente" <pedro.vice...@space-research.org>
To: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>; "Phil Rosenberg" 
<p.d.rosenb...@gmail.com>; "PLplot development list" 
<plplot-devel@lists.sourceforge.net>
Sent: Tuesday, December 20, 2016 11:27 PM
Subject: Re: [Plplot-devel] Infinite Yielding issue


> @Alan, Phil
>
> yes, my bad, sorry
>
> here are corrected results. *It works* on the commit before the current
> master, for CentOS, I'll try others later
>
> git checkout master
> git log --oneline -3
>
> 995e75e60 Made some items clearer in the wxWigdets Demo
> 65e7b3c99 Fix bug with plotting in wxPLplotDemo
> 67ef7be48 Added a function to check if the window is ready to accept plot
> commands.
>
> on master, infinite loop
>
> make VERBOSE=1 test_wxPLplotDemo
> 23:20:31: Debug: wxPLplotwindow::wxPLplotwindow
> 23:20:31: Debug: frame->Create
> 23:20:31: Debug: Plot() Yielding
> 23:20:31: Debug: Plot() Yielding
>
> going back one , ok
>
> git checkout 65e7b3c99
>
> 65e7b3c99 Fix bug with plotting in wxPLplotDemo
>
>
>
> 23:23:09: Debug: wxPLplotwindow::wxPLplotwindow
> 23:23:09: Debug: frame->Create
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: Plot() Yielding
> 23:23:09: Debug: wxPLplotwindow::OnCreate
> 23:23:09: Debug: plD_init_wxwidgets(): enter
> 23:23:09: Debug: wxPLDevice(): enter
> 23:23:09: Debug: wxPLDevice(): gc done
> 23:23:09: Debug: wxPLDevice(): m_interactiveTextGcdc done
> 23:23:09: Debug: wxPLDevice(): SetDC done
> 23:23:09: Debug: wxPLDevice(): leave
> 23:23:09: Debug: plD_init_wxwidgets(): leave
> 23:23:09: Debug: Plot()
>
>
>
> - Original Message - 
> From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca>
> To: "Pedro Vicente" <pedro.vice...@space-research.org>; "Phil Rosenberg"
> <p.d.rosenb...@gmail.com>; "PLplot development list"
> <plplot-devel@lists.sourceforge.net>
> Sent: Tuesday, December 20, 2016 10:47 PM
> Subject: Re: Infinite Yielding issue
>
>
>> On 2016-12-20 21:23-0500 Pedro Vicente wrote:
>>
>>> @Alan
>>>
>>> yes, git is really good for these things, I forgot about that.
>>>
>>> I did
>>>
>>> git checkout 67ef7be48217c098ae49bb893df5

Re: [Plplot-devel] Infinite Yielding issue

2016-12-20 Thread Pedro Vicente
@Alan, Phil

yes, my bad, sorry

here are corrected results. *It works* on the commit before the current 
master, for CentOS, I'll try others later

git checkout master
git log --oneline -3

995e75e60 Made some items clearer in the wxWigdets Demo
65e7b3c99 Fix bug with plotting in wxPLplotDemo
67ef7be48 Added a function to check if the window is ready to accept plot 
commands.

on master, infinite loop

make VERBOSE=1 test_wxPLplotDemo
23:20:31: Debug: wxPLplotwindow::wxPLplotwindow
23:20:31: Debug: frame->Create
23:20:31: Debug: Plot() Yielding
23:20:31: Debug: Plot() Yielding

going back one , ok

git checkout 65e7b3c99

65e7b3c99 Fix bug with plotting in wxPLplotDemo



23:23:09: Debug: wxPLplotwindow::wxPLplotwindow
23:23:09: Debug: frame->Create
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: Plot() Yielding
23:23:09: Debug: wxPLplotwindow::OnCreate
23:23:09: Debug: plD_init_wxwidgets(): enter
23:23:09: Debug: wxPLDevice(): enter
23:23:09: Debug: wxPLDevice(): gc done
23:23:09: Debug: wxPLDevice(): m_interactiveTextGcdc done
23:23:09: Debug: wxPLDevice(): SetDC done
23:23:09: Debug: wxPLDevice(): leave
23:23:09: Debug: plD_init_wxwidgets(): leave
23:23:09: Debug: Plot()



- Original Message - 
From: "Alan W. Irwin" 
To: "Pedro Vicente" ; "Phil Rosenberg" 
; "PLplot development list" 

Sent: Tuesday, December 20, 2016 10:47 PM
Subject: Re: Infinite Yielding issue


> On 2016-12-20 21:23-0500 Pedro Vicente wrote:
>
>> @Alan
>>
>> yes, git is really good for these things, I forgot about that.
>>
>> I did
>>
>> git checkout 67ef7be48217c098ae49bb893df5e170c3eccc2c
>
> Hi Pedro:
>
> Note this summary of the last three commits (all from Phil) for the
> master branch.
>
> software@raven> git log --oneline -3
> 995e75e Made some items clearer in the wxWigdets Demo
> 65e7b3c Fix bug with plotting in wxPLplotDemo
> 67ef7be Added a function to check if the window is ready to accept plot 
> commands.
>
> So master^^ = 67ef7be is the one you are testing which is simply
> a preparation for master^ = 65e7b3c.  I thought it was master^ that
> worked previously for you on one platform, and master = 995e75e that
> has been causing you trouble since. So I am surprised you are testing
> master^^ = 67ef7be rather than master^ = 65e7b3c.  But maybe I am not
> remembering the sequence of events and tests correctly.
>
> Alan
> __
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and 
> Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state
> implementation for stellar interiors (freeeos.sf.net); the Time
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
> software package (plplot.sf.net); the libLASi project
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
> and the Linux Brochure Project (lbproject.sf.net).
> __
>
> Linux-powered Science
> __
> 


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-20 Thread Pedro Vicente
@Alan

yes, git is really good for these things, I forgot about that.

I did

git checkout 67ef7be48217c098ae49bb893df5e170c3eccc2c
make VERBOSE=1 test_wxPLplotDemo



hmm, still some issues.

Good thing I decided to try on all platforms because I was almost going to 
shout success after trying the 2 ubuntus and debian (that have wxwidgets 
3.0)
but on CentOS the Yield() has no effect (don't  know if it's because is 
wxWidgets 3.1)

So, it happens that I had a similar problem some weeks ago, the problem was 
that my wxWidgets app (a client) must read some data from a socket on a 
server
and potentially this can take minutes.

Initially I did the reading on the socket on the main window frame.
But the reading blocks all the GUI, it's not even possible to exit the 
program, so I started searching for a way to avoid the blocking, and I found 
the Yield() function on their docs.

However it had no effect at all :-)

So, my next step was to use a separate thread as explained in their 
examples.
It's good that wxWidgets has its own thread API.
This makes the code much more complex, specially the way one thread 
communicates with the other, but works like a charm.
Since my goal was to detect when one task was finished , it may be possible 
to do something similar here.

I'll post on my next email the example I followed.

here it goes the results

ubuntu, debian, a plot shows

20:53:09: Debug: wxPLplotwindow::wxPLplotwindow
20:53:09: Debug: frame->Create
20:53:09: Debug: wxPLplotwindow::OnCreate
20:53:09: Debug: plD_init_wxwidgets(): enter
20:53:09: Debug: wxPLDevice(): enter
20:53:09: Debug: wxPLDevice(): gc done
20:53:09: Debug: wxPLDevice(): m_interactiveTextGcdc done
20:53:09: Debug: wxPLDevice(): SetDC done
20:53:09: Debug: wxPLDevice(): leave
20:53:09: Debug: plD_init_wxwidgets(): leave
20:53:09: Debug: Plot()


centOS, here we get a window with no plot, see the NULL below

21:01:37: Debug: wxPLplotwindow::wxPLplotwindow
21:01:37: Debug: frame->Create
21:01:37: Debug: pls NULL
21:01:37: Debug: wxPLplotwindow::OnCreate
21:01:37: Debug: plD_init_wxwidgets(): enter
21:01:37: Debug: wxPLDevice(): enter
21:01:37: Debug: wxPLDevice(): gc done
21:01:37: Debug: wxPLDevice(): m_interactiveTextGcdc done
21:01:37: Debug: wxPLDevice(): SetDC done
21:01:37: Debug: wxPLDevice(): leave
21:01:37: Debug: plD_init_wxwidgets(): leave



- Original Message - 
From: "Alan W. Irwin" 
To: "Pedro Vicente" 
Cc: "Phil Rosenberg" ; "PLplot development list"

Sent: Tuesday, December 20, 2016 6:56 PM
Subject: Re: Infinite Yielding issue


> On 2016-12-20 17:49-0500 Pedro Vicente wrote:
>
>> @Alan, Phil
>>
>>
>> here are my results
>>
>> for git master current
>>
>> CentOS 6.8 wxWidgets 3.1
>> Linux 14.04 wxWidgets 3.0
>> Linux 16.04 wxWidgets 3.0
>> Debian 8.0 wxWidgets 3.0
>>
>> all infinite loop
>>
>> 14:25:57: Debug: wxPLplotwindow::wxPLplotwindow
>> 14:25:57: Debug: frame->Create
>> 14:25:57: Debug: Plot() Yielding
>> 14:25:57: Debug: Plot() Yielding
>>
>> made with
>>
>> cmake ..  -G "Unix
>> Makefiles" -DCMAKE_INSTALL_PREFIX:PATH=/home/pvn/plplot-install 
>> -DCMAKE_BUILD_TYPE=Debug
>>  -DBUILD_SHARED_LIBS:BOOL=OFF  -DBUILD_TEST=ON -DPLPLOT_WX_DEBUG_OUTPUT=ON
>>
>> yesterday I sent this result for Ubuntu 14.04, but that was with
>> yesterday's master.
>>
>> Phil, today there was a new commit, so could that be it ?
>
> Hi Pedro:
>
> You can prove or disprove the latest commit 995e75e6086 is the source of
> some/all of the above issues by running those tests again on the
> previous commit.  Which from the current "git log" results you should
> be able to get access to as follows:
>
> git checkout 995e75e6086^
>
> or the equivalent
>
> git checkout 65e7b3c9980
>
> Alan
> __
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and
> Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state
> implementation for stellar interiors (freeeos.sf.net); the Time
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
> software package (plplot.sf.net); the libLASi project
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
> and the Linux Brochure Project (lbproject.sf.net).
> __
>
> Linux-powered Science
> __
>


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-20 Thread Alan W. Irwin
On 2016-12-20 17:49-0500 Pedro Vicente wrote:

> @Alan, Phil
>
>
> here are my results
>
> for git master current
>
> CentOS 6.8 wxWidgets 3.1
> Linux 14.04 wxWidgets 3.0
> Linux 16.04 wxWidgets 3.0
> Debian 8.0 wxWidgets 3.0
>
> all infinite loop
>
> 14:25:57: Debug: wxPLplotwindow::wxPLplotwindow
> 14:25:57: Debug: frame->Create
> 14:25:57: Debug: Plot() Yielding
> 14:25:57: Debug: Plot() Yielding
>
> made with
>
> cmake ..  -G "Unix Makefiles" 
> -DCMAKE_INSTALL_PREFIX:PATH=/home/pvn/plplot-install -DCMAKE_BUILD_TYPE=Debug 
> -DBUILD_SHARED_LIBS:BOOL=OFF  -DBUILD_TEST=ON -DPLPLOT_WX_DEBUG_OUTPUT=ON
>
> yesterday I sent this result for Ubuntu 14.04, but that was with yesterday's 
> master.
>
> Phil, today there was a new commit, so could that be it ?

Hi Pedro:

You can prove or disprove the latest commit 995e75e6086 is the source of
some/all of the above issues by running those tests again on the
previous commit.  Which from the current "git log" results you should
be able to get access to as follows:

git checkout 995e75e6086^

or the equivalent

git checkout 65e7b3c9980

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__

Linux-powered Science
__

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-20 Thread p.d.rosenberg
Hi Pedro, Alan
Sorry. I guess I made a mistake in the new commit. It worked fine on my system 
but I never saw the same problem you did in the first place. I will check for 
obvious mistakes and if I can't see the cause then I'll revert the last commit. 
Although this will have to wait until the morning UK time.
Phil

Sent from my Windows 10 phone

From: Pedro Vicente
Sent: 20 December 2016 22:49
To: Alan W. Irwin; Phil Rosenberg; PLplot development list
Subject: Re: Infinite Yielding issue

@Alan, Phil


here are my results

for git master current

CentOS 6.8 wxWidgets 3.1
Linux 14.04 wxWidgets 3.0
Linux 16.04 wxWidgets 3.0
Debian 8.0 wxWidgets 3.0

all infinite loop

14:25:57: Debug: wxPLplotwindow::wxPLplotwindow
14:25:57: Debug: frame->Create
14:25:57: Debug: Plot() Yielding
14:25:57: Debug: Plot() Yielding

made with

cmake ..  -G "Unix 
Makefiles" -DCMAKE_INSTALL_PREFIX:PATH=/home/pvn/plplot-install 
-DCMAKE_BUILD_TYPE=Debug 
 -DBUILD_SHARED_LIBS:BOOL=OFF  -DBUILD_TEST=ON -DPLPLOT_WX_DEBUG_OUTPUT=ON

yesterday I sent this result for Ubuntu 14.04, but that was with yesterday's 
master.

Phil, today there was a new commit, so could that be it ?

23:26:43: Debug: wxPLplotwindow::wxPLplotwindow
23:26:44: Debug: frame->Create
23:26:44: Debug: Plot() Yielding
23:26:44: Debug: wxPLplotwindow::OnCreate
23:26:44: Debug: plD_init_wxwidgets(): enter
23:26:44: Debug: wxPLDevice(): enter
23:26:44: Debug: wxPLDevice(): gc done
23:26:44: Debug: wxPLDevice(): m_interactiveTextGcdc done
23:26:44: Debug: wxPLDevice(): SetDC done
23:26:44: Debug: wxPLDevice(): leave
23:26:44: Debug: plD_init_wxwidgets(): leave
23:26:44: Debug: Plot()






- Original Message - 
From: "Alan W. Irwin" 
To: "Phil Rosenberg" ; "Pedro Vicente" 
; "PLplot development list" 

Sent: Tuesday, December 20, 2016 3:10 PM
Subject: Infinite Yielding issue


> On 2016-12-20 13:07-0500 Pedro Vicente wrote:
>
>> Hi Alan, Phil
> [...] I just tried on my CentOS with the latest git
>> code, and what happens
>> is that the execution is always on
>>
>> 12:50:24: Debug: Plot() Yielding
>
> To Pedro and Phil:
>
> @Pedro:
>
> It is good you have checked Phil's latest solution against some of the
> Linux platforms accessible to you, but while waiting for a response
> from him on this infinite Yielding issue you have found on your CentOS
> platform, you might want to check all your Linux platforms to see if
> the issue is confined just to CentOS or not to help give Phil some
> insight as to why his latest solution is not working universally on
> all Linux platforms. And of course when Phil comes up with a fix, it
> would help us a lot if you checked it against all Linux platforms
> accessible to you.
>
> @Phil:
>
> Part of my motivation for responding here is I noticed that Pedro had
> dropped you from the specific recipients list and used an old subject
> line that is no longer relevant.  So you might have missed his post.
> Therefore, I have put your e-mail address back in the recipients list
> and changed the subject line to something more relevant just to make
> sure this infinite Yielding issue gets your immediate attention.  It
> does sound to me like this is a release critical issue, i.e., if it is
> not fixed by our current estimate of the release date (December 27th),
> I should probably hold the release until you do figure out a solution.
>
> Alan
> __
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and 
> Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state
> implementation for stellar interiors (freeeos.sf.net); the Time
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
> software package (plplot.sf.net); the libLASi project
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
> and the Linux Brochure Project (lbproject.sf.net).
> __
>
> Linux-powered Science
> __
> 


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Infinite Yielding issue

2016-12-20 Thread Pedro Vicente
@Alan, Phil


here are my results

for git master current

CentOS 6.8 wxWidgets 3.1
Linux 14.04 wxWidgets 3.0
Linux 16.04 wxWidgets 3.0
Debian 8.0 wxWidgets 3.0

all infinite loop

14:25:57: Debug: wxPLplotwindow::wxPLplotwindow
14:25:57: Debug: frame->Create
14:25:57: Debug: Plot() Yielding
14:25:57: Debug: Plot() Yielding

made with

cmake ..  -G "Unix 
Makefiles" -DCMAKE_INSTALL_PREFIX:PATH=/home/pvn/plplot-install 
-DCMAKE_BUILD_TYPE=Debug 
 -DBUILD_SHARED_LIBS:BOOL=OFF  -DBUILD_TEST=ON -DPLPLOT_WX_DEBUG_OUTPUT=ON

yesterday I sent this result for Ubuntu 14.04, but that was with yesterday's 
master.

Phil, today there was a new commit, so could that be it ?

23:26:43: Debug: wxPLplotwindow::wxPLplotwindow
23:26:44: Debug: frame->Create
23:26:44: Debug: Plot() Yielding
23:26:44: Debug: wxPLplotwindow::OnCreate
23:26:44: Debug: plD_init_wxwidgets(): enter
23:26:44: Debug: wxPLDevice(): enter
23:26:44: Debug: wxPLDevice(): gc done
23:26:44: Debug: wxPLDevice(): m_interactiveTextGcdc done
23:26:44: Debug: wxPLDevice(): SetDC done
23:26:44: Debug: wxPLDevice(): leave
23:26:44: Debug: plD_init_wxwidgets(): leave
23:26:44: Debug: Plot()






- Original Message - 
From: "Alan W. Irwin" 
To: "Phil Rosenberg" ; "Pedro Vicente" 
; "PLplot development list" 

Sent: Tuesday, December 20, 2016 3:10 PM
Subject: Infinite Yielding issue


> On 2016-12-20 13:07-0500 Pedro Vicente wrote:
>
>> Hi Alan, Phil
> [...] I just tried on my CentOS with the latest git
>> code, and what happens
>> is that the execution is always on
>>
>> 12:50:24: Debug: Plot() Yielding
>
> To Pedro and Phil:
>
> @Pedro:
>
> It is good you have checked Phil's latest solution against some of the
> Linux platforms accessible to you, but while waiting for a response
> from him on this infinite Yielding issue you have found on your CentOS
> platform, you might want to check all your Linux platforms to see if
> the issue is confined just to CentOS or not to help give Phil some
> insight as to why his latest solution is not working universally on
> all Linux platforms. And of course when Phil comes up with a fix, it
> would help us a lot if you checked it against all Linux platforms
> accessible to you.
>
> @Phil:
>
> Part of my motivation for responding here is I noticed that Pedro had
> dropped you from the specific recipients list and used an old subject
> line that is no longer relevant.  So you might have missed his post.
> Therefore, I have put your e-mail address back in the recipients list
> and changed the subject line to something more relevant just to make
> sure this infinite Yielding issue gets your immediate attention.  It
> does sound to me like this is a release critical issue, i.e., if it is
> not fixed by our current estimate of the release date (December 27th),
> I should probably hold the release until you do figure out a solution.
>
> Alan
> __
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and 
> Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state
> implementation for stellar interiors (freeeos.sf.net); the Time
> Ephemerides project (timeephem.sf.net); PLplot scientific plotting
> software package (plplot.sf.net); the libLASi project
> (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
> and the Linux Brochure Project (lbproject.sf.net).
> __
>
> Linux-powered Science
> __
> 


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel