Clean up PME load balancing struct
[alexxy/gromacs.git] / src / gromacs / mdrun / md.cpp
index 702bb9e0e51ebe5b2c42e85cc256ecc57f2c2de4..1aed281feb0abbea5f6bf05a5af14d7cfa93bbee 100644 (file)
@@ -193,7 +193,6 @@ void gmx::Integrator::do_md()
     char                    sbuf[STEPSTRSIZE], sbuf2[STEPSTRSIZE];
 
     /* PME load balancing data for GPU kernels */
-    pme_load_balancing_t *pme_loadbal      = nullptr;
     gmx_bool              bPMETune         = FALSE;
     gmx_bool              bPMETunePrinting = FALSE;
 
@@ -406,6 +405,8 @@ void gmx::Integrator::do_md()
      * Coulomb. It is not supported with only LJ PME. */
     bPMETune = (mdrunOptions.tunePme && EEL_PME(fr->ic->eeltype) &&
                 !mdrunOptions.reproducible && ir->cutoff_scheme != ecutsGROUP);
+
+    pme_load_balancing_t *pme_loadbal      = nullptr;
     if (bPMETune)
     {
         pme_loadbal_init(&pme_loadbal, cr, mdlog, *ir, state->box,