sailfish-team / sailfish

Lattice Boltzmann (LBM) simulation package for GPUs (CUDA, OpenCL)
http://sailfish.us.edu.pl
230 stars 85 forks source link

Add an overridable function run after the simulation step. #18

Closed marcinofulus closed 12 years ago

marcinofulus commented 12 years ago

def after_step(self): x=1.123 for i in range(N): x=x+2.1*x

causes visible slow down in simulation ldc_2d, 128x128 for N~1000 For N=100 it seems to be negligible

benchmark tests of clean example:
./examples/ldc_2d.py --mode=benchmark --every=100 --max_iters=1000 --lat_nx=2048 --lat_ny=2048 ./examples/ldc_2d.py --mode=benchmark --every=100 --max_iters=1000

Before Total MLUPS: eff:822.65  comp:862.04 Total MLUPS: eff:239.87  comp:421.40

After Total MLUPS: eff:828.56  comp:863.44 Total MLUPS: eff:235.38  comp:415.61

Note that results vary by few percent from run to run.

mjanusz commented 12 years ago

Could you please also add the following stats to the description of the merge request:

./examples/ldc_2d.py --mode=benchmark --every=100 --max_iters=1000 --lat_nx=2048 --lat_ny=2048 ./examples/ldc_2d.py --mode=benchmark --every=100 --max_iters=1000

Both with your changes and without?