FIST neighbor lists: new memory distribution

Teodoro Laino teodor... at gmail.com
Wed Sep 19 11:11:01 UTC 2007


Hi all,
this message regards FIST. In particular the neighbor lists of FIST.
As many people pointed out in the last time the memory allocation for
the neighbor lists was not distributed at all. This was creating problem
on all those kind of machines that have a limited amount of memory per
process (XT3, BG, ..)

With the last modifications in CVS you will have a real memory  
distributed
neighbor lists and also some speedup gain in the force_nonbond  
routine (few percent).
Unfortunately the prize to pay for that is a slightly more expensive  
generation
of the neighbor lists. How much? depends on the system size and how many
atomic kinds you have.. Anyway it accounts for a small amount  
compared to
the real generation of the pair lists. The increase cpu time in the  
list generation
is totally due to the sorting of the neighbor pairs (we gain speed-up  
in the nonbonded forces
mainly due to this reordering).. Moreover lists are generated only  
after a certain number
of MD steps and the gain in the nonbonded +/- compensate the more  
expensive list
generation.
Anyway I'm sure there's still room for speed-up improvements in the  
list generation!

The data reported here are for a system that could not be run on CRAY  
XT3 using
dual core because of failure in memory allocation (when using dual  
core each process
can handle something like 850 MB of memory on this machine, though  
this number
depends on how large is your IO Buffer (850 MB is for an IO Buffer of  
100MB))..

The numbers reported are for g95-sopt, x86-64,  Dual-Core AMD Opteron 
(tm) Processor 8218.
You have for each process the memory allocated before the list  
generation and immediately after
the generation of the lists. For the new code the timing includes  
also the sorting of the lists.
Anyway the machine was quite full so don't rely too much on timings:

OLD CODE - 1 procs (memory does not change w.r.t. procs number):
     0:   1>>>>>          5      1 build_fist_neighbor_lists        
start 143275 Kb
     0:   1>>>>>          5      1 build_fist_neighbor_lists       
19.945 506652 Kb

NEW CODE:
--------------------------------------- 1 procs ------------- alloc  
memory X proc: ~183 MB
     0:   1>>>>>          5      1 build_fist_neighbor_lists        
start 143268 Kb
     0:   1>>>>>          5      1 build_fist_neighbor_lists       
23.469 328921 Kb
--------------------------------------- 2 procs ------------- alloc  
memory X proc:   ~90 MB
     1:   2>>>>>          5      1 build_fist_neighbor_lists        
start 139471 Kb
     1:   2>>>>>          5      1 build_fist_neighbor_lists       
11.933 229628 Kb
     0:   2>>>>>          5      1 build_fist_neighbor_lists        
start 139471 Kb
     0:   2>>>>>          5      1 build_fist_neighbor_lists       
11.893 229517 Kb
--------------------------------------- 4 procs ------------- alloc  
memory X proc:   ~44 MB
     2:   4>>>>>          5      1 build_fist_neighbor_lists        
start 137522 Kb
     2:   4>>>>>          5      1 build_fist_neighbor_lists        
6.076 181607 Kb
     1:   4>>>>>          5      1 build_fist_neighbor_lists        
start 137531 Kb
     1:   4>>>>>          5      1 build_fist_neighbor_lists        
6.404 181831 Kb
     3:   4>>>>>          5      1 build_fist_neighbor_lists        
start 137531 Kb
     3:   4>>>>>          5      1 build_fist_neighbor_lists        
6.352 181549 Kb
     0:   4>>>>>          5      1 build_fist_neighbor_lists        
start 137523 Kb
     0:   4>>>>>          5      1 build_fist_neighbor_lists        
6.660 181997 Kb
--------------------------------------- 8 procs ------------- alloc  
memory X proc:   ~22 MB
     6:   8>>>>>          5      1 build_fist_neighbor_lists        
start 136567 Kb
     6:   8>>>>>          5      1 build_fist_neighbor_lists        
4.196 158078 Kb
     3:   8>>>>>          5      1 build_fist_neighbor_lists        
start 136559 Kb
     3:   8>>>>>          5      1 build_fist_neighbor_lists        
4.008 158178 Kb
     5:   8>>>>>          5      1 build_fist_neighbor_lists        
start 136565 Kb
     5:   8>>>>>          5      1 build_fist_neighbor_lists        
3.900 158261 Kb
     1:   8>>>>>          5      1 build_fist_neighbor_lists        
start 136548 Kb
     1:   8>>>>>          5      1 build_fist_neighbor_lists        
4.124 157985 Kb
     7:   8>>>>>          5      1 build_fist_neighbor_lists        
start 136557 Kb
     7:   8>>>>>          5      1 build_fist_neighbor_lists        
4.092 158085 Kb
     2:   8>>>>>          5      1 build_fist_neighbor_lists        
start 136541 Kb
     2:   8>>>>>          5      1 build_fist_neighbor_lists        
3.896 158186 Kb
     4:   8>>>>>          5      1 build_fist_neighbor_lists        
start 136555 Kb
     4:   8>>>>>          5      1 build_fist_neighbor_lists        
3.964 158176 Kb
     0:   8>>>>>          5      1 build_fist_neighbor_lists        
start 136549 Kb
     0:   8>>>>>          5      1 build_fist_neighbor_lists        
4.020 158398 Kb
-------------------------------------- 16 procs ------------- alloc  
memory X proc:   ~10 MB
    14:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136070 Kb
    14:  16>>>>>          5      1 build_fist_neighbor_lists        
1.956 146523 Kb
    15:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136068 Kb
    15:  16>>>>>          5      1 build_fist_neighbor_lists        
2.264 146636 Kb
    13:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136064 Kb
    13:  16>>>>>          5      1 build_fist_neighbor_lists        
2.132 146936 Kb
    11:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136075 Kb
    11:  16>>>>>          5      1 build_fist_neighbor_lists        
2.228 146537 Kb
    10:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136080 Kb
    10:  16>>>>>          5      1 build_fist_neighbor_lists        
2.200 146686 Kb
     9:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136078 Kb
     9:  16>>>>>          5      1 build_fist_neighbor_lists        
2.156 146669 Kb
    12:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136074 Kb
    12:  16>>>>>          5      1 build_fist_neighbor_lists        
2.384 146779 Kb
     8:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136070 Kb
     8:  16>>>>>          5      1 build_fist_neighbor_lists        
2.216 146525 Kb
     3:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136070 Kb
     3:  16>>>>>          5      1 build_fist_neighbor_lists        
2.448 148409 Kb
     1:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136062 Kb
     1:  16>>>>>          5      1 build_fist_neighbor_lists        
2.412 146737 Kb
     4:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136064 Kb
     4:  16>>>>>          5      1 build_fist_neighbor_lists        
2.340 146623 Kb
     6:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136073 Kb
     6:  16>>>>>          5      1 build_fist_neighbor_lists        
2.184 146518 Kb
     5:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136070 Kb
     5:  16>>>>>          5      1 build_fist_neighbor_lists        
2.400 146706 Kb
     7:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136072 Kb
     7:  16>>>>>          5      1 build_fist_neighbor_lists        
2.312 146581 Kb
     2:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136061 Kb
     2:  16>>>>>          5      1 build_fist_neighbor_lists        
2.456 146732 Kb
     0:  16>>>>>          5      1 build_fist_neighbor_lists        
start 136066 Kb
     0:  16>>>>>          5      1 build_fist_neighbor_lists        
2.644 148361 Kb


As usual, let me know if you have comments or encounter problems..

CiaoCiao,
Teo





More information about the CP2K-user mailing list