Comments (4)
from mpl.
You did, but my intention was to provide a solution that hopefully made no external mods to the wrapped comm_
. Thereby satisfying what I believe to be the design constraints of MPL while also allowing users such as me the ability to operate with MPI and MPL within the same code base. It would be trivial to extend my proposal to say (untested and uncompiled):
MPI_Comm& get_mpi_comm_nonconst()
{
return comm_;
}
/// \brief Allow raw MPI commands to be run
/// that need access to the MPI_Comm from this
/// \param userCode a functor provided by the user taking a MPI_Comm&
template<typename UserCode>
void execute_raw_modifiable_mpi(const UserCode& userCode)
{
userCode(get_mpi_comm_nonconst());
}
Here the purpose is to make it clear that what you get can change the wrapped comm_
with reference to 'execute_raw_mpi` which cannot I believe mod the communicator, only use it.
from mpl.
Although, I fully understand the desire to find a way to mix MPL with MPI code I will not incorporate this in any way into MPL. The more I think about it the more skeptical I get. It might be very useful in the short run, it will likely cause many issues in the long run.
The problem lies not so much in introducing an execute_raw_modifiable_mpi
method or something similar. Problems will arise when removing it once MPL has become close to feature complete (It's long way ahead, I know.) This might be a huge breaking change for those who rely on this feature. I do not want to introduce features into MPL, where I know from day one on that I want to get rid of them at a later stage.
Furthermore, allowing a mixed programming style that uses MPI and MPL eliminates the need to develop MPL further.
from mpl.
Understood
from mpl.
Related Issues (20)
- Apply MPI Runtime Correctness Analysis HOT 1
- Support std::span
- Can API changes be more clearly marked? HOT 1
- MPI_Intercomm_create functionality HOT 6
- Obtain raw MPI_Comm from mpl::communicator HOT 4
- Support for C++20 ranges HOT 2
- Including mpl/mpl.hpp throwing errors HOT 2
- "on ramp" for legacy code and interop HOT 3
- const problems with native handle HOT 4
- Dead link for eijkhout book HOT 1
- v0.2.0 install fails on sphinx HOT 5
- v0.2.0 doxygen latex fails HOT 1
- Abuout ialltoallv in IntelMPI 2021.5.1 HOT 3
- scatterv problem in comm_group.hpp HOT 1
- formatting error in allreduce 2/4 docs HOT 2
- need advice: split_shared_memory
- Warning under older intel compiler
- document use from cmake
- Error with maybe_unused HOT 2
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 mpl.