We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See title
import numpy as np from mpi4py import MPI import triqs.utility.mpi as mpi from [triqs.gf](http://triqs.gf/) import * if mpi.is_master_node(): g = Gf(mesh=MeshImTime(1., 'Fermion', n_tau=200), target_shape=[1000]*2) print(f'Size: {g.data.nbytes / 1024**3} GB') data = g.data data[:] = 1337 else: g = Gf(mesh=MeshImTime(1., 'Fermion', n_tau=200), target_shape=[1000]*2) data = g.data # Breaks since size(g) = 3 GB, uses python pickle! #g = mpi.bcast(g) # Works since Bcast operates on existing buffers (no pickle involved). data = MPI.COMM_WORLD.Bcast(data) for rank in range(mpi.size): if mpi.rank == rank: print(rank) print(g) np.testing.assert_array_almost_equal(g.data, 1337 * np.ones_like(g.data)) mpi.barrier()
Current unstable e1adae0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
See title
Steps to Reproduce
Versions
Current unstable e1adae0
The text was updated successfully, but these errors were encountered: