Dear Hannu, in the previous neb implementation it was NOT allowed to have different numbers of k points for different images, as pw was reading kpoints card only once. In the present implemention, the input is read n_input_image time however iosys is called just once, so for averything but the atomic positions ONLY what is readed at the end is savec. So, if you set a different number of kpoints for each image in any case the code will assume that the number of kpoint is the one of the LAST input_image. Your comment will be very useful when we will maybe change pw and cp for computing for the same parallel run "different systems". For the moment, the "best thing" (quick and dirty thing) is that you change with if(.not.allocated) allocate(index_xkq(nkstot)) etc.<br>
<br>thank you very much for repporting the bug.<br><br>cheers<br><br>Layla<br><br><div class="gmail_quote">2011/4/20  <span dir="ltr"><<a href="mailto:hannu.komsa@epfl.ch">hannu.komsa@epfl.ch</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi<br>
<br>
I am trying to do a NEB-calculation using hybrid functionals (HSE).<br>
The first calculation, the first image, is calculated fine, but when<br>
starting the second image, QE crashed with the following error message:<br>
<br>
   At line 228 of file exx.f90<br>
   Fortran runtime error: Attempting to allocate already allocated array<br>
    'index_xkq'<br>
<br>
This line reads as:<br>
      allocate ( index_xkq(nkstot,nqs) )<br>
I could just add if(.not.allocated()) etc.. However, even with this,<br>
if the images have different number of k-points the calculation will<br>
end with a segmentation fault. So I guess it would be better to<br>
deallocate the arrays somewhere, but I don't know how to do this the<br>
best way.<br>
<br>
The error was reproduced with intel and gnu compiler, with 4.3 and CVS<br>
version, and run in parallel or serial. Input file demonstrating the<br>
bug for an unrealistic system included below.<br>
<br>
<br>
Best regards,<br>
   Hannu-Pekka Komsa<br>
   EPFL, Switzerland<br>
<br>
<br>
BEGIN<br>
BEGIN_PATH_INPUT<br>
  &path<br>
   restart_mode      = 'from_scratch'<br>
   string_method     = 'neb',<br>
   nstep_path        = 20,<br>
   ds                = 2.D0,<br>
   opt_scheme        = "broyden",<br>
   num_of_images     = 5,<br>
  /<br>
END_PATH_INPUT<br>
BEGIN_ENGINE_INPUT<br>
  &control<br>
     prefix='Si',<br>
     pseudo_dir = './',<br>
     outdir='./'<br>
  /<br>
  &system<br>
     ibrav=  1, A = 5.465 , nat=  8, ntyp= 1,<br>
     ecutwfc = 20,  nbnd =20,<br>
     input_dft='hse', nqx1 = 1, nqx2 = 1, nqx3 = 1,<br>
     exx_fraction = 0.25,<br>
  /<br>
  &electrons<br>
     conv_thr = 1e-5,<br>
  /<br>
ATOMIC_SPECIES<br>
  Si  28.086  Si.pbe-rrkj.UPF<br>
BEGIN_POSITIONS<br>
FIRST_IMAGE<br>
ATOMIC_POSITIONS crystal<br>
     Si    0.00 0.00 0.00 0 0 0<br>
     Si    0.50 0.50 0.00 0 0 0<br>
     Si    0.00 0.50 0.50 0 0 0<br>
     Si    0.50 0.00 0.50 0 0 0<br>
     Si    0.25 0.25 0.25<br>
     Si    0.75 0.75 0.25 0 0 0<br>
     Si    0.25 0.75 0.75 0 0 0<br>
     Si    0.75 0.25 0.75 0 0 0<br>
LAST_IMAGE<br>
ATOMIC_POSITIONS crystal<br>
Si       0.000000000   0.000000000   0.000000000    0   0   0<br>
Si       0.500000000   0.500000000   0.000000000    0   0   0<br>
Si       0.000000000   0.500000000   0.500000000    0   0   0<br>
Si       0.500000000   0.000000000   0.500000000    0   0   0<br>
Si       0.386058672   0.386058672   0.386058672<br>
Si       0.750000000   0.750000000   0.250000000    0   0   0<br>
Si       0.250000000   0.750000000   0.750000000    0   0   0<br>
Si       0.750000000   0.250000000   0.750000000    0   0   0<br>
END_POSITIONS<br>
K_POINTS automatic<br>
  2 2 2 1 1 1<br>
END_ENGINE_INPUT<br>
END<br>
<br>
<br>
_______________________________________________<br>
Pw_forum mailing list<br>
<a href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a><br>
<a href="http://www.democritos.it/mailman/listinfo/pw_forum" target="_blank">http://www.democritos.it/mailman/listinfo/pw_forum</a><br>
</blockquote></div><br>