1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 <2019> 2020 2021 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 <2019> 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: ADpython issues with openCV |
From: | "ulrik.pedersen--- via Tech-talk" <[email protected]> |
To: | "[email protected]" <[email protected]>, "[email protected]" <[email protected]>, "[email protected]" <[email protected]> |
Cc: | "EPICS Tech-Talk \([email protected]\)" <[email protected]> |
Date: | Wed, 3 Apr 2019 10:37:54 +0000 |
Hi Sandeep, The ‘killable_workers’ branch is a bit old and have not been updated to work with ADCore version 3-X. See release notes[1] about how processCallbacks() have changed from version 3 onwards.
You could probably update your local copy of the ‘killable_workers’ branch to work with ADCore 3 by simply merging the master branch into it. (I see that you’re at RAL so feel free to give us a ring and pop over for a visit) Cheers, Ulrik [1]:
https://github.com/areaDetector/ADCore/blob/master/RELEASE.md#r3-0-may-5-2017
From: [email protected] <[email protected]>
On Behalf Of sandeep-kumar.malu--- via Tech-talk Hi Bryan Thanks for the suggestion. I tried this adPython branch
: https://github.com/dls-controls/adPython/tree/killable_workers. I was able to make it with necessary changes in
configure/RELEASE file. When I make my IOC (mentioned in my previous mail), I get error - ..lib/linux-x86_64/libadPython.so: undefined reference to `NDPluginDriver::processCallbacks(NDArray*)' . With the same IOC switching to adPython master branch does not
encounter this problem though it hangs with openCV function usage. Any idea how to fix this? Many Thanks Sandeep Malu From: Tester, Bryan (DLSLtd,RAL,LSCI) <[email protected]>
Hi, The work I've been doing on adPython is located here:
https://github.com/dls-controls/adPython/tree/killable_workers. As Tom mentioned it incorporates the change to how the GIL is acquired and released, in addition to significantly changing how the actual processing is done; the processArray function is now called
in a python multiprocessing worker process, and the main thread waits on the result in a queue (as such if the main thread no longer gets locked up if processArray fails for some way).
May be worth checking out this version of adPython and seeing if this helps things? Thanks, Bryan From: Cobb, Tom (DLSLtd,RAL,LSCI) Hi Sandeep, This sounds very similar to an issue that Lewis (copied) had. processArray() would be called, but as soon as it called an openCV function then it hung there. For Lewis, changing the
datatype from Int8 to UInt8 fixed things. Lewis also had some suggestions to do with using GIL Ensure and Release rather than SaveThread and RestoreThread in
https://github.com/dls-controls/adPython/pull/9 which Bryan (also copied) is looking
at merging, but we weren’t convinced those were contributing to the problem. To continue debugging, I suggest you try an IOC with a simDetector, then change the datatype to UInt8 or UInt16 and see if that works. You can also try putting a debug statement in
to print the array you are passed to check what datatype it is. You could also try throwing away the array processArray() is passed, making your own, and passing that to the OpenCV library to see if that works. Thanks, Tom From: Malu, Sandeep Kumar (-,RAL,CLF) <[email protected]>
Hi Tom Thank you for the help. On putting debug before add(), it display message once. On checking data type with PV- CAM:cam1:DataType_RBV , it reads UInt8. Is this I need to confirm? Where exactly I need to mention UInt8 for NDArray? Many Thanks Sandeep Malu Sent from Workspace ONE Boxer On 01-Apr-2019 3:37 PM, "Cobb, Tom (DLSLtd,RAL,LSCI)" <[email protected]> wrote:
-- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. |