The global state can only be accessed on master rank, so we should set
the flags there and then permit the DD code to propagate the setup of
the cg_p vector.
Fixes #2554
Change-Id: If294bf000eb0266125ecc6c6bf937aac0390e2b8
Fixes where mdrun could behave incorrectly
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Multi-domain Conjugate Gradient minimimization no longer segfaults.
+
+:issue:`2554`
Fixes for ``gmx`` tools
^^^^^^^^^^^^^^^^^^^^^^^
step = 0;
- // Ensure the extra per-atom state array gets allocated
- state_global->flags |= (1<<estCGP);
+ if (MASTER(cr))
+ {
+ // Ensure the extra per-atom state array gets allocated
+ state_global->flags |= (1<<estCGP);
+ }
/* Create 4 states on the stack and extract pointers that we will swap */
em_state_t s0 {}, s1 {}, s2 {}, s3 {};