Giter VIP home page Giter VIP logo

Comments (7)

bsteinb avatar bsteinb commented on May 20, 2024

Sounds good to me. I will give this a shot tomorrow.

Does it make sense to open an issue at tov/libffi-sys-rs or is libffi just in general not likely to build on that particular platform?

from rsmpi.

AndrewGaspar avatar AndrewGaspar commented on May 20, 2024

The issue is that libtool isn't available on this platform (indirectly used by libffi by way of autoconf).

To be honest, this may actually be an issue with the platform - I have reason to believe it should be available and was recently available. I'm reaching out to the administrator to see if perhaps libtool was removed mistakenly. Maybe hold off on this - it may not be an issue anymore if I can get libtool reinstated.

from rsmpi.

AndrewGaspar avatar AndrewGaspar commented on May 20, 2024

Indeed it was a mistake. 🙂 The admin fixed the problem. Feel free to close this.

from rsmpi.

bsteinb avatar bsteinb commented on May 20, 2024

I am glad you could resolve the issue on your end. I have nevertheless made the user operation API an optional default feature which depends on libffi in ca8e6d7. It is indeed an optional, non-essential part of the API and it is not too much of a hassle to acknowledge this fact by making it an optional feature.

However, I did not see a way to provide a UserOperation constructor for a raw function pointer. The existing constructor injects (by creating another closure) a wrapper function between the user supplied closure and MPI that wraps the raw buffers that MPI passes to the callback inside some safer Rust types.

from rsmpi.

AndrewGaspar avatar AndrewGaspar commented on May 20, 2024

Excellent, thank you!

Hm... I guess what I wanted was not necessarily an enhancement to UserOperation, but perhaps an UnsafeUserOperation that implements Operation. It would take an unsafe function pointer (an ffi::MPI_User_function) in its constructor, rather than an Fn(DynBuffer, DynBufferMut). The user would have to explicitly handle converting the inputs to the actual data type. This would allow you to still use the Operation with the collective routines, and get automatic freeing of the operation, but without the dependency on libffi.

from rsmpi.

bsteinb avatar bsteinb commented on May 20, 2024

Have a look at c08dca8. Is that roughly what you had in mind?

from rsmpi.

AndrewGaspar avatar AndrewGaspar commented on May 20, 2024

Yes, that's exactly right, thank you!

from rsmpi.

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.