alchemy with multiple SUBSYS bug

marc marcvanh... at
Mon Feb 18 16:59:37 UTC 2013

In the attachment I added a debug report for this bug.  I have circumvented 
the problem, and works on my own computer, although my hack still needs 
testing on our computing clusters.  Providing a in-depth full solution is 
beyond me since I'm not a CP2K developer, but I hope it is of use for 
someone else.

best regards

On Friday, February 8, 2013 10:22:41 AM UTC+1, marc wrote:
> Can this problem be related to this thread somehow?
> No succes yet on this matter. I added a big molecular methanol system (128 
> molecules) and a small one (2 molecules) that reproduce the problem.  
> Important to mention is that the computation only fails when run in 
> parallel mode.  It does not occur with a NVT ensemble and/or in serial mode 
> (only the combination NPT ensemble and parallel computation fails).  
> Probably this is due to the stress tensor implementation.
> marc
> On Tuesday, November 27, 2012 3:35:51 PM UTC+1, Noam Bernstein wrote:
>> Hi - I think I've found a small bug in the alchemy code, and I'm not sure 
>> how
>> best to fix it. For example for
>> there are two calls to mixed_map_forces(), the first with 
>> overwrite=.true., the
>> second with overwrite=.false.  However, if the first FORCE_ENV has some of
>> the atoms missing (e.g. alchemy), the atoms that are missing never have
>> their forces overwritten.  Presumably those forces should be set to 0 
>> before
>> the forces from the second FORCE_ENV are added.  
>> Was there some particular reason that the mixed forces aren't all just 
>> initialized to 0, 
>> and instead the overwrite argument is used?  Because I don't see a 
>> reliable way of
>> fixing this problem without either some tedious bookkeeping to find
>> all atoms that map to nothing in the overwrite=.true. case, or just 
>> setting
>> all the forces to 0 before the calls to mixed_map_forces().  I'd be happy
>> to submit a patch, but if there's some reason it's not a good idea to set
>> all the forces to 0, I'd like to understand that.
>>            Noam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug_report.pdf
Type: application/pdf
Size: 98876 bytes
Desc: not available
URL: <>

More information about the CP2K-user mailing list