segfault in vasp 5.2 due to uninitialized pointer

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


Moderators: Global Moderator, Moderator

Locked
Message
Author
alex2011
Newbie
Newbie
Posts: 1
Joined: Wed Feb 02, 2011 4:43 am

segfault in vasp 5.2 due to uninitialized pointer

#1 Post by alex2011 » Wed Feb 02, 2011 5:04 am

Dear vasp developers:

I have encountered a segfault in vasp 5.2 which could be traced to an uninitialized pointer in chi.F
The segfault appears because of the reliance on the associated subroutine to return false when called on a pointer that has never been associated.
Here is a quote that I think sets things straight:
"Many people think that the status of a pointer which has never been associated is .not. associated. This is false.", and more detail here:
http://www.cs.rpi.edu/~szymansk/OOF90/bugs.html

Thus, the line
TYPE (one_center_handle), POINTER :: H
in chi.F should be replaced with
TYPE (one_center_handle), POINTER :: H=>NULL()
because checks ASSOCIATED(H) are called later on on H in chi_base.F, expecting it to return false, which is not guaranteed in the current version.
Thank you.

Alex Kutana
Last edited by alex2011 on Wed Feb 02, 2011 5:04 am, edited 1 time in total.

support_vasp
Global Moderator
Global Moderator
Posts: 1817
Joined: Mon Nov 18, 2019 11:00 am

Re: segfault in vasp 5.2 due to uninitialized pointer

#2 Post by support_vasp » Tue Sep 10, 2024 2:09 pm

Hi,

We're sorry that we didn’t answer your question. This does not live up to the quality of support that we aim to provide. The team has since expanded. If we can still help with your problem, please ask again in a new post, linking to this one, and we will answer as quickly as possible.

Best wishes,

VASP


Locked