Hi,
Very interesting indeed. I didn't notice.
I wouldn't claim that, by definition, it is more safe than mpi4py (just
another wrapper) but it would remove that dependency.
I wonder if a simple replacement of mpi4py.comm by boost.mpi.comm would
do the trick. If they followed same naming conventions it could.
Cheers
Bruno
On 03/03/2021 23:56, Janek Kozicki (yade) wrote:
Hi Bruno,
There is a boost::mpi library built on top of OpenMPI, MPICH2, IntelMPI [0].
In the introduction [1] they say it's just a wrapper for OpenMPI,
MPICH2 and IntelMPI. By using boost you could have some extra safety.
Example [2]:
int main(int argc, char* argv[])
{
mpi::environment env(argc, argv);
mpi::communicator world;
std::cout << "I am process " << world.rank() << " of " << world.size()
<< "." << std::endl;
return 0;
}
Python example [3]:
import boost.mpi as mpi
print "I am process %d of %d." % (mpi.rank, mpi.size)
Have a look :)
Janek
[0] https://www.boost.org/doc/libs/1_75_0/doc/html/mpi.html
[1] https://www.boost.org/doc/libs/1_75_0/doc/html/mpi/getting_started.html
[2] https://www.boost.org/doc/libs/1_75_0/doc/html/mpi/tutorial.html
[3] https://www.boost.org/doc/libs/1_75_0/doc/html/mpi/python.html
_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help : https://help.launchpad.net/ListHelp