PATCH fock.F, uninitialized variable SZPRECFOCK breaks vasprun.xml

Problems running VASP: crashes, internal errors, "wrong" results.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
slabanja
Newbie
Newbie
Posts: 2
Joined: Tue Aug 17, 2010 11:15 am

PATCH fock.F, uninitialized variable SZPRECFOCK breaks vasprun.xml

#1 Post by slabanja » Tue Aug 17, 2010 11:32 am

Problem: As of 5.2.8, vasprun.xml can contain NULL-bytes after the PRECFOCK-tag.

I guess that the part of the code that is supposed to initialize the variable SZPRECFOCK is only called conditionally. Other conditions (possibly always) control whether PRECFOCK is written to the vasprun.xml-file. The uninitialized state of SZPRECFOCK (can) cause NULL-bytes to be written, rendering a broken vasprun.xml-file.

A trivial patch is included below.

Best regards,
Mattias Slabanja

--- a/vasp.5.2/fock.F
+++ b/vasp.5.2/fock.F
@@ -36,7 +36,7 @@ MODULE fock
! F fast (coarse grid for HF, soft augmentation charge)
! N normal (normal grid for HF, normal augmentation charge)
! A accurate (normal grid for HF, soft augmentation charge)
- CHARACTER (6), SAVE :: SZPRECFOCK
+ CHARACTER (6), SAVE :: SZPRECFOCK = ' '
REAL(q) :: ENCUTFOCK ! no longer supported

! use EXX-optimized effective potential method
Last edited by slabanja on Tue Aug 17, 2010 11:32 am, edited 1 time in total.

slabanja
Newbie
Newbie
Posts: 2
Joined: Tue Aug 17, 2010 11:15 am

PATCH fock.F, uninitialized variable SZPRECFOCK breaks vasprun.xml

#2 Post by slabanja » Tue Aug 17, 2010 11:35 am

ehm, the forum reformatted the patch. :(
There were supposed to be SIX spaces in between the quote marks.
Last edited by slabanja on Tue Aug 17, 2010 11:35 am, edited 1 time in total.

Post Reply