[Plplot-devel] First pass at a public API for libqsastime completed

2009-02-18 Thread Alan W. Irwin
As of revision 9546, I have completed the first pass at a new, more powerful
public API for libqsastime.  This (new) public API is documented in
README.qsastime_API and qsastime.h and largely consists of powerful wrappers
for the internal helper functions which are well-tested by qsastime_test and
qsastime_testlib.  Right now the only transformations available are
Gregorian versus Julian and arbitrary linear transformations of the
continuous time variable.

Immediate future plans include generalizing configqsas so there is an option
to specify the offsets by using broken-down time rather than directly.
(Thanks to Andrew Ross for this suggestion.)

More distant future plans include putting in the transformation (e.g., leap
seconds) between UTC broken-down time and atomic-clock based times such as
TT. Eventually, I plan the default transformation to be UTC broken-down-time
to a continuous TT time in seconds since the TT epoch, but for now the
default transformation (flagged by a zero scale) is Gregorian broken-down
time (with leap seconds ignored) to seconds since the Unix epoch of
1970-01-01 (with leap seconds ignored).

All the helper functions (some of which are tested by qsastime_test and
qsastime_testlib) are now not explicitly visible.  That is, if you use the
-fvisibility=hidden option for gcc, the helper functions will not be
available for linking (which is a good thing since we want to keep them
private).

An issue for libqsastime at the present time is it is not thread safe
because of the global qsasconfig pointer to a QSASConfig struct that
contains all the information necessary to configure the corrections and
linear transformations made to transform between continuous and
broken-down-time (and vice versa).

Ideally, libqsastime should be made thread safe since that makes it much
more useful to users who I assume will be using it independently of PLplot
(which is not thread safe, itself, but that is a separate issue) for
threaded applications on their multi-processor boxes in the future.  I have
read
http://publib.boulder.ibm.com/infocenter/systems/topic/com.ibm.aix.genprogc/doc/genprogc/writing_reentrant_thread_safe_code.htm
which indicates you have to do something special to make libraries with
global data such as global pointers thread-safe, but it doesn't say what.
Could somebody help me with this issue, please?

I have changed plbox.c to use the new public API for libqsastime in a
minimal and rather crude way as a proof of concept.  Everything builds
without issues on my platform and produces identical example 29 results.

Tomorrow I hope to (finally) start (and also finish) implementing a PLplot
public time API for the C language which will be much less crude than what
currently happens in plbox.c. now.  This PLplot API will be based on
configqsas, btimeqsas, ctimeqsas, and strfqsas.  (closeqsas will just be run
automatically whenever we run plend so will not require a PLPlot API to wrap
it).  The new PLplot time API will eventually be propagated to all our
languages, and it will also be used for example 29 so that all the
cross-platform issues we had before with the C library time functions, the
diverse (and sometimes non-existent) time functions for non-C languages, and
the difficulty we had turning off time zone corrections that we didn't want,
will all be solved in a uniform way.  We have been looking forward to
accomplishing that goal for a long time so it is really nice to see it
getting so much closer to hand.

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); PLplot scientific plotting software
package (plplot.org); 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
__

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] time

2009-02-18 Thread Arjen Markus
Hello Terrence,

I do not think it is possible to set an environment variable to an empty
string on Windows. This amounts to undefining it.

I have found the same problem with setenv() and unsetenv() on my
venerable platform (Windows XP, 32 bits, with MSVC 6.0). I will create
a workaround using putenv(), because right now building PLplot stops
on the QSAS test program.

Regards,

Arjen

On 2009-02-14 17:05, trc wrote:
> Hi Alan,
> 
> Alan W. Irwin wrote:
>>> [out of order] 4. qsastime_testlib cannot be built with MSVC 2008 as 
>>> setenv and unsetenv
>>>are not implemented.
>>>
>>> [so] the above changes
>>> are untested.
>> Is this a showstopper for MSVC 2008 or do you think you can find for that
>> platform (a) some library alternatives for setenv and unsetenv, (b) some
>> other alternative to set the time zone to zero temporarily which would make
>> mktime act like an inverse to gmtime, or (c) some other alternative that is
>> equivalent to the Linux timegm or the inverse of gmtime?
>>
> 
> 
> There are too many problems to make qsastime_testlib worthwhile on 32 bit 
> Windows XP with MSVC 2008 (and earlier editions) even with 64 bit time_t 
> values.
> 
> 32 bit Windows XP / MSVC 2008 has extensions for 64 bit time_t values and a 
> function  _mkgmtime64 for converting times a struct tm to 64 bit time_t. 
> Unfortunately mkgmtime64 returns -1 for all times prior to 1/1/1970.
> 
> A further problem for qsastime_testlib is that the MSVC debug version of 
> strftime throws an exception for years less than 0 or greater than . 
> 
> For the record MSVC has the (unix) putenv function which can be used to 
> implement setenv and unsetenv. However googling putenv suggests there could 
> be problems with memory leaks and care has to be taken over 
> ownership/lifetime of the environment variables. Further it is unclear how an 
> environment variable is set to empty string. eg. 
>setenv("TZ","",1) -> putenv("TZ=")
> This unsets TZ rather than setting it to an empty string.
>  
> 
> Default 32 bit Cygwin compiles and links but has 32 bit time_t so testing is 
> not done. I didn't investigate if there were 64bit time_t extensions.
> 
> Note my investigations were on a 32bit Windows XP system so this excludes 32 
> bit Vista and 64bit versions of XP and Vista.
> 
> 
> Terrence
> 
> 
> 
>   
> 
> --
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> ___
> Plplot-devel mailing list
> Plplot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/plplot-devel
> 


Delft Hydraulics, GeoDelft, the Subsurface and Groundwater unit of TNO and 
parts of Rijkswaterstaat have joined forces in a new independent institute for 
delta technology, Deltares. Deltares combines knowledge and experience in the 
field of water, soil and the subsurface. We provide innovative solutions to 
make living in deltas, coastal areas and river basins safe, clean and 
sustainable. 

 

DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited.
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.





--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


[Plplot-devel] [Patch] msvc installation problem

2009-02-18 Thread Mark de Wever
Hi,

When I installed plplot (svn trunk) with msvc 2008 I couldn't use plplot due
to a missing header for msvc. The attached patch fixes the problem.

Regards,
Mark de Wever


msvc_cmake.patch
Description: Binary data
--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Google Summer of Code

2009-02-18 Thread Alan W. Irwin
On 2009-02-17 22:24-0500 Hezekiah M. Carty wrote:

> On Tue, Feb 17, 2009 at 4:59 PM, Werner Smekal  
> wrote:
>> should we apply for Google summer of Code?
>>
>> http://code.google.com/soc/2008/
>>
>> what we need are good ideas, mentors and students who are willing to
>> write code.
>>
>> Just an idea, this could be a chance to improve PLplot considerably.
>
> I don't know if this would be outside of the scope of a Summer of Code
> project, but one of the TODO items I noticed when I started working
> with PLplot (thought I can't find it now) is making a switch from
> short integers to floating point values for the internal
> representation of data.  This, or something to start progress toward
> this, may be a good (if large) project.  It could focus on just the
> library internals and one output driver.  Postscript may be a good
> target for a reference driver since it is currently used for output
> testing.  The other drivers and plotting functions could be adapted
> after the SoC project if needed.
>
> A simpler project would be a suite of high-level functions: color
> bars, box and whisker plots, etc.  Some more 3D plotting might be
> possible as well, such as a 3D plimage-like function or general 3D
> solids (examples from OpenDX at [1] and [2]).
>
> The ability to rasterize specific plot function(s) in vector file
> formats would be useful in some cases as well.  Example 20 is a good
> case for this as, in its current form, its Postscript output is
> enormous.  This process is fairly simple for Cairo devices (I've sent
> a separate email about this), but it would be nice if the non-Cairo
> PS, PDF and SVG devices could support this.
>
> I think the short to PLFLT (or some other float/double #define'd type)
> conversion would be quite useful and could potentially simplify areas
> of PLplot's internals.  I don't know how realistic it would be to
> complete, or at least make a reasonable start, on a change like this.
>
> Hez
>
> [1] - http://www.opendx.org/inaction/weather/images/original/class4.jpg
> [2] - 
> http://www.opendx.org/inaction/astronomy/images/original/radio_sphere.jpg
>

I would love to see an option for double (64-bit floating point) internal
representation of positions in PLplot.  However, that might be difficult
for the SoC developer to finish.

A presumably less difficult project would be to use our existing swig
infrastructure to implement another language similar to what Werner just did
for lua.  That allows the SoC student to work with their favorite language
(if we have not implemented that language yet).

Getting back to Werner's original question, I think it is an excellent idea 
to apply to Google as a potential mentoring organization for a SoC project.
However, there are some "time/effort" costs involved.  According to
http://code.google.com/opensource/gsoc/2009/faqs.html (a more relevant URL
than the one above) the application and especially the preparation process
(i.e., putting together an SoC Ideas page) is non-trivial, and the mentoring
organization deadline is coming up in a few weeks.  Also, if our application
was successful, the time spent mentoring a SoC developer is non-trivial
(figure on 5 hours a week according to the faq although that value varies
quite a bit).  Werner, would you be willing to take on the
responsibility/leadership for preparing the application and also convincing
other developers to officially sign on for mentoring the SoC developer(s) if
the application is successful?

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); PLplot scientific plotting software
package (plplot.org); 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
__

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] [Patch] msvc installation problem

2009-02-18 Thread Werner Smekal
Hi  Mark,

thanks for the patch. Commited to svn.

Best Regards,
Werner Smekal

On 18.02.2009, at 09:49, Mark de Wever wrote:

> Hi,
>
> When I installed plplot (svn trunk) with msvc 2008 I couldn't use  
> plplot due
> to a missing header for msvc. The attached patch fixes the problem.
>
> Regards,
> Mark de Wever
> < 
> msvc_cmake 
> .patch 
> > 
> --
> Open Source Business Conference (OSBC), March 24-25, 2009, San  
> Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the  
> Enterprise
> -Strategies to boost innovation and cut costs with open source  
> participation
> -Receive a $600 discount off the registration fee with the source  
> code: SFAD
> http://p.sf.net/sfu/XcvMzF8H___
> Plplot-devel mailing list
> Plplot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/plplot-devel

--
Dr. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: sme...@iap.tuwien.ac.at
web: http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office), +43-(0)1-58801-13469 (laboratory)
fax: +43-(0)1-58801-13499


--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Google Summer of Code

2009-02-18 Thread Andrew Ross
On Wed, Feb 18, 2009 at 01:21:33AM -0800, Alan Irwin wrote:
> On 2009-02-17 22:24-0500 Hezekiah M. Carty wrote:
> 
> > On Tue, Feb 17, 2009 at 4:59 PM, Werner Smekal  
> > wrote:
> >> should we apply for Google summer of Code?
> >>
> >> http://code.google.com/soc/2008/
> >>
> >> what we need are good ideas, mentors and students who are willing to
> >> write code.
> >>
> >> Just an idea, this could be a chance to improve PLplot considerably.
> >
> > I don't know if this would be outside of the scope of a Summer of Code
> > project, but one of the TODO items I noticed when I started working
> > with PLplot (thought I can't find it now) is making a switch from
> > short integers to floating point values for the internal
> > representation of data.  This, or something to start progress toward
> > this, may be a good (if large) project.  It could focus on just the
> > library internals and one output driver.  Postscript may be a good
> > target for a reference driver since it is currently used for output
> > testing.  The other drivers and plotting functions could be adapted
> > after the SoC project if needed.
> >
> > A simpler project would be a suite of high-level functions: color
> > bars, box and whisker plots, etc.  Some more 3D plotting might be
> > possible as well, such as a 3D plimage-like function or general 3D
> > solids (examples from OpenDX at [1] and [2]).
> >
> > The ability to rasterize specific plot function(s) in vector file
> > formats would be useful in some cases as well.  Example 20 is a good
> > case for this as, in its current form, its Postscript output is
> > enormous.  This process is fairly simple for Cairo devices (I've sent
> > a separate email about this), but it would be nice if the non-Cairo
> > PS, PDF and SVG devices could support this.
> >
> > I think the short to PLFLT (or some other float/double #define'd type)
> > conversion would be quite useful and could potentially simplify areas
> > of PLplot's internals.  I don't know how realistic it would be to
> > complete, or at least make a reasonable start, on a change like this.
> >
> > Hez
> >
> > [1] - http://www.opendx.org/inaction/weather/images/original/class4.jpg
> > [2] - 
> > http://www.opendx.org/inaction/astronomy/images/original/radio_sphere.jpg
> >
> 
> I would love to see an option for double (64-bit floating point) internal
> representation of positions in PLplot.  However, that might be difficult
> for the SoC developer to finish.
> 
> A presumably less difficult project would be to use our existing swig
> infrastructure to implement another language similar to what Werner just did
> for lua.  That allows the SoC student to work with their favorite language
> (if we have not implemented that language yet).
> 
> Getting back to Werner's original question, I think it is an excellent idea 
> to apply to Google as a potential mentoring organization for a SoC project.
> However, there are some "time/effort" costs involved.  According to
> http://code.google.com/opensource/gsoc/2009/faqs.html (a more relevant URL
> than the one above) the application and especially the preparation process
> (i.e., putting together an SoC Ideas page) is non-trivial, and the mentoring
> organization deadline is coming up in a few weeks.  Also, if our application
> was successful, the time spent mentoring a SoC developer is non-trivial
> (figure on 5 hours a week according to the faq although that value varies
> quite a bit).  Werner, would you be willing to take on the
> responsibility/leadership for preparing the application and also convincing
> other developers to officially sign on for mentoring the SoC developer(s) if
> the application is successful?

One other project would be to revamp the octave native bindings and bring them 
into line
with the latest octave 3.0 / matlab syntax. This is quite a big job as it 
involves a
change in philosophy, but it would be a potentially great boost for plplot on 
octave.
It's on my to-do list but time is always an issue. One area in which octave is 
well
behind matlab is in graphics handling. Gnuplot (the default way to get 
graphics) is not
really up to the job, particularly for things like contour plotting. Plplot 
really could
provide a valuable alternative. 

Another thing would be to make plplot NaN aware. This would be really useful. 
Currently
plotting data with NaNs in produces messy results or crashes depending on the 
routine. 

We should probably gather all these ideas on the wiki wishlist anyway for future
reference.

Andrew

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___

Re: [Plplot-devel] time

2009-02-18 Thread trc
Hi,


Arjen Markus wrote:

> I have found the same problem with setenv() and unsetenv() on my
> venerable platform (Windows XP, 32 bits, with MSVC 6.0). I will create
> a workaround using putenv(), because right now building PLplot stops
> on the QSAS test program.
>

In case you haven't created the work round (and apologies for not sending it 
earlier) please find a limited patch for implementing setenv for MSVC. 
 
This patch does not use CMake to configure the optional code instead relying on 
Compiler and in source Macros for configuration.

With this patch MSVC 2008 version of qsastime produces 


sizeof(time_t) = 8
sizeof(int) = 4
0x
Test 01 of calendar dates in the vicinity of the JD epoch

Start of Julian proleptic inner test
input and output (strfMJD) date/time
-4717-01-01T12:00:00.000Z
-4717-01-01T12:00:00.0Z
setFromUT JD =-1826. days
Start of Gregorian proleptic inner test
input and output (strftime), and output (strfMJD) date/time
-4717-01-01T12:00:00.000Z
setFromUT secs_past_epoch = -211021243200 seconds
my_timegm secs_past_epoch = -1 seconds
delta secs_past_epoch = -567845695 seconds
test failed with inconsistency between setFromUT and my_timegm



Terrence


  

add_msvc_setenv.patch
Description: Binary data
--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] time

2009-02-18 Thread Arjen Markus
Hi Terrence,

with this patch in hand, I can concentrate on adding a test to the CMake 
files.

Thanks,

Arjen

On 2009-02-18 15:11, trc wrote:
> Hi,
> 
> 
> Arjen Markus wrote:
> 
>> I have found the same problem with setenv() and unsetenv() on my
>> venerable platform (Windows XP, 32 bits, with MSVC 6.0). I will create
>> a workaround using putenv(), because right now building PLplot stops
>> on the QSAS test program.
>>
> 
> In case you haven't created the work round (and apologies for not sending it 
> earlier) please find a limited patch for implementing setenv for MSVC. 
>  
> This patch does not use CMake to configure the optional code instead relying 
> on Compiler and in source Macros for configuration.
> 
> With this patch MSVC 2008 version of qsastime produces 
> 
> 
> sizeof(time_t) = 8
> sizeof(int) = 4
> 0x
> Test 01 of calendar dates in the vicinity of the JD epoch
> 
> Start of Julian proleptic inner test
> input and output (strfMJD) date/time
> -4717-01-01T12:00:00.000Z
> -4717-01-01T12:00:00.0Z
> setFromUT JD =-1826. days
> Start of Gregorian proleptic inner test
> input and output (strftime), and output (strfMJD) date/time
> -4717-01-01T12:00:00.000Z
> setFromUT secs_past_epoch = -211021243200 seconds
> my_timegm secs_past_epoch = -1 seconds
> delta secs_past_epoch = -567845695 seconds
> test failed with inconsistency between setFromUT and my_timegm
> 
> 
> 
> Terrence
> 
> 
>   


Delft Hydraulics, GeoDelft, the Subsurface and Groundwater unit of TNO and 
parts of Rijkswaterstaat have joined forces in a new independent institute for 
delta technology, Deltares. Deltares combines knowledge and experience in the 
field of water, soil and the subsurface. We provide innovative solutions to 
make living in deltas, coastal areas and river basins safe, clean and 
sustainable. 

 

DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited.
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.





--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] [Patch] msvc installation problem

2009-02-18 Thread Alan W. Irwin
On 2009-02-18 10:36+0100 Werner Smekal wrote:

> Hi  Mark,
>
> thanks for the patch. Commited to svn.

Hi Werner:

For those (like me) who do not understand Windows that well, what is the
purpose of dirent_msvc.h?  I assume it is automatically generated, but does
that automatic generation only occur in the build-tree include directory or
do we have to worry about installation of automatically generated Windows
headers for other build-tree directories as well?

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); PLplot scientific plotting software
package (plplot.org); 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
__

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] [Patch] msvc installation problem

2009-02-18 Thread Werner Smekal
Hi Alan,

> For those (like me) who do not understand Windows that well, what is  
> the
> purpose of dirent_msvc.h?  I assume it is automatically generated,  
> but does
> that automatic generation only occur in the build-tree include  
> directory or
> do we have to worry about installation of automatically generated  
> Windows
> headers for other build-tree directories as well?

The purpose is to provide the dirent functionality which is provided  
by glibc (or similar) so available for gcc (and also mingw) for Visual  
C++, which doesn't have this. plcore.c needs that to browse through a  
directory to search for available dynamic drivers which are then  
opened via libtdl or the interface I wrote for windows. Thinking about  
that, it's actually not needed at all in the install tree, but  
plplotP.h is also in the install tree and there dirent_msvc.h is  
included. Maybe it makes sense to move the whole #if HAVE_DIRENT_H/ 
#endif block to plcore.c since I think we don't need it anywhere else.  
Read also the dirent_msvc.h in plplot/include for license etc.

Regards,
Werner

>
>
> 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); PLplot scientific plotting  
> software
> package (plplot.org); 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
> __
>
> --
> Open Source Business Conference (OSBC), March 24-25, 2009, San  
> Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the  
> Enterprise
> -Strategies to boost innovation and cut costs with open source  
> participation
> -Receive a $600 discount off the registration fee with the source  
> code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> ___
> Plplot-devel mailing list
> Plplot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/plplot-devel

--
Dr. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: sme...@iap.tuwien.ac.at
web: http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office), +43-(0)1-58801-13469 (laboratory)
fax: +43-(0)1-58801-13499


--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] time

2009-02-18 Thread Alan W. Irwin
On 2009-02-18 14:11- trc wrote:

> Hi,
>
>
> Arjen Markus wrote:
>
>> I have found the same problem with setenv() and unsetenv() on my
>> venerable platform (Windows XP, 32 bits, with MSVC 6.0). I will create
>> a workaround using putenv(), because right now building PLplot stops
>> on the QSAS test program.
>>
>
> In case you haven't created the work round (and apologies for not sending it 
> earlier) please find a limited patch for implementing setenv for MSVC.
>
> This patch does not use CMake to configure the optional code instead relying 
> on Compiler and in source Macros for configuration.
>

Thanks, Terrence, for this setenv patch for MSVC.

Arjen, I would appreciate it if you review this patch to make sure it works
for all Windows cases and then commit it.  That should at least allow the
windows build (originally broken by me, and sorry about that) to work again.
There is some urgency to the commit because some additional Windows users
beyond you and Werner are attempting to build from our svn version.

> With this patch MSVC 2008 version of qsastime[_testlib] produces

>
>
> sizeof(time_t) = 8
> sizeof(int) = 4
> 0x
> Test 01 of calendar dates in the vicinity of the JD epoch
>
> Start of Julian proleptic inner test
> input and output (strfMJD) date/time
> -4717-01-01T12:00:00.000Z
> -4717-01-01T12:00:00.0Z
> setFromUT JD =-1826. days
> Start of Gregorian proleptic inner test
> input and output (strftime), and output (strfMJD) date/time
> -4717-01-01T12:00:00.000Z

Comparison with qsastime_testlib.out_standard shows all is well up to
here except for the above 0x which I assume is a spin-off of trying
to put 0x on stdin for the programme on Windows rather than the
echo 0x | lib/qsastime/qsastime_testlib method that works on Linux.

> setFromUT secs_past_epoch = -211021243200 seconds

To double-check this calculation (which does not appear on
qsastime_testlib.out_standard since that Linux calculation had no errors),
MJD = JD - 240.5 so the Gregorian epoch JD (from
qsastime_testlib.out_standard since you didn't get that far) of -1788
corresponds to MJD = -2401788.5 days since the MJD epoch. But the Unix epoch
of 1970-01-01 has an MJD of 40587 so this corresponds to -2442375.5 days
since the Unix epoch or -211021243200.0 seconds since the Unix epoch which
confirms the above calculation.

> my_timegm secs_past_epoch = -1 seconds

That is the source of the error.  On your platform, my_timegm only works as
well as the C library mktime routine which currently claims that 4718-01-01
BCE (Gregorian proleptic calendar) is only 1 second before the Unix epoch of
1970-01-01.  So once your patch or something similar is applied, the next
step is to see if there are any Windows platforms where mktime gives a
correct result for years before the Unix epoch.

> delta secs_past_epoch = -567845695 seconds

This does not represent the difference of the two previous time_t values
like it should.  I have now fixed (revision 9549) the output formatting so
the resulting difference of time_t values reported here can have time_t
range rather than int range (which overflowed in this case giving the
bad delta secs_past_epoch result above).

In sum, the next step here is to get the patch tested, revised (if
necessary), and committed as a matter of some urgency since it makes the
windows build work again.  The next step after that is to try and find some
windows platform where mktime (and therefore my_timegm) works for epochs
before the Unix epoch.

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); PLplot scientific plotting software
package (plplot.org); 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
__

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] [Patch] msvc installation problem

2009-02-18 Thread Alan W. Irwin
On 2009-02-18 18:36+0100 Werner Smekal wrote:

> Hi Alan,
>
>> For those (like me) who do not understand Windows that well, what is the
>> purpose of dirent_msvc.h?  I assume it is automatically generated, but does
>> that automatic generation only occur in the build-tree include directory or
>> do we have to worry about installation of automatically generated Windows
>> headers for other build-tree directories as well?
>
> The purpose is to provide the dirent functionality which is provided by glibc 
> (or similar) so available for gcc (and also mingw) for Visual C++, which 
> doesn't have this. plcore.c needs that to browse through a directory to 
> search for available dynamic drivers which are then opened via libtdl or the 
> interface I wrote for windows. Thinking about that, it's actually not needed 
> at all in the install tree,

Is that really correct?  The reason I ask, is I presume a similar search has
to be made in the install tree in $prefix/lib/plplot5.9.2/driversd/ to
search for available installed dynamic drivers.

> ... but plplotP.h is also in the install tree and 
> there dirent_msvc.h is included. Maybe it makes sense to move the whole #if 
> HAVE_DIRENT_H/#endif block to plcore.c since I think we don't need it 
> anywhere else. Read also the dirent_msvc.h in plplot/include for license etc.

Thanks for that information, and sorry I did not realize this file was
already in the include subdirectory of our source tree rather than being
automatically generated like I assumed above.  I like the fact this windows
functionality is isolated in its own header file so I hope there is some
alternative (to the current install tree fix if you need to change it) that
preserves that isolation.

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); PLplot scientific plotting software
package (plplot.org); 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
__

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] [Patch] msvc installation problem

2009-02-18 Thread Werner Smekal
Hi Alan,

>>
>> The purpose is to provide the dirent functionality which is  
>> provided by glibc (or similar) so available for gcc (and also  
>> mingw) for Visual C++, which doesn't have this. plcore.c needs that  
>> to browse through a directory to search for available dynamic  
>> drivers which are then opened via libtdl or the interface I wrote  
>> for windows. Thinking about that, it's actually not needed at all  
>> in the install tree,
>
> Is that really correct?  The reason I ask, is I presume a similar  
> search has
> to be made in the install tree in $prefix/lib/plplot5.9.2/driversd/ to
> search for available installed dynamic drivers.

Sure, but the code is already compiled in plplotd.so, so there is no  
need for the header file. This would be necessary if using plplot  
would need the dirent stuff (e.g. a function returns such a dirent  
struct), but since it's only needed internally (at least I think so),  
I think we could move that section into plcore.h. I'll investigate that.

Regards,
Werner


--
Dr. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: sme...@iap.tuwien.ac.at
web: http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office), +43-(0)1-58801-13469 (laboratory)
fax: +43-(0)1-58801-13499


--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


[Plplot-devel] [ plplot-Bugs-2614228 ] Default PLplot library names should not end in "d"

2009-02-18 Thread SourceForge.net
Bugs item #2614228, was opened at 2009-02-18 23:36
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102915&aid=2614228&group_id=2915

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Robert Pollak (jondo)
Assigned to: Nobody/Anonymous (nobody)
Summary: Default PLplot library names should not end in "d"

Initial Comment:
Me and my coworkers first thought that this "d" is for "debug build", while it 
really means "double-precision" (see 
http://www.mail-archive.com/plplot-devel@lists.sourceforge.net/msg01929.html).

I propose to use the names without "d" for the double-precision build, since it 
is the default, and the ending "f" for the single-precision build.


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=102915&aid=2614228&group_id=2915

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] time

2009-02-18 Thread Arjen Markus
Hi Alan,

I will take care of it tonight.

The test I have in mind is:
- Check if a program can be built using both setenv() and unsetenv()
- If not, then fall back on putenv() as in the patch

I assume that these functions come in pairs, so that it won't be
necessary to test them separately.

First priority: get it working again.

Regards,

Arjen


On 2009-02-18 20:25, Alan W. Irwin wrote:
> On 2009-02-18 14:11- trc wrote:
> 
>> Hi,
>>
>>
>> Arjen Markus wrote:
>>
>>> I have found the same problem with setenv() and unsetenv() on my
>>> venerable platform (Windows XP, 32 bits, with MSVC 6.0). I will create
>>> a workaround using putenv(), because right now building PLplot stops
>>> on the QSAS test program.
>>>
>>
>> In case you haven't created the work round (and apologies for not 
>> sending it earlier) please find a limited patch for implementing 
>> setenv for MSVC.
>>
>> This patch does not use CMake to configure the optional code instead 
>> relying on Compiler and in source Macros for configuration.
>>
> 
> Thanks, Terrence, for this setenv patch for MSVC.
> 
> Arjen, I would appreciate it if you review this patch to make sure it works
> for all Windows cases and then commit it.  That should at least allow the
> windows build (originally broken by me, and sorry about that) to work 
> again.
> There is some urgency to the commit because some additional Windows users
> beyond you and Werner are attempting to build from our svn version.
> 
>> With this patch MSVC 2008 version of qsastime[_testlib] produces
> 
>>
>>
>> sizeof(time_t) = 8
>> sizeof(int) = 4
>> 0x
>> Test 01 of calendar dates in the vicinity of the JD epoch
>>
>> Start of Julian proleptic inner test
>> input and output (strfMJD) date/time
>> -4717-01-01T12:00:00.000Z
>> -4717-01-01T12:00:00.0Z
>> setFromUT JD =-1826. days
>> Start of Gregorian proleptic inner test
>> input and output (strftime), and output (strfMJD) date/time
>> -4717-01-01T12:00:00.000Z
> 
> Comparison with qsastime_testlib.out_standard shows all is well up to
> here except for the above 0x which I assume is a spin-off of trying
> to put 0x on stdin for the programme on Windows rather than the
> echo 0x | lib/qsastime/qsastime_testlib method that works on Linux.
> 
>> setFromUT secs_past_epoch = -211021243200 seconds
> 
> To double-check this calculation (which does not appear on
> qsastime_testlib.out_standard since that Linux calculation had no errors),
> MJD = JD - 240.5 so the Gregorian epoch JD (from
> qsastime_testlib.out_standard since you didn't get that far) of -1788
> corresponds to MJD = -2401788.5 days since the MJD epoch. But the Unix 
> epoch
> of 1970-01-01 has an MJD of 40587 so this corresponds to -2442375.5 days
> since the Unix epoch or -211021243200.0 seconds since the Unix epoch which
> confirms the above calculation.
> 
>> my_timegm secs_past_epoch = -1 seconds
> 
> That is the source of the error.  On your platform, my_timegm only works as
> well as the C library mktime routine which currently claims that 4718-01-01
> BCE (Gregorian proleptic calendar) is only 1 second before the Unix 
> epoch of
> 1970-01-01.  So once your patch or something similar is applied, the next
> step is to see if there are any Windows platforms where mktime gives a
> correct result for years before the Unix epoch.
> 
>> delta secs_past_epoch = -567845695 seconds
> 
> This does not represent the difference of the two previous time_t values
> like it should.  I have now fixed (revision 9549) the output formatting so
> the resulting difference of time_t values reported here can have time_t
> range rather than int range (which overflowed in this case giving the
> bad delta secs_past_epoch result above).
> 
> In sum, the next step here is to get the patch tested, revised (if
> necessary), and committed as a matter of some urgency since it makes the
> windows build work again.  The next step after that is to try and find some
> windows platform where mktime (and therefore my_timegm) works for epochs
> before the Unix epoch.
> 
> 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); PLplot scientific plotting software
> package (plplot.org); 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
> __
> 


Delft Hydraulics, GeoDelft, the Subsurface and Groundwater unit of TNO and 
parts of Rijkswaterstaat have joined forces in a new independent institute for 
delta technology, Deltares. Deltares combines knowledge and experience in the 
field of water, soil and the subsurface. We provide innovative solu