Currently, the symplectic integrator Symple is not parallelisable. As it is the only integrator in AMUSE capable in handling test particles and collisions, this could be worthwhile. Beyond the fact there is no scheme in the source code, after simulating 2000 particles with the snippet below, I found no speed up:
from amuse.lab import *
from amuse.community.symple.interface import Symple
import time as cpu_time
import numpy as np
p = read_set_from_file("system_654_asteroids.hdf5")
converter = nbody_system.nbody_to_si(
1 | units.MSun, 100 | units.au
)
n_workers = [1, 2, 4]
for n in n_workers:
code = Symple(converter, number_of_workers=n)
code.particles.add_particles(p)
t0 = cpu_time.time()
code.evolve_model(0.03 | units.Myr)
t1 = cpu_time.time()
code.stop()
print(f"Time taken with {n} workers: {t1 - t0} seconds")
The output was:
Time taken with 1 workers: 714.7432034015656 seconds
Time taken with 2 workers: 721.3636832237244 seconds
Time taken with 4 workers: 828.808979511261 seconds
Currently, the symplectic integrator Symple is not parallelisable. As it is the only integrator in AMUSE capable in handling test particles and collisions, this could be worthwhile. Beyond the fact there is no scheme in the source code, after simulating 2000 particles with the snippet below, I found no speed up:
The output was:
Time taken with 1 workers: 714.7432034015656 seconds
Time taken with 2 workers: 721.3636832237244 seconds
Time taken with 4 workers: 828.808979511261 seconds