cosmoslik.mpi package

Submodules

cosmoslik.mpi.mpi.flatten(l)

Returns a list of lists joined into one

cosmoslik.mpi.mpi.get_mpi()

Return (rank,size,comm)

cosmoslik.mpi.mpi.get_pool()

Gets a pool object which can be passed to things that expect it to have a pool.map function.

cosmoslik.mpi.mpi.mpi_consistent(value)

Returns the value that the root process provided.

cosmoslik.mpi.mpi.mpi_map(function, sequence, distribute=True)

A map function parallelized with MPI. If this program was called with mpiexec -n $NUM, then partitions the sequence into $NUM blocks and each MPI process does the rank-th one. Note: If this function is called recursively, only the first call will be parallelized

Keyword arguments: distribute – If true, every process receives the answer

otherwise only the root process does (default=True)
cosmoslik.mpi.mpi.partition(l, n)

Partition l into n nearly equal sublists

Module contents