1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2002-2-1 (1.70)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Notes</TITLE>
<META NAME="description" CONTENT="Notes">
<META NAME="keywords" CONTENT="users_guide">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="users_guide.css">
<LINK REL="next" HREF="node170.html">
<LINK REL="previous" HREF="node168.html">
<LINK REL="up" HREF="node162.html">
<LINK REL="next" HREF="node170.html">
</HEAD>
<BODY >
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html3227"
HREF="node170.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html3221"
HREF="node162.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html3215"
HREF="node168.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<A NAME="tex2html3223"
HREF="node14.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
<A NAME="tex2html3225"
HREF="node317.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html3228"
HREF="node170.html">How to Implement SIDL</A>
<B> Up:</B> <A NAME="tex2html3222"
HREF="node162.html">Python Bindings</A>
<B> Previous:</B> <A NAME="tex2html3216"
HREF="node168.html">Setting up to Run</A>
<B> <A NAME="tex2html3224"
HREF="node14.html">Contents</A></B>
<B> <A NAME="tex2html3226"
HREF="node317.html">Index</A></B>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION03670000000000000000"></A><A NAME="s:python:notes"></A>
<BR>
Notes
</H1>
<P>
The Python binding for SIDL long uses <A NAME="10207"></A>Python's unlimited precision
integer data type, so it will not behave exactly like a 64 bit integer
(i.e. there is no overflow). For Python versions before 2.2, your
code needs to guarantee that a Python unlimited precision integer is
used whenever a SIDL long is needed. For example, if you want to call
a method whose SIDL signature is <TT>bool isPrime(long num)</TT>,
calling <TT>isPrime(1)</TT> will fails; but calling <TT>isPrime(1L)</TT>
will work fine.
<P>
The Python binding for an array of SIDL longs may use an array of 64
bit integers if Numeric Python supports a 64 bit integer. Otherwise,
it uses an array of Python's indefinite precision integers (i.e.,
integers with unlimited bits).
<P>
What does this error message mean?
<P>
<BLOCKQUOTE>
<TT> <TT><SPAN CLASS="MATH"><IMG
WIDTH="40" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img26.png"
ALT="$>>>$"></SPAN></TT> <TT><B>import x.y.Zmodule</B></TT>
<BR>
Traceback (innermost last):
<BR>
File "<stdin>", line 1, in ?
<BR>
ImportError: dynamic module does not define init function (initZmodule)
<BR>
</TT></BLOCKQUOTE>
<P>
Is the name of your SIDL interface/class <TT>x.y.Z</TT> or <TT>x.y.Zmodule</TT>,
if it's the former, you should say <TT><B>import x.y.Z</B></TT>.
If this isn't the problem, submit a bug report for Babel.
It might be informative to look at the symbol of the shared library/dynamic
link library using a tool like nm.
I suppose it's also worth checking the PYTHONPATH environment variable
to make sure it's pointing to the right place.
<A NAME="10217"></A>
<P>
<BLOCKQUOTE>
<TT> <TT><SPAN CLASS="MATH"><IMG
WIDTH="40" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img26.png"
ALT="$>>>$"></SPAN></TT> <TT><B>import x.y.Z</B></TT>
<BR>
Fatal Python error: Cannot load implementation for SIDL class x.y.Z
<BR>
Abort (core dumped)
<BR>
</TT></BLOCKQUOTE>
<P>
This means that the Python stub code (the code that links Python to SIDL's
independent object representation (IOR)) failed in its attempt to load the
shared library or dynamic link library containing the implementation of SIDL
class <TT>x.y.Z</TT>.
Make sure the environment variable <TT>SIDL_DLL_PATH</TT> lists all the
directories where the shared libraries/dynamic link libraries for your
SIDL objects/interfaces are stored.
<TT>SIDL_DLL_PATH</TT> is a semicolon separated list of directories
where SIDL client stubs will search for shared libraries required for
SIDL classes and interfaces.
Make sure the directory in which the SIDL runtime resides is in the
<TT>LD_LIBRARY_PATH</TT> (or whatever your machine's mechanism for
locating shared library files is).
<P>
<BLOCKQUOTE>
<TT> <TT><SPAN CLASS="MATH"><IMG
WIDTH="40" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
SRC="img26.png"
ALT="$>>>$"></SPAN></TT> <TT><B>import x.y.Z</B></TT>
<BR>
Fatal Python error: Cannot load implementation for SIDL interface x.y.Z
<BR>
Abort (core dumped)
<BR>
</TT></BLOCKQUOTE>
<P>
This is the same problem for an interface as described immediately
above for a class.
<P>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html3227"
HREF="node170.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html3221"
HREF="node162.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html3215"
HREF="node168.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<A NAME="tex2html3223"
HREF="node14.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
<A NAME="tex2html3225"
HREF="node317.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html3228"
HREF="node170.html">How to Implement SIDL</A>
<B> Up:</B> <A NAME="tex2html3222"
HREF="node162.html">Python Bindings</A>
<B> Previous:</B> <A NAME="tex2html3216"
HREF="node168.html">Setting up to Run</A>
<B> <A NAME="tex2html3224"
HREF="node14.html">Contents</A></B>
<B> <A NAME="tex2html3226"
HREF="node317.html">Index</A></B> </DIV>
<!--End of Navigation Panel-->
<ADDRESS>
<br><br>babel-0.10.2<br>users_guide Last Modified 2005-03-23<br><br><a href="http://www.llnl.gov/CASC/components">http://www.llnl.gov/CASC/components</a><br><a href="mailto:components@llnl.gov">components@llnl.gov</a>
</ADDRESS>
</BODY>
</HTML>
|