CP2k performance

218 views
Skip to first unread message

elbu...@gmail.com

unread,
Jan 25, 2019, 10:46:41 AM1/25/19
to ipi-users
Hello everyone,

I am learning to use I-PI with CP2K and I have been facing an issue that I can't seem to understand and maybe somebody here can help.

It is about performance. If I run a single point calculation with CP2K in a node the calculation finishes in, say, 100 seconds. When I run the same input (just putting the "Driver" part in the CP2K input) and start a Path-Integral NPT dynamics, the first step of the dynamics (i.e., without even getting to the dynamics of each bead), which should be similar to a "single point calculation", takes 300 seconds approx. I though maybe this is a comunication problem, so I've tried all combinations of UNIX/INET and IP addresses I could think of, but all working combinations give me the same time. In addition, I logged into the machine and I've checked that cp2k is running in the nodes 100% in each CPU, non-stop, i.e., there are no CPUs idle at any moment.

The input for i-pi used is shown below. Everything is working, but it is much slower than it should be, I think.

*************************
<simulation verbosity='high'>
  <output prefix='MAPbI3_output'>
    <properties filename='out' stride='1'> [step, time{picosecond}, conserved{kelvin}, temperature{kelvin}, potential{kelvin}, kinetic_cv{kelvin}] </properties>
    <properties filename='force' stride='10'> [atom_f{piconewton}(atom=0;bead=0)] </properties>
    <trajectory filename='pos' stride='50' format='xyz' cell_units='angstrom'> positions{angstrom} </trajectory>
    <checkpoint filename='checkpoint' stride='50' overwrite='True'/>
  </output>
  <total_steps> 2000 </total_steps>
  <prng>
    <seed>20000</seed>
  </prng>
  <ffsocket mode='inet' name='driver'>
    <address>192.168.32.254</address>
    <port>15999</port>
    <latency>0.1</latency>
  </ffsocket>
  <system>
    <cell shape='(3, 3)'>
       [   1.96952000e+01,   0.00000000e+00,   0.00000000e+00,   0.00000000e+00,   1.90825000e+01,
           0.00000000e+00,   0.00000000e+00,   0.00000000e+00,   1.94705000e+01 ]
      </cell>
    <initialize nbeads='16'>
      <file mode='xyz' > MAPbI3-init.xyz </file>
      <velocities mode='thermal' units='kelvin'> 25 </velocities>
    </initialize>
    <forces>
      <force forcefield='driver'/>
    </forces>
    <ensemble>
      <temperature units='kelvin'> 300 </temperature>
      <pressure> 0 </pressure>
    </ensemble>
    <motion mode='dynamics'>
      <dynamics mode='npt'>
        <timestep units='femtosecond'> 0.5 </timestep>
        <thermostat mode='pile_l'>
          <tau units='femtosecond'> 25 </tau>
        </thermostat>
        <barostat mode='isotropic'>
          <thermostat mode='langevin'>
            <tau units='femtosecond'> 125 </tau>
          </thermostat>
          <tau units='femtosecond'> 125 </tau>
        </barostat>
      </dynamics>
    </motion>
  </system>
</simulation>
*************************

Any insight is appreciated. All the best!
Fabio

Michele Ceriotti

unread,
Jan 27, 2019, 5:22:10 PM1/27/19
to ipi-users
Hm. Should take about the same time. I suspect the problem might be with units - is the final energy the same as what you get by calling directly CP2K or absurdly high?  I'm particularly suspicious about 

      <file mode='xyz' > MAPbI3-init.xyz </file>

Unless the file is formatted in i-PI mode, and specifies the units, it will (a) read no unit cell and (b)  assume that input is in atomic units. 


elbu...@gmail.com

unread,
Jan 28, 2019, 7:50:25 AM1/28/19
to ipi-users
Hello Michele Ceriotti,

you are completely right, that was the problem. The energy was high indeed, I had not noticed it. I managed to correct to the right units and now the time/energy are the exactly same.

Thank you very much!
Fabio
Reply all
Reply to author
Forward
0 new messages