diff options
author | Magnus Lundborg <magnus.lundborg@scilifelab.se> | 2013-01-10 10:16:46 (GMT) |
---|---|---|
committer | Magnus Lundborg <magnus.lundborg@scilifelab.se> | 2013-01-10 10:16:46 (GMT) |
commit | 7b3daed952505700792baa58d418fc138475f883 (patch) | |
tree | 10fba88e54a959c4d7d9c0162564ddb58de24215 /src/tests/md_openmp.c | |
parent | 8adf800968b78afecbc9ddbb8e87f97f476a7bb5 (diff) |
Added fortran version of md example (not working fully yet). Added an example for getting positions from file. Minor fixes.
Diffstat (limited to 'src/tests/md_openmp.c')
-rw-r--r-- | src/tests/md_openmp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tests/md_openmp.c b/src/tests/md_openmp.c index 8c96d5a..198755b 100644 --- a/src/tests/md_openmp.c +++ b/src/tests/md_openmp.c @@ -159,6 +159,7 @@ int main ( int argc, char *argv[] ) } + /* Add the box shape data block and write the file headers */ if(tng_data_block_add(traj, TNG_TRAJ_BOX_SHAPE, "BOX SHAPE", TNG_DOUBLE_DATA, TNG_NON_TRAJECTORY_BLOCK, 1, 9, 1, TNG_UNCOMPRESSED, box_shape) == TNG_CRITICAL || @@ -216,8 +217,6 @@ int main ( int argc, char *argv[] ) step_print_index++; step_print = ( step_print_index * step_num ) / step_print_num; - wtime = omp_get_wtime ( ); - /* Create a frame set for writing data */ tng_num_frames_per_frame_set_get(traj, &n_frames_per_frame_set); if(tng_frame_set_new(traj, 0, @@ -274,6 +273,8 @@ int main ( int argc, char *argv[] ) exit(1); } + wtime = omp_get_wtime ( ); + for ( step = 1; step <= step_num; step++ ) { compute ( np, nd, pos, vel, mass, force, &potential, &kinetic ); @@ -327,6 +328,8 @@ int main ( int argc, char *argv[] ) /* Terminate. */ + tng_trajectory_destroy(&traj); + printf ( "\n" ); printf ( "MD_OPENMP\n" ); printf ( " Normal end of execution.\n" ); |