Replace gmx_large_int_t with gmx_int64_t
[alexxy/gromacs.git] / src / gromacs / mdlib / md_support.c
index 1a3e7dd36e42bb5cc1dc8d3fcacf4be35b45a1b6..d60e052d9f775856531be3b4265937df8d737240 100644 (file)
@@ -56,14 +56,14 @@ gmx_bool gs_simlocal[eglsNR] = { TRUE, FALSE, FALSE, TRUE };
 
 /* check which of the multisim simulations has the shortest number of
    steps and return that number of nsteps */
-gmx_large_int_t get_multisim_nsteps(const t_commrec *cr,
-                                    gmx_large_int_t  nsteps)
+gmx_int64_t get_multisim_nsteps(const t_commrec *cr,
+                                gmx_int64_t      nsteps)
 {
-    gmx_large_int_t steps_out;
+    gmx_int64_t steps_out;
 
-    if MASTER(cr)
+    if (MASTER(cr))
     {
-        gmx_large_int_t *buf;
+        gmx_int64_t     *buf;
         int              s;
 
         snew(buf, cr->ms->nsim);
@@ -86,12 +86,12 @@ gmx_large_int_t get_multisim_nsteps(const t_commrec *cr,
         if (steps_out >= 0 && steps_out < nsteps)
         {
             char strbuf[255];
-            snprintf(strbuf, 255, "Will stop simulation %%d after %s steps (another simulation will end then).\n", gmx_large_int_pfmt);
+            snprintf(strbuf, 255, "Will stop simulation %%d after %s steps (another simulation will end then).\n", "%"GMX_PRId64);
             fprintf(stderr, strbuf, cr->ms->sim, steps_out);
         }
     }
     /* broadcast to non-masters */
-    gmx_bcast(sizeof(gmx_large_int_t), &steps_out, cr);
+    gmx_bcast(sizeof(gmx_int64_t), &steps_out, cr);
     return steps_out;
 }
 
@@ -507,7 +507,7 @@ void check_nst_param(FILE *fplog, t_commrec *cr,
     }
 }
 
-void set_current_lambdas(gmx_large_int_t step, t_lambda *fepvals, gmx_bool bRerunMD,
+void set_current_lambdas(gmx_int64_t step, t_lambda *fepvals, gmx_bool bRerunMD,
                          t_trxframe *rerun_fr, t_state *state_global, t_state *state, double lam0[])
 /* find the current lambdas.  If rerunning, we either read in a state, or a lambda value,
    requiring different logic. */
@@ -518,7 +518,7 @@ void set_current_lambdas(gmx_large_int_t step, t_lambda *fepvals, gmx_bool bReru
     {
         if (rerun_fr->bLambda)
         {
-            if (fepvals->delta_lambda==0)
+            if (fepvals->delta_lambda == 0)
             {
                 state_global->lambda[efptFEP] = rerun_fr->lambda;
                 for (i = 0; i < efptNR; i++)
@@ -581,7 +581,8 @@ void set_current_lambdas(gmx_large_int_t step, t_lambda *fepvals, gmx_bool bReru
         }
         else
         {
-            if (state->fep_state > 0) {
+            if (state->fep_state > 0)
+            {
                 state_global->fep_state = state->fep_state; /* state->fep is the one updated by bExpanded */
                 for (i = 0; i < efptNR; i++)
                 {