Polymer simulations are among the most computationally demanding workloads in soft-matter research, often requiring days of execution and substantial energy consumption. In our latest work within the MExMeMo project, we tackle this challenge by coupling two complementary simulation models and optimizing them for modern GPUs.

Two Models, One Goal

The key idea is to combine two models that each have complementary strengths:

  • UDM (Uneyama–Doi Model): A continuum model that propagates concentration fields efficiently using partial differential equations. It’s fast and scalable, but lacks chain-level accuracy.
  • SOMA (SOft coarse-grained Monte-carlo Acceleration): A particle-based Monte Carlo framework that captures molecular-scale configurations with high fidelity—but at a high computational cost.

By coupling them, we get the best of both worlds: UDM handles the whole domain cheaply, while SOMA is spawned only where high-fidelity particle resolution is needed.

GPU Optimization

Before coupling, each model was independently optimized for GPU execution on NVIDIA A100 and H100 GPUs:

For UDM, kernel fusion reduced the kernel count from 112 to 69 per time step, and overlapping random number generation with simulation brought the renew_noise_kernel share from 26% down to 2.9% of runtime—yielding a total 70% performance improvement.

UDM performance across GPU generations

For SOMA, porting initialization to GPU, improving memory coalescing, and optimizing the two dominant kernels (mc_polymer_iteration and update_density_fields) delivered an 80% throughput improvement.

SOMA performance and energy across GPU generations

##Coupling Results: 13× Faster, 96% Less Energy

The coupled system was evaluated on JUWELS Booster (NVIDIA A100 GPUs). Compared to standalone SOMA on 8 GPUs, the coupled simulation on just 4 GPUs achieved:

  • 13× speedup in time-to-solution
  • 24.5× reduction in energy per time step
  • 96% total energy saving

All while maintaining the same scientific fidelity as the full particle simulation.

Energy per time step: SOMA baseline vs coupled simulation

Key Takeaways

Adding more GPUs saves time, not energy. Scaling SOMA from 4 to 16 GPUs increased energy per step by 72% due to communication overhead!

For full details on the optimization strategies, coupling theory, and simulation results, check out the paper

Further Reading