void print_date_and_time(FILE *log, int pid, const char *title,
const gmx_runtime_t *runtime);
+GMX_LIBMD_EXPORT
+void print_start(FILE *fplog, t_commrec *cr, gmx_runtime_t *runtime,
+ const char *name);
+
GMX_LIBMD_EXPORT
void finish_run(FILE *log, t_commrec *cr, const char *confout,
t_inputrec *inputrec,
fprintf(fplog, "\n");
}
- /* Set and write start time */
+ print_start(fplog, cr, runtime, "mdrun");
runtime_start(runtime);
- print_date_and_time(fplog, cr->nodeid, "Started mdrun", runtime);
wallcycle_start(wcycle, ewcRUN);
- if (fplog)
- {
- fprintf(fplog, "\n");
- }
/* safest point to do file checkpointing is here. More general point would be immediately before integrator call */
#ifdef GMX_FAHCORE
#include "force.h"
#include "mdrun.h"
#include "md_support.h"
+#include "sim_util.h"
#include "domdec.h"
#include "partdec.h"
#include "trnio.h"
gmx_wallcycle_t wcycle,
const char *name)
{
- char buf[STRLEN];
-
runtime_start(runtime);
-
- sprintf(buf, "Started %s", name);
- print_date_and_time(fplog, cr->nodeid, buf, NULL);
-
wallcycle_start(wcycle, ewcRUN);
+ print_start(fplog, cr, runtime, name);
}
+
static void em_time_end(FILE *fplog, t_commrec *cr, gmx_runtime_t *runtime,
gmx_wallcycle_t wcycle)
{
}
}
+void print_start(FILE *fplog, t_commrec *cr, gmx_runtime_t *runtime,
+ const char *name)
+{
+ char buf[STRLEN];
+
+ sprintf(buf, "Started %s", name);
+ print_date_and_time(fplog, cr->nodeid, buf, runtime);
+}
+
static void sum_forces(int start, int end, rvec f[], rvec flr[])
{
int i;
/* Print to log file */
runtime_start(runtime);
- print_date_and_time(fplog, cr->nodeid,
- "Started Test Particle Insertion", runtime);
wallcycle_start(wcycle, ewcRUN);
+ print_start(fplog, cr, runtime, "Test Particle Insertion");
/* The last charge group is the group to be inserted */
cg_tp = top->cgs.nr - 1;