Comments (7)
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.
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.
Indeed it was a mistake.
from rsmpi.
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.
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.
Have a look at c08dca8. Is that roughly what you had in mind?
from rsmpi.
Yes, that's exactly right, thank you!
from rsmpi.
Related Issues (20)
- Add cargo-semver-checks
- Type Mismatch Safety HOT 18
- immediate_receive and count? HOT 1
- Error running example in docs HOT 2
- How to define my own structs from someone in my program for communication of MPI? HOT 12
- Add `#[inline(always)]` mark for common functions HOT 7
- `barrier()` not synchronizing correctly HOT 5
- macOS compiling error HOT 2
- Worlds and Universes: MPI_FINALIZE HOT 5
- Support for unit testing HOT 4
- Immediate send/recvs hang when the packets being sent are large HOT 16
- Can I send heap allocated data structures with the UserDataType API?
- Using dynamic reference to communicator HOT 12
- Implement Equivalence trait for complex types HOT 2
- Incorrect parsing of `-L` and `-I` paths in build-probe-mpi
- Support `MaybeUninit` HOT 3
- Why I can not compile “mpi-sys”? HOT 2
- Unstable with openmpi in Arch Linux, yet stable with MPICH from conda HOT 4
- clippy lint for derived `Equivalence` of struct with tuple fields HOT 2
- Cannot open include file: 'fficonfig.h' while building with msvc and ms-mpi HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rsmpi.