[ase-users] CP2K calculator hangs

Eric Hermes ehermes at chem.wisc.edu
Fri Mar 18 15:16:06 CET 2016


Hello,

For what it's worth, I seem to have found the issue, and it is unrelated to ASE. CP2K seem to be very particular about the MPI toolset that it is compiled with and the MPI environment that it's run in. I had previously been compiling CP2K with mvapich2 and running it with slurm's "srun" command, but I found that it is necessary to compile CP2K with OpenMPI and run it with OpenMPI's "mpirun" to prevent random hangs.

Glen, the CP2K interface for ASE is actually quite a bit nicer than VASP's in a way, in that rather than constantly starting and stopping the executable which requires lengthy initialization for each call, the CP2K calculator maintains a constant connection to CP2K's shell interface. This means that CP2K only has to initialize once per calculator instance, and therefore using CP2K with ASE incurs extremely little overhead. In principle, the VASP calculator could be made to do this too, as VASP has a hidden (undocumented) INCAR parameter "INTERACTIVE" that enables VASP to take atomic positions from stdin and output energies/forces to stdout. This would make using VASP with ASE far more efficient.

Eric

From: Glen Jenness [mailto:glenjenness at gmail.com]
Sent: Wednesday, March 16, 2016 11:25 AM
To: Eric Hermes <ehermes at chem.wisc.edu>
Cc: ase-users at listserv.fysik.dtu.dk
Subject: Re: [ase-users] CP2K calculator hangs

Eric,
I found with VASP that the python is being executed while the VASP executable is still cleaning up, resulting in oddities such as partial inputs, "node is busy" messages from the queue, etc.  In these cases, a pause of a few seconds is all that is needed (I use 5s).

Glen

On Wed, Mar 16, 2016 at 10:27 AM, Eric Hermes <ehermes at chem.wisc.edu<mailto:ehermes at chem.wisc.edu>> wrote:
Hello,

I have been trying for some time to get CP2K to work on our campus cluster with ASE. While I have managed to finally produce a working executable that doesn't segfault or buffer overflow (pro tip: use the GNU compilers plus OpenMPI), I am running into a persistent issue where the CP2K calculator seems to hang after a period of time. Specifically, what is happening is that the calculator initializes and runs properly at first, but if I am performing a geometry relaxation (and presumably AIMD, though I haven't tried this), the calculation will randomly hang after some number of ionic steps. The cp2k_shell executable and the python script are both still running on the compute nodes, but the calculation does not proceed. Occasionally, but not always, the "inp" file produced by the ASE calculator will be incomplete, usually truncated in the middle of the atomic position declarations. I worry that this issue is being caused by something like a race condition in the communication between ASE and the cp2k_shell executable. Does anybody have any insight into this issue? I am going to continue debugging this by putting a sleep(0.1) statement at the end of the _send() function in the CP2K class, but since the hangs seem to happen at random after several hours of working just fine I'll have to wait and see whether this actually does anything.

Eric

_______________________________________________
ase-users mailing list
ase-users at listserv.fysik.dtu.dk<mailto:ase-users at listserv.fysik.dtu.dk>
https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users



--
Dr. Glen Jenness
Catalysis Center for Energy Innovation (CCEI)
University of Delaware
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20160318/6464952f/attachment.html>


More information about the ase-users mailing list