<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-AU" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">I have used the bootstrap method to build cctbx with my own Python (in a virtual environment). I setup my virtual environment, then source $CCTBX/build/setpaths.sh (bash).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am currently trying to turn a detector image (uint16) read in with fabio, which results in a numpy ndarray, and then turn that into a scitbx flex array. Since I’ve had problems doing this in my system, I’ve written a little script that
reproduces the problem:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">**********<o:p></o:p></p>
<p class="MsoNormal">import fabio<o:p></o:p></p>
<p class="MsoNormal">file=fabio.open('testcrystal_1_001.img') # adsc detector image<o:p></o:p></p>
<p class="MsoNormal">file.data[0]<o:p></o:p></p>
<p class="MsoNormal">from scitbx.array_family import flex<o:p></o:p></p>
<p class="MsoNormal">flex.int(file.data[3071]) # this is a 3072x3072 image. For some reason, row 0 causes no problems.<o:p></o:p></p>
<p class="MsoNormal">**********<o:p></o:p></p>
<p class="MsoNormal">At the end of this email is the stack trace I get.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Has anybody had similar issues? I first saw this when I was trying to convert the entire image into a flex array, but now I’ve seen it with only one row [3071], while still working for [0:1500], so it doesn’t seem like a simple memory issue.
Any help would be appreciated.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Jun Aishima<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">**********<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">show_stack(1): <stdin>(1) <module><o:p></o:p></p>
<p class="MsoNormal">libc backtrace (23 frames, most recent call last):<o:p></o:p></p>
<p class="MsoNormal"> /home/aishimaj/spotter/bin/python() [0x414199]<o:p></o:p></p>
<p class="MsoNormal"> /lib64/libc.so.6(__libc_start_main+0xfd) [0x366d21ed5d]<o:p></o:p></p>
<p class="MsoNormal"> /home/aishimaj/spotter/bin/python(Py_Main+0xb22) [0x4150b2]<o:p></o:p></p>
<p class="MsoNormal"> /home/aishimaj/spotter/bin/python(PyRun_AnyFileExFlags+0x6b) [0x4ce82b]<o:p></o:p></p>
<p class="MsoNormal"> /home/aishimaj/spotter/bin/python(PyRun_InteractiveLoopFlags+0x4e) [0x4ce01e]<o:p></o:p></p>
<p class="MsoNormal"> /home/aishimaj/spotter/bin/python(PyRun_InteractiveOneFlags+0x1ff) [0x4cdd9f]<o:p></o:p></p>
<p class="MsoNormal"> /home/aishimaj/spotter/bin/python(PyEval_EvalCode+0x32) [0x4ad362]<o:p></o:p></p>
<p class="MsoNormal"> /home/aishimaj/spotter/bin/python(PyEval_EvalCodeEx+0x877) [0x4ad257]<o:p></o:p></p>
<p class="MsoNormal"> /home/aishimaj/spotter/bin/python(PyEval_EvalFrameEx+0x6a0b) [0x4aa8bb]<o:p></o:p></p>
<p class="MsoNormal"> /home/aishimaj/spotter/bin/python(PyObject_Call+0x47) [0x419ba7]<o:p></o:p></p>
<p class="MsoNormal"> /home/aishimaj/spotter/bin/python() [0x46df9f]<o:p></o:p></p>
<p class="MsoNormal"> /home/aishimaj/spotter/bin/python() [0x47623f]<o:p></o:p></p>
<p class="MsoNormal"> /home/aishimaj/spotter/bin/python(PyObject_Call+0x47) [0x419ba7]<o:p></o:p></p>
<p class="MsoNormal"> /home/aishimaj/spotter/bin/python() [0x42296f]<o:p></o:p></p>
<p class="MsoNormal"> /home/aishimaj/spotter/bin/python(PyObject_Call+0x47) [0x419ba7]<o:p></o:p></p>
<p class="MsoNormal"> /beamline/phenix/bootstrap/build/lib/libboost_python.so(+0x2d088) [0x7f5561101088]<o:p></o:p></p>
<p class="MsoNormal"> /beamline/phenix/bootstrap/build/lib/libboost_python.so(boost::python::handle_exception_impl(boost::function0<void>)+0x43) [0x7f5561112013]<o:p></o:p></p>
<p class="MsoNormal"> /beamline/phenix/bootstrap/build/lib/libboost_python.so(+0x2fe08) [0x7f5561103e08]<o:p></o:p></p>
<p class="MsoNormal"> /beamline/phenix/bootstrap/build/lib/libboost_python.so(boost::python::objects::function::call(_object*, _object*) const+0xef) [0x7f55611031ff]<o:p></o:p></p>
<p class="MsoNormal"> /beamline/phenix/bootstrap/build/lib/scitbx_array_family_flex_ext.so(boost::python::objects::signature_py_function_impl<boost::python::detail::caller<scitbx::af::versa<int, scitbx::af::flex_grid<scitbx::af::small<long, 10ul> > >* (*)(boost::python::numeric::array
const&), boost::python::detail::constructor_policy<boost::python::default_call_policies>, boost::mpl::vector2<scitbx::af::versa<int, scitbx::af::flex_grid<scitbx::af::small<long, 10ul> > >*, boost::python::numeric::array const&> >, boost::mpl::v_item<void,
boost::mpl::v_item<boost::python::api::object, boost::mpl::v_mask<boost::mpl::vector2<scitbx::af::versa<int, scitbx::af::flex_grid<scitbx::af::small<long, 10ul> > >*, boost::python::numeric::array const&>, 1>, 1>, 1> >::operator()(_object*, _object*)+0x52)
[0x7f555ed68452]<o:p></o:p></p>
<p class="MsoNormal"> /beamline/phenix/bootstrap/build/lib/scitbx_array_family_flex_ext.so(scitbx::af::boost_python::flex_int_from_numpy_array(boost::python::numeric::array const&)+0x29) [0x7f555f039f79]<o:p></o:p></p>
<p class="MsoNormal"> /beamline/phenix/bootstrap/build/lib/scitbx_array_family_flex_ext.so(scitbx::af::versa<int, scitbx::af::flex_grid<scitbx::af::small<long, 10ul> > > scitbx::af::boost_python::versa_flex_from_numpy_array<int>(boost::python::numeric::array
const&)+0x1c87) [0x7f555f0415c7]<o:p></o:p></p>
<p class="MsoNormal"> /lib64/libc.so.6() [0x366d2326a0]<o:p></o:p></p>
<p class="MsoNormal">Segmentation fault (Python and libc call stacks above)<o:p></o:p></p>
<p class="MsoNormal"> This crash may be due to a problem in any imported<o:p></o:p></p>
<p class="MsoNormal"> Python module, including modules which are not part<o:p></o:p></p>
<p class="MsoNormal"> of the cctbx project. To disable the traps leading<o:p></o:p></p>
<p class="MsoNormal"> to this message, define these environment variables<o:p></o:p></p>
<p class="MsoNormal"> (e.g. assign the value 1):<o:p></o:p></p>
<p class="MsoNormal"> BOOST_ADAPTBX_FPE_DEFAULT<o:p></o:p></p>
<p class="MsoNormal"> BOOST_ADAPTBX_SIGNALS_DEFAULT<o:p></o:p></p>
<p class="MsoNormal"> This will NOT solve the problem, just mask it, but<o:p></o:p></p>
<p class="MsoNormal"> may allow you to proceed in case it is not critical.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="font-family:"Arial","sans-serif";color:#7F7F7F;mso-fareast-language:EN-AU">Jun Aishima | Post Doc - MX | Australian Synchrotron
<br>
</span></b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#7F7F7F;mso-fareast-language:EN-AU">p: (03) 8540 4114 | f: (03) 8540 4200
<br>
<a href="mailto:jun.aishima@synchrotron.org.au"><span style="color:#7F7F7F;text-decoration:none">jun.aishima@synchrotron.org.au</span></a> |
<a href="www.synchrotron.org.au"><span style="color:#7F7F7F;text-decoration:none">www.synchrotron.org.au</span></a><br>
800 Blackburn Road, Clayton, Victoria 3168</span><span style="mso-fareast-language:EN-AU"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>