Coder Social home page Coder Social logo

Makefile compiling about poisfft HOT 8 CLOSED

ladaf avatar ladaf commented on August 15, 2024
Makefile compiling

from poisfft.

Comments (8)

LadaF avatar LadaF commented on August 15, 2024

This is a linking issue. If you are using the dynamic version of the library you also have to link with libfftw and libfftwf.

Also, PoisFFT is by default compiled with OpenMP enabled. You can either disable it with scons openmp=no or you have to also link with libfftw_omp and libfftwf_omp and also compile your code with OpenMP or link with libgomp. I suggest to start with OpenMP disabled.

from poisfft.

LadaF avatar LadaF commented on August 15, 2024

I do not recommend compiling your code with -fdefault-real-8. It may work, but the library was not tested that way. Be sure to use the correct double precision solver.

from poisfft.

Mattiads1 avatar Mattiads1 commented on August 15, 2024

Thanks, I follow all your advice and I solved my problem.
I'm not very familiar compilation and linking.
I have another question.
From what I understand by default when I run with 'scons openmp=no', it create a dynamic library. How can I do if I want a static library?

from poisfft.

LadaF avatar LadaF commented on August 15, 2024

No, that is not correct. With 'scons openmp=no' you just disable OpenMP, but both libraries are created, one dynamic .so and one static .a. It is up to you and the settings in your Makefile which one of them you will use. Note that you will have to supply the other necessary libraries in both cases.

from poisfft.

Mattiads1 avatar Mattiads1 commented on August 15, 2024

I don't find the static .a libary.
When I run 'scons openmp=no' it creates two directories: one is bin/gcc/ where the files.mod and files.os are located; the other one is /lib/gcc/ where only the file libpoisfft.so is present.

While when I run 'scons test' it create only one directory: bin/gcc/ where files.mod and files.o are created.

from poisfft.

LadaF avatar LadaF commented on August 15, 2024

You are right the line in the [SConstruct] file is commented out. If you want a static library, you can currently comment out line 220, uncomment 221 and remove the lib + .

from poisfft.

LadaF avatar LadaF commented on August 15, 2024

I added a new target to SConstruct. You can just do scons static_lib to get the static library.

from poisfft.

Mattiads1 avatar Mattiads1 commented on August 15, 2024

Thanks

from poisfft.

Related Issues (13)

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.