diff --git a/sPuReMD/src/reax_types.h b/sPuReMD/src/reax_types.h index 2179e26a4cc5fb4a93d522d52e9a7347fdec8ab5..66530615192ba28523075b0fdca74c405e0f7d31 100644 --- a/sPuReMD/src/reax_types.h +++ b/sPuReMD/src/reax_types.h @@ -1803,7 +1803,8 @@ struct spuremd_handle output_controls *out_control; /* TRUE if file I/O for simulation output enabled, FALSE otherwise */ int output_enabled; - /* TRUE if reallocation is required due to num. atoms increasing, FALSE otherwise */ + /* TRUE if reallocation is required due to num. atoms increasing + * (this includes first simulation run), FALSE otherwise */ int realloc; /* Callback for getting simulation state at the end of each time step */ callback_function callback; diff --git a/sPuReMD/src/spuremd.c b/sPuReMD/src/spuremd.c index 22b93fd5cfb48f097e9f7265cc0c454c98fadf58..9c9097f1ad064a4da04f58b8a054c9a72d383e66 100644 --- a/sPuReMD/src/spuremd.c +++ b/sPuReMD/src/spuremd.c @@ -369,8 +369,6 @@ int simulate( const void * const handle ) spmd_handle->output_enabled, spmd_handle->realloc ); - spmd_handle->realloc = FALSE; - /* compute f_0 */ //if( control.restart == FALSE ) { Reset( spmd_handle->system, spmd_handle->control, spmd_handle->data, @@ -476,6 +474,7 @@ int simulate( const void * const handle ) fprintf( spmd_handle->out_control->log, "total: %.2f secs\n", spmd_handle->data->timing.elapsed ); } + spmd_handle->realloc = FALSE; ret = SPUREMD_SUCCESS; }