/home/julian/svn/gpucpumd/mdgpu2/main.cu File Reference

#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <assert.h>
#include <cstdlib>
#include <limits>
#include <cuda.h>
#include <ctime>
#include "gpu_forces.cuh"
#include "gpu_integrator.cuh"
#include "gpu_tools.cuh"
#include "define.h"
#include "data.h"
#include <cstring>
#include "tests.cuh"

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 Main function.

Detailed Description

Author:
Julian P. Engel
Date:
08.06.2010

mdgpu - a molecular dynamic simulation program using GPUs
Copyright (C) 2010 Julian P. Engel

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Definition in file main.cu.


Function Documentation

int main ( int  argc,
char *  argv[] 
)

Used to build up the molecular dynamics simulation loop.

Parameters:
[in] argc Number of command line arguments. Have to be 14 and in the following order. In case of unsufficient passed arguments the program will stop.
[in] argv This array holds the 14 command line arguments:

inputfile

inputdata file name

basename

Output base name

dim

System dimension

N

Number of particles given as command line argument

numNN

maximum number of coupled nearest neighbors

T

Temperature

k

spring constant

boxSize

edge length of the simulation box

dt

timestep

NOffset

simulation step count offset

NSim

final simulation step count

NOut

output intervall

NAdjust

NVT velocity scaling and drift removal intervall

gpuDevNo

use specific gpu device

Returns:
Return value is either zero for successful finished runs or non-zero else.

Build in fixed parameters:

rCut

cutoff radius of the Lennard-Jones potential set to $r_{cut}=3*2^{1/6}$

rVer

cutoff radius for the Verlet list of each particle: $r_{ver}=1.7*r_{cut}$

numPointsPerDecade

Number of points per decade in logarithmic output.

threads

Maxium number of threads per thread block on the GPU is set to $128$ (could be up to 512).

redM

Number of values after first level of reduction is set to $128$. It should always be a multiple of $32$ to occupy full blocks in the second reduction level.

redN

Number of threads for second reduction level set to $128$ (maximum: $512$).

Definition at line 64 of file main.cu.

References checkCudaError(), FLOAT_ARRAY_TYPE, generateStartScript(), gpuGenerateVerletListSmem(), loadInitData(), memInfo(), removeDrift(), rescaleT(), setCudaDevice(), and writeData().

 All Files Functions Defines

Generated on Thu Jun 17 14:22:54 2010 for mdgpu - a molecular dynamic simulation program using GPUs by  doxygen 1.6.1