Folsk,
I am trying to read a large array from a VME IOC using caget. The
array is 500000 elements, 32-bit integers. EPICS_CA_MAX_ARRAY_BYTES is
set to 2000000 on the IOC, which is “just large enough” to read the
entire array. EPICS_CA_MAX_ARRAY_BYTES is set to 20000000 (10 times
larger than large enough) on the Linux client.
The IOC is running 3.14.12.1.
Here is the output of caget from a Linux client with EPICS 3.14.10,
3.14.11, and 3.14.12.1 when requesting 499000 elements, (1000 fewer than
maximum) which should fit in EPICS_CA_MAX_ARRAY_BYTES.
3.14.10:
corvette:mca/iocBoot/iocVxWorks>date ;
/usr/local/epics/base-3.14.10/bin/linux-x86/caget -#499000 -w20 SIS:3820:mca1
> temp.out ; date
Tue Jun 7 17:03:37 CDT 2011
Tue Jun 7 17:03:38 CDT 2011
3.14.11:
corvette:mca/iocBoot/iocVxWorks>date ;
/usr/local/epics/base-3.14.11/bin/linux-x86/caget -#499000 -w20 SIS:3820:mca1
> temp.out ; date
Tue Jun 7 17:03:55 CDT 2011
Tue Jun 7 17:03:56 CDT 2011
3.14.12.1:
corvette:mca/iocBoot/iocVxWorks>date ;
/usr/local/epics/base-3.14.12.1/bin/linux-x86/caget -#499000 -w20 SIS:3820:mca1
> temp.out ; date
Tue Jun 7 17:04:07 CDT 2011
CA.Client.Exception...............................................
Warning: "The requested
data transfer is greater than available memory or
EPICS_CA_MAX_ARRAY_BYTES"
Context: "op=0, channel=SIS:3820:mca1,
type=DBR_TIME_LONG, count=500000, ctx="server unable to load read (or
subscription update) response into protocol buffer PV="SIS:3820:mca1"
max bytes=2000024""
Source File: ../getCopy.cpp line 92
Current Time: Tue Jun 07
2011 17:04:07.629564143
..................................................................
So on 3.14.10 and 3.14.11 it works as expected, caget is requesting
fewer than the number of bytes that EPICS_CA_MAX_ARRAY_BYTES will allow, and it
succeeds. But it fails on 3.14.12.1. The error message says
count=500000. Is it trying to read all 500000 rather than the number
requested?
The same error happens on 3.14.12.1 even if I try to only read 100
elements:
corvette:mca/iocBoot/iocVxWorks>/usr/local/epics/base-3.14.12.1/bin/linux-x86/caget
-#100 -w20 SIS:3820:mca1
CA.Client.Exception...............................................
Warning: "The requested data transfer is
greater than available memory or EPICS_CA_MAX_ARRAY_BYTES"
Context: "op=0, channel=SIS:3820:mca1,
type=DBR_TIME_LONG, count=500000, ctx="server unable to load read (or
subscription update) response into protocol buffer PV="SIS:3820:mca1"
max bytes=2000024""
Source File: ../getCopy.cpp line 92
Current Time: Tue Jun 07 2011 17:24:56.617989921
..................................................................
I then increased EPICS_CA_MAX_ARRAY_BYTES on the IOC to 2000200, i.e. 200
more than the theoretical minimum number. I then did a caget of the
entire array, and it worked fine on all 3 versions of EPICS base.
corvette:mca/iocBoot/iocVxWorks>date ;
/usr/local/epics/base-3.14.10/bin/linux-x86/caget -w20 SIS:3820:mca1 >
temp.out ; date
Tue Jun 7 17:16:25 CDT 2011
Tue Jun 7 17:16:26 CDT 2011
corvette:mca/iocBoot/iocVxWorks>date ;
/usr/local/epics/base-3.14.11/bin/linux-x86/caget -w20 SIS:3820:mca1 > temp.out
; date
Tue Jun 7 17:16:44 CDT 2011
Tue Jun 7 17:16:45 CDT 2011
corvette:mca/iocBoot/iocVxWorks>date ;
/usr/local/epics/base-3.14.12.1/bin/linux-x86/caget -w20 SIS:3820:mca1 >
temp.out ; date
Tue Jun 7 17:16:55 CDT 2011
Tue Jun 7 17:16:56 CDT 2011
So it looks like there is something wrong with 3.14.12.1 when
EPICS_CA_MAX_ARRAY_BYTES is not large enough for the entire array, even when many
fewer elements are being requested.
Mark