Order-N Parallel Molecular Dynamics Simulation

Simulation Techniques
Programming Techniques
Performance
Simulation Results
Further Improvement

Simulation Techniques


Programming Techniques


Performance


Simulation Results


Further Improvement


The Code of Simulation

Every simulation run is controlled by a configuration file (which is a header file of the Source). Below is a sample configuration file and the simulation output:

The configuration

//======================================================
// User Specifications
//======================================================
#define _APPLICATION "Test"

#define _2DIM

#define _NPROC 8

#define _LCFG 
#define _LCFG_READ "config2.dat"

//#define _RPM 1

#define _NP 6000
#define _NSTEP 1000
#define _NDUMP 100
#define _NRESCALE 0

#define _NBL 80

#define _DT 0.001
#define _RC 2.5
#define _NNL 50
      
#define _TR 1.2
#define _CUBEX 150.0
#define _CUBEY 50.0

#define _PROP_MESH "mesh.out"
#define _PROP_MESH_VX
#define _PROP_MESH_VY
#define _MESHX (53*3)
#define _MESHY 53

#define _PROP_POSITION "pos.out"

This is the output of the simulation
======================================================
Atomic Simulation Library/(C/C++) (Version 1.21) : Test
 Initializing...
  CFG: Loaded from config2.dat
 Basic parameters: particle number : 6000
    Density : 0.800000, Temperature: 1.200000
    Cube : 150.000000 X 50.000000
  NEIB: Bin/DList: 53x17 bins, average 9.170667/50 neighbors
  MDFrame: Using Gear's 5-order corr-pred method
  PROP:Pos(pos.out)BIN Mesh(mesh.out,159x53)[Density Vx Vy]
 Spawning children (8)...
    Child 1:0--6
    Child 2:7--13
    Child 3:14--20
    Child 4:21--27
    Child 5:28--34
    Child 6:35--40
    Child 7:41--46
    Child 0:47--52
 Start running...
100     1.199459        4.563456        -0.69159692
200     1.188688        4.620878        -0.69169823
300     1.182552        4.625586        -0.69169808
400     1.201941        4.515919        -0.69169757
500     1.199589        4.524973        -0.69169805
600     1.191410        4.581781        -0.69169879
700     1.194896        4.564951        -0.69169861
800     1.199836        4.533135        -0.69169878
900     1.186185        4.594204        -0.69170014
1000    1.190483        4.544438        -0.69170024
 Finished! Exiting...
  CFG: Wrote to config.dat
====================================================== 
You can look at the
source code here.
For general comments and comparison with the first example of this project, please return to the main page. Last Modified : Tue May 20 01:41:19 1997