I want to create a vector with sitze 10^15 with numpy and MPI.
I have no clue how to start. I tried to use
v = np.random.rand(10**15,1)
but it exceeds my memory.
I want to create a vector with sitze 10^15 with numpy and MPI.
I have no clue how to start. I tried to use
v = np.random.rand(10**15,1)
but it exceeds my memory.
You can't. This is thousands terabytes of data, too much even for storing on disk. Consider redesigning your program to reduce amount of data or processing data iteratively.
Dask arrays coordinate many Numpy arrays, arranged into chunks within a grid. They support a large subset of the Numpy API.
Call .compute() when you want your result as a NumPy array.
%%time
import dask.array as da
answer_sum = da.random.random((10**15)).sum().compute()
answer_mean = da.random.random((10**15)).mean().compute()
print(answer_sum)
print(answer_mean )
Source: https://examples.dask.org/array.html#Create-Random-array