EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Handling of a character waveform of 64k elements
From: Ritesh Sugandhi <[email protected]>
To: Matt Newville <[email protected]>
Cc: Di Maio Franck <[email protected]>, [email protected]
Date: Thu, 28 Apr 2011 17:41:32 +0200
Dear Sir,

thanks for your simulation , it helped me to do some more further investigation.
 
The environment  is as below : The client and server on running on same environment loaded with RHEL 5.5 for 64 bit and kernal version 2.6. running EPICS version 3.14.12.1.

The server side is loaded with Character waveform record with NELM=65536 and FTVL=UCHAR

First I  put  following setting at both server and client end

export EPICS_CA_MAX_ARRAY_BYTES=65536
$ caget Py:char64k
Py:char64k                     *** CA error Invalid element count requested

So I l upgraded the ARRAY BYTES count and get the same message.

$export EPICS_CA_MAX_ARRAY_BYTES=90000
$ caget Py:char64k
Py:char64k                     *** CA error Invalid element count requested

Now , So I lower down the size to NLEM=65535,and kept the EPICS_CA_MAX_ARRAY_BYTES=90000 Now I receive the following output

$ caget Py:char64k | more
CA.Client.Exception...............................................
    Warning: "The requested data transfer is greater than available memory or EPICS_CA_MAX_ARRAY_BYTES"
    Context: "op=0, channel=Py:char64k, type=DBR_TIME_CHAR, count=65535, ctx="server unable to load read (or subscription update) response into protocol buffer PV="Py:char64k" max bytes=65560""
    Source File: ../getCopy.cpp line 92
    Current Time: Thu Apr 28 2011 17:31:05.277255000
..................................................................
Read operation timed out: some PV data was not read.
Py:char64k 65535 0 0 0 0 0 0 0 0...... 0 0 0 
 
I could not figure out the error.

any suggestion or comments are welcomed.

Best regards,

Ritesh Sugandhi


On Thu, Apr 28, 2011 at 4:38 PM, Matt Newville <[email protected]> wrote:
Hi Ritesh,

In the best approximation of trying to reproduce this problem, I see
different behavior.

On 64-bit linux (fedora core 14, x86_64) with Epics Base 3.14.12.1, I
see from the command line:

  ~> export EPICS_CA_MAX_ARRAY_BYTES-65536 ; caget Py:char64k

works (Py:char64k having native_type=DBF_CHAR, element_count=65336).
In fact, I see

  ~> export EPICS_CA_MAX_ARRAY_BYTES=65528 ; caget Py:char64k

works, while

  ~> export EPICS_CA_MAX_ARRAY_BYTES=65527 ; caget Py:char64k

gives the message that EPICS_CA_MAX_ARRAY_BYTES is too small.  I get
the same results on 32-bit linux and 32-bit windows.

With Python (testing with Python 3.1 and 2.6), I see similar behavior,
though oddly EPICS_CA_MAX_ARRAY_BYTES works down to 65313 (on 64-bit
linux, 32-bit linux, and 32-bit windows), perhaps due to some details
of memory allocation that should not be relied upon.

I'm sure that working below or right at this threshold is not
recommended, and that setting EPICS_CA_MAX_ARRAY_BYTES somewhat higher
than you think you really need is the safer option.  On the client end
(especially a 64 bit linux machine), I would think that setting
EPICS_CA_MAX_ARRAY_BYTES to twice what you think you need is
reasonable.

It does seem that you're working hard at pushing on these and other
limits of Channel Access libraries (especially python) and reporting
problems without giving very full reports of what does work.  For
example, what value of EPICS_CA_MAX_ARRAY_BYTES does work for you?
Did you test the basic command line caget as well as your python
script -- this would help very much in isolating the issue.

Finally, it seems you're putting a lot of effort into testing the CA
python libraries. Would you be willing to work on these libraries?

Cheers,

--Matt


Replies:
Re: Handling of a character waveform of 64k elements Andrew Johnson
References:
Handling of a character waveform of 64k elements Ritesh Sugandhi
Re: Handling of a character waveform of 64k elements Matt Newville

Navigate by Date:
Prev: Re: regarding CaChannel v1.6 handling of dynamic subarrays Matt Newville
Next: Re: regarding CaChannel v1.6 handling of dynamic subarrays Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Handling of a character waveform of 64k elements Matt Newville
Next: Re: Handling of a character waveform of 64k elements Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·