Sunday, 2 November 2014
Hi Freddie,
Setting the PYFR_LIBRARY_PATH environment variable now gets me to the point
where clBLAS is found. I now get a status code of -54. Stack trace
follows:
pyfr-sim -n 100 -b opencl -p run couette_flow_2d.pyfrm couette_flow_2d.ini
0
-54
Traceback (most recent call last):
File "/Users/zdavis/Applications/PyFR/pyfr/scripts/pyfr-sim", line 112,
in <module>
main()
File "/usr/local/lib/python2.7/site-packages/mpmath/ctx_mp.py", line
1301, in g
return f(*args, **kwargs)
File "/Users/zdavis/Applications/PyFR/pyfr/scripts/pyfr-sim", line 108,
in main
solver.run()
File "/Users/zdavis/Applications/PyFR/pyfr/integrators/base.py", line
114, in run
solns = self.advance_to(t)
File "/Users/zdavis/Applications/PyFR/pyfr/integrators/controllers.py",
line 79, in advance_to
idxcurr = self.step(self.tcurr, dt)
File "/Users/zdavis/Applications/PyFR/pyfr/integrators/steppers.py", line
107, in step
rhs(t, r0, r1)
File
"/Users/zdavis/Applications/PyFR/pyfr/solvers/baseadvecdiff/system.py",
line 17, in rhs
runall([q1])
File "/Users/zdavis/Applications/PyFR/pyfr/backends/base/backend.py",
line 187, in runall
self.queue_cls.runall(sequence)
File "/Users/zdavis/Applications/PyFR/pyfr/backends/opencl/types.py",
line 118, in runall
q._exec_nowait()
File "/Users/zdavis/Applications/PyFR/pyfr/backends/base/types.py", line
308, in _exec_nowait
self._exec_item(*self._items.popleft())
File "/Users/zdavis/Applications/PyFR/pyfr/backends/base/types.py", line
293, in _exec_item
item.run(self, *args, **kwargs)
File "/Users/zdavis/Applications/PyFR/pyfr/backends/opencl/clblas.py",
line 97, in run
1, qptr, 0, None, None)
File "/Users/zdavis/Applications/PyFR/pyfr/backends/opencl/clblas.py",
line 60, in _errcheck
raise RuntimeError('clBLAS')
RuntimeError: clBLAS
Best Regards,
Zach
On Sun, Nov 2, 2014 at 3:31 PM, Freddie Witherden <[email protected]>
wrote:
> 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.
>
--
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.