SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.11847 · 2020

FlowPM: Distributed TensorFlow Implementation of the FastPM Cosmological N-body Solver

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2010.11847.json · badge: /api/ran/2010.11847.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
modichirag/flowpm canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
differentiableuniverseinitiative/flowpm community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
FunctionStatusWhere it lives
E Ran
ran on a synthesized input
modichirag/flowpm/flowpm/tfbackground.py
code served (permissive licence) · get_code("3556e25b8456dc6b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned EagerTensor, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import numpy as np

# Create a minimal Cosmology class with the required attributes
class Cosmology:
    def __init__(self):
        self.w0 = -0.9
        self.wa = 0.1
        self.Omega_m = 0.3
        self.Omega_k = 0.0
        self.Omega_de = 0.7

# Create test data
cosmo = Cosmology()
a = tf.constant([0.5, 0.8, 1.0, 1.2], dtype=tf.float32)

ARGS = {
    "cosmo": cosmo,
    "a": a
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
fde Ran
ran on a synthesized input
modichirag/flowpm/flowpm/tfbackground.py
code served (permissive licence) · get_code("3a6f9c8ac20793ad")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned EagerTensor, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import numpy as np

class Cosmology:
    """Stand-in Cosmology class with required attributes."""
    def __init__(self, w0, wa):
        self.w0 = w0
        self.wa = wa

# Create a small cosmology instance
cosmo = Cosmology(w0=-1.0, wa=0.5)

# Create scale factor values as a TensorFlow tensor
a = tf.constant([0.5, 0.8, 1.0, 1.2], dtype=tf.float32)

# Define epsilon
epsilon = 1e-5

ARGS = {
    "cosmo": cosmo,
    "a": a,
    "epsilon": epsilon
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
fftk Ran
ran on a synthesized input
modichirag/flowpm/flowpm/kernels.py
code served (permissive licence) · get_code("327da8bc56613eec")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

ARGS = {
    'shape': (4, 5, 6),
    'symmetric': True,
    'finite': False,
    'dtype': np.float64
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gradient_kernel Ran
ran on a synthesized input
modichirag/flowpm/flowpm/kernels.py
code served (permissive licence) · get_code("47354bc7be961c65")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (8,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small kvec array with shape suitable for indexing by direction
# kvec is expected to be an array where each element is an array of k values
# We'll create a 3D structure with 3 spatial directions
kvec = np.array([
    np.linspace(-np.pi, np.pi, 8),  # direction 0
    np.linspace(-np.pi, np.pi, 8),  # direction 1
    np.linspace(-np.pi, np.pi, 8),  # direction 2
])

direction = 0
order = 1

ARGS = {
    "kvec": kvec,
    "direction": direction,
    "order": order,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (8,) — shape (8,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
laplace_kernel Ran
ran on a synthesized input
modichirag/flowpm/flowpm/kernels.py
code served (permissive licence) · get_code("b110985f7a308326")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function expects kvec to be an array (or list of arrays) where:
# - kvec is iterable (used in sum())
# - Each ki supports ** 2 operation
# - The result supports indexing with .nonzero(), comparison, and multiplication
# This works with numpy arrays or torch tensors

# Create a small k-vector representing Fourier space coordinates
# Using 3D space: kvec = [kx, ky, kz] where each is a 2x3 array
kvec = [
    np.array([[0.0, 1.0, 2.0], [1.5, 0.5, 2.5]]),
    np.array([[0.0, 0.5, 1.0], [2.0, 1.5, 0.3]]),
    np.array([[1.0, 0.2, 0.8], [0.0, 1.2, 1.8]])
]

ARGS = {
    "kvec": kvec
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_power_map Ran
ran on a synthesized input
differentiableuniverseinitiative/flowpm/flowpm/fourier_smoothing.py
code served (permissive licence) · get_code("c8d93605d8305323")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned EagerTensor, ndim 2, dtype family float, shape (5, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import tensorflow as tf

# Construct arguments for make_power_map
power_spectrum = np.array([1.0, 0.8, 0.6, 0.4, 0.2])
size = 5
kps = np.linspace(0, 0.5, len(power_spectrum))

ARGS = {
    "power_spectrum": power_spectrum,
    "size": size,
    "kps": kps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (5, 5) — shape (5, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
power_spectrum Ran
ran on a synthesized input
differentiableuniverseinitiative/flowpm/flowpm/pk.py
code served (permissive licence) · get_code("f59bc2ed0b0582f2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import tensorflow as tf

# Create a small real-valued field tensor with shape (batch_size, nx, ny, nz)
# batch_size=2, nx=4, ny=3, nz=5 (distinct sizes)
field = tf.constant(
    np.random.randn(2, 4, 3, 5).astype(np.float32),
    dtype=tf.float32
)

# boxsize: length of each box dimension
# Must be array-like with shape matching (nx, ny, nz) = (4, 3, 5)
# It needs .prod() method, so we use numpy array
boxsize = np.array([1.0, 1.0, 1.0], dtype=np.float32)

# kmin: minimum k-value for binned powerspectra
kmin = 5

# dk: differential in each kbin
dk = 0.5

ARGS = {
    "field": field,
    "kmin": kmin,
    "dk": dk,
    "boxsize": boxsize,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
primordial_matter_power Ran
ran on a synthesized input
modichirag/flowpm/flowpm/tfpower.py
code served (permissive licence) · get_code("1e60ce781b22b913")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned EagerTensor, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import numpy as np

class CosmoDict:
    """Stand-in cosmology dictionary with required attributes"""
    def __init__(self):
        self.n_s = 0.96  # Scalar spectral index

cosmo = CosmoDict()

k = np.array([0.01, 0.1, 1.0, 10.0], dtype=np.float32)

ARGS = {
    "cosmo": cosmo,
    "k": k,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
w Ran
ran on a synthesized input
modichirag/flowpm/flowpm/tfbackground.py
code served (permissive licence) · get_code("d7c2f32c7eb33590")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned EagerTensor, ndim 1, dtype family float, shape (3,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf

class Cosmology:
    """Stand-in Cosmology class with required attributes for the w function."""
    def __init__(self, w0, wa):
        self.w0 = tf.constant(w0, dtype=tf.float32)
        self.wa = tf.constant(wa, dtype=tf.float32)

# Create a Cosmology instance with example dark energy parameters
cosmo = Cosmology(w0=-1.0, wa=0.5)

# Create scale factor values as a tensor
a = tf.constant([0.5, 0.8, 1.0], dtype=tf.float32)

ARGS = {
    "cosmo": cosmo,
    "a": a
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 1, dtype family float, shape (3,) — shape (3,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
fourier_smoothing Not yet run
unverified (harvested, no recorded run)
differentiableuniverseinitiative/flowpm/flowpm/fourier_smoothing.py
code served (permissive licence) · get_code("1ae87b385d7036b2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We present FlowPM, a Particle-Mesh (PM) cosmological N-body code implemented in Mesh-TensorFlow for GPU-accelerated, distributed, and differentiable simulations. We implement and validate the accuracy of a novel multi-grid scheme based on multiresolution pyramids to compute large scale forces efficiently on distributed platforms. We explore the scaling of the simulation on large-scale supercomputers and compare it with corresponding python based PM code, finding on an average 10x speed-up in terms of wallclock time. We also demonstrate how this novel tool can be used for efficiently solving large scale cosmological inference problems, in particular reconstruction of cosmological fields in a forward model Bayesian framework with hybrid PM and neural network forward model. We provide skeleton code for these examples and the entire code is publicly available at https://github.com/modichirag/flowpm.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2010.11847")
get_code_for_paper("2010.11847")
have("2010.11847")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2010.11847.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2010.11847.svg)](https://syntology.ai/paper/2010.11847)

Connect an agent — have() is free.