<div dir="ltr">Dear all,<div><br></div><div>I have been facing some strange issues with CP2K version 4.1 and I'm looking forward having your advice. </div><div><br></div><div>I would like to apply the self-consistent dipole correction for a slab calculation and I noticed an inconsistent behavior of cp2k with respect to the number of cores used:</div><div><br></div><div>Whenever I'm running a simple exercise of a water molecule in a box (see the attached test.inp file) using 1 core, the dipole correction is working smoothly and I'm reaching convergence without any issue. On the other hand if I'm using more than 1 core, cp2k returns the following error message: " Dipole correction needs more vacuum space above the surface ".</div><div><br></div><div>I hence hacked a bit the code to understand what I did wrong and printed some information from the surface_dipole.F routine.</div><div><br></div><div>I monitored the "height_min" and  "rhoav_min" internal variables that are used to detect the position of the vacuum section in the supercell. </div><div>If I'm correct, line 183 of the routine is basically checking whether the average of the electronic density (rhoav_min - if I got it well) is low enough (IF (rhoav_min >= 1.E-5_dp) -> stop) to provide the index of the numerical grid that corresponds to vacuum.</div><div><br></div><div>The strange thing is that whenever I'm using 1 core, cp2k detects a rhoav_min value of 2.776668424252914E-007 within the first scf cycle and goes on without any issue until convergence. </div><div>On the other hand, while whenever I'm using 2 and 4 cores, it returns a value of :2.327421985372404E-004 and 6.156728744828596E-005, respectively. </div><div>In both cases, this is larger than the threshold used to detect the vacuum part at line 183 (IF (rhoav_min >= 1.E-5_dp)) - I attached the log files for your inconvenience. </div><div>I was naively expecting that rhoav_min should be the same, independently of the number of the grid used but obviously either there is an issue with the averaged value or the system is probing another point of the grid. Unless if I'm mistaken, it looks to me that there is an issue with the collection by mpi of the grid values or something like that but unfortunately, I could not trace further the issue. </div><div><br></div><div>I'm hence wondering if someone else has met the issue and if so, I'd really appreciate if you could help me figuring out what is on-going and what I missed.</div><div><br></div><div>Thank you very much for your help,</div><div><br></div><div>Regards,</div><div><br></div><div>Ashish</div><div><br></div><div><br></div><div> </div><div><br></div><div><br></div></div>