Giter Club home page Giter Club logo

Comments (5)

nbieberdorf avatar nbieberdorf commented on May 26, 2024

Following up on this issue - can someone please provide some guidance? Should I expect slow performance when installing FF++ on Mac using the binary package?

Thanks

from freefem-sources.

prj- avatar prj- commented on May 26, 2024

You are comparing apples and oranges here. What are you exactly interested in: performance of your loops in the .edp, or in the .cpp? My general advice is to do as little as possible in your .edp, and offload as much computation as possible in your .cpp.

from freefem-sources.

frederichecht avatar frederichecht commented on May 26, 2024

I know diff of speed between windows and unix (mac and linux)
I think this is due to the generation of code under windows.
To day no ways to solve.

from freefem-sources.

nbieberdorf avatar nbieberdorf commented on May 26, 2024

Thank you for the advice. I have been trying to couple my code with a c++ script, following the Dynamical Link example in Appendix C of the FF++ doc. I assume this will allow me to use a .edp script to call upon a (much faster) precompiled c++ script for mesh node calculations.

To learn, I wish to replicate the myfunction example from the doc., by compiling/linking myfunction.cpp myself (using the ff-c++, g++ commands in the doc). I found myfunction.cpp from some source code, along with ff++.hpp and dependencies (they are not included in the binary installation). I can compile and link myfunction.cpp without error, but I get the following error when executing load.edp:

load error : myfunction fail : dlerror : dlopen(/usr/local/ff++/openmpi-2.1/lib/ff++/3.61-1/lib/mpi/myfunction.dylib, 1): Symbol not found: __Z8map_typeB5cxx11 Referenced from: /usr/local/ff++/openmpi-2.1/lib/ff++/3.61-1/lib/mpi/myfunction.dylib Expected in: flat namespace in /usr/local/ff++/openmpi-2.1/lib/ff++/3.61-1/lib/mpi/myfunction.dylib

I suspect that I made a mistake when coordinating the ff++.hpp file and all its dependencies. Do you have a working example (with all the necessary files) of how to compile and link a c++ file to be called in FF++?

Once I can recreate a working example, I think moving all heavy computation from my .edp to a c++ script will be trivial.

Thank you,
Nathan

from freefem-sources.

prj- avatar prj- commented on May 26, 2024

Using ff-c++ from a bundled FreeFem++ installation requires you having exactly the same configuration as when the bundle was created. It appears you are using a rather old FreeFem++ installation (3.61-1), and it is highly likely your configuration has evolved. Once you start using that kind of developer oriented feature, my advice is to compile FreeFem++ yourself. You can also first try to just add the -std=c++11 argument in your ff-c++ command line, but I can't assure you this will work.

from freefem-sources.

Related Issues (20)

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.