Hi Zach,
On 02/11/14 23:17, Zach Davis wrote:
> I added a print status statement just above the conditional
> statement within the _errcheck function of the clblas.py module. I
> invoked PyFR as before; however, I'm not seeing that a status is
> being printed out that would correspond to anything within the clBLAS
> header file as you describe. It appears that PyFR is having an issue
> loading clBLAS altogether. The latest stack trace follows below:
>
> [snip]
>
> I have the clBLAS library and header files installed at
> /usr/local/lib64 and /usr/local/include, respectively. I have this
> library path added to my DYLD_LIBRARY_PATH. It appears that pyopencl
> v2014.1 installed via pip correctly. Is there perhaps another
> environment variable that I need to set in order for PyFR to
> recognize the OpenCL and clBLAS library installations?
It is likely that if you're getting this far pyopencl is being imported
without issue. However, interestingly, the previous stack trace implied
that clBLAS was being loaded successfully. But, for whatever reason, it
is now no longer being found.
Tracking down libraries is a right pain. In PyFR this comes down to a
call of the load_library function in pyfr/ctypesutil.py with the
argument "clBLAS".
On a Mac load_library will translate this to "libclBLAS.dylib". Next we
pass this to CDLL. Hence, you can reproduce the issue at the Python
prompt by doing:
from ctypes import CDLL
CDLL('libclBLAS.dylib')
if this works then all is well -- the linker/ctypes can find and load
the library without issue. If this fails PyFR will try some absolute
library paths. On a Mac, by default, we will look in /opt/local/lib
(this covers the common case of macports) and so try:
CDLL('/opt/local/lib/libclBLAS.dylib')
and see if that gets us anywhere. You can add search directories for
PyFR to try via the PYFR_LIBRARY_PATH environmental variable. So, if
for whatever reason, ctypes is not looking in /usr/local/lib64 you can do:
export PYFR_LIBRARY_PATH="/usr/local/lib64"
and we will try:
CDLL('/usr/local/lib64/libclBLAS.dylib')
which should work.
Regards, Freddie.
--
You received this message because you are subscribed to the Google Groups "PyFR
Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send an email to [email protected].
Visit this group at http://groups.google.com/group/pyfrmailinglist.
For more options, visit https://groups.google.com/d/optout.