flexible-atomic-code / fac

FAC - Flexible Atomic Code by Ming Feng Gu
GNU General Public License v3.0
74 stars 56 forks source link

Segmatation fault when executing pfac.atom.atomic_data #648

Open AtsushiTanimoto opened 1 year ago

AtsushiTanimoto commented 1 year ago

Thank you for maintaining the flexible atomic code. I ran the following code with the latest version of the flexible atomic code and got a segmentation fault. How do I get around this problem?

import pfac.atom
import pfac.fac
import subprocess

if __name__=="__main__":
    atomic_number   = 1
    atomic_symbol   = pfac.fac.ATOMICSYMBOL[atomic_number]
    electron_number = 1
    directory       = "database/{0:s}/".format(atomic_symbol)
    subprocess.run("mkdir database", shell=True)
    subprocess.run("mkdir database/{0:s}".format(atomic_symbol), shell=True)
    pfac.atom.atomic_data(nele=[electron_number], asym=atomic_symbol, dir=directory)
adding complex: ['grd.0'], ['1*1']
adding complex: ['exc.0.2.0'], ['2*1']
adding complex: ['exc.0.3.0'], ['3*1']
adding complex: ['exc.0.4.0'], ['4*1']
adding complex: ['exc.0.5.0'], ['5*1']
adding complex: ['exc.0.6.0'], ['6*1']
adding complex: ['exc.0.7.0'], ['7*1']
adding complex: ['exc.0.8.0'], ['8*1']
adding complex: ['exc.0.9.0'], ['9*1']
adding complex: ['ion.0.0'], ['']
NELE = 1
ATOM = H, Z = 1
EN...
Structure: ground complex
zsh: segmentation fault  /opt/homebrew/bin/python3 atomic.py
mfgu commented 1 year ago

cannot reproduce the issue.

I have been doing some frequent updates in the last few days. after you update to the latest version, it's recommended to do a clean build, by issuing "make clean" first.

let me know if the problem persists.

AtsushiTanimoto commented 1 year ago

Thank you for your reply.

I have been doing some frequent updates in the last few days. after you update to the latest version, it's recommended to do a clean build, by issuing "make clean" first.

I appreciate your suggestion. After "make clean", I have confirmed that the problem was solved.

bingxin377 commented 1 year ago

I also encountered the same problem. I checked with GDB and the prompt is as follows:

880327fcbbaf7a24cd5693917117612