Code Monkey home page Code Monkey logo

Comments (6)

johncbowman avatar johncbowman commented on August 23, 2024

Hi Francis
Good to hear from you!
Yes there's a wrapper in the wrappers dir called pexample. Malcolm knows
more about it.
On Nov 9, 2015 6:24 PM, "francispoulin" [email protected] wrote:

Hello John and/or Malcolm,

It's been a while. I have heard very good things about fftwpp recently and
am very curious to try it out. I thought there was a wrapper for python. If
yes do you have any advice on how one might set this up? If no maybe it's
too much work.

Thanks for putting this together, it looks really great!

Francis


Reply to this email directly or view it on GitHub
#2.

from fftwpp.

malcolmroberts avatar malcolmroberts commented on August 23, 2024

Hello.

Yes, there are python wrappers for the shared-memory routines. The wrappers are in the wrappers directory. pexample.py has examples of how to call FFTW++ from python.

Best,

~Malcolm

from fftwpp.

francispoulin avatar francispoulin commented on August 23, 2024

Hello John and Malcolm,

Thanks for pointing me in the right folder. Unfortunately, I need to make stuff before I can run the python example. I haven't been able to find any instructions on the github repo. Could you maybe help me to get started?

Francis

from fftwpp.

malcolmroberts avatar malcolmroberts commented on August 23, 2024

Hi, Francis.

Sorry about the lack of documentation; it's on the to-do list!

For compiling, the first thing that you need to do is have FFTW compiled with --with-pic. Then, compile _fftwpp.so in the wrappers directory of fftw++; normally this is just "make _fftwpp.so". If you install FFTW in a non-standard location, specify this with FFTW_INCLUDE_PATH and FFTW_LIB_PATH, which are referenced in wrappers/Makefile.

You can then use the python wrappers by adding the wrappers directory to your PYTHONPATH.

I've tested the wrappers on Linux with gcc and the Intel compilers, but I can't vouch for Windows or MacOS yet.

~Malcolm

from fftwpp.

francispoulin avatar francispoulin commented on August 23, 2024

Thanks for the quick reply.

I tried it on my ubuntu machine and it compiled easily and ran fast. Ah, if only more of my life was linux based. Unfortunately, my Mac was not so cooperative. A questions.

  1. If I wanted to test the parallelization/threading in linux, can I just crank up some numbers and test the efficiency? I presume you've done scaling tests before but I'd like to learn about this myself.

  2. For my mac, it seems to be using the clang compiles (mac based) which I want to avoid. I changed the compilers under the # GNU Compiler comment to my other ones but it doesn't seem to use them. But it does compile and create the .so file. So maybe it's ok?

  3. Probably not since when I try running it I get the following problem. My fftw is in usr/local/lib so should be easy to find.

python pexample.py
Traceback (most recent call last):
File "pexample.py", line 5, in
import fftwpp
File "/Users/fpoulin/software/fftwpp/wrappers/fftwpp.py", line 24, in
clib = CDLL(os.path.join(base, '_fftwpp.so'))
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/init.py", line 365, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/fpoulin/software/fftwpp/wrappers/_fftwpp.so, 6): Symbol not found: _GOMP_parallel
Referenced from: /usr/local/opt/fftw/lib/libfftw3_omp.3.dylib
Expected in: flat namespace
in /usr/local/opt/fftw/lib/libfftw3_omp.3.dylib

Sorry for the bother but thanks for the help.

from fftwpp.

johncbowman avatar johncbowman commented on August 23, 2024

Try linking with -lgomp

On Wed, Nov 18, 2015 at 7:51 PM, francispoulin [email protected]
wrote:

Thanks for the quick reply.

I tried it on my ubuntu machine and it compiled easily and ran fast. Ah,
if only more of my life was linux based. Unfortunately, my Mac was not so
cooperative. A questions.

  1. If I wanted to test the parallelization/threading in linux, can I just
    crank up some numbers and test the efficiency? I presume you've done
    scaling tests before but I'd like to learn about this myself.

  2. For my mac, it seems to be using the clang compiles (mac based) which I
    want to avoid. I changed the compilers under the # GNU Compiler comment to
    my other ones but it doesn't seem to use them. But it does compile and
    create the .so file. So maybe it's ok?

  3. Probably not since when I try running it I get the following problem.
    My fftw is in usr/local/lib so should be easy to find.

python pexample.py
Traceback (most recent call last):
File "pexample.py", line 5, in
import fftwpp
File "/Users/fpoulin/software/fftwpp/wrappers/fftwpp.py", line 24, in
clib = CDLL(os.path.join(base, '
_fftwpp.so')) File
"/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/init.py",
line 365, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/fpoulin/software/fftwpp/wrappers/_fftwpp.so, 6):
Symbol not found: _GOMP_parallel
Referenced from: /usr/local/opt/fftw/lib/libfftw3_omp.3.dylib
Expected in: flat namespace
in /usr/local/opt/fftw/lib/libfftw3_omp.3.dylib

Sorry for the bother but thanks for the help.


Reply to this email directly or view it on GitHub
#2 (comment).

from fftwpp.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.