OrderN / CONQUEST-release

Full public release of large scale and linear scaling DFT code CONQUEST
http://www.order-n.org/
MIT License
96 stars 25 forks source link

MakeIonFiles segmentation fault for LDA #63

Closed smujahed closed 3 years ago

smujahed commented 3 years ago

I have been trying to generate some LDA basis sets and have found that for all elements and basis set sizes MakeIonFiles will SEGFAULT. The error isn't obvious to me, but I have included all files necessary to replicate the issue assuming it is not an issue with my binary or linked libraries. I have only included samples of the issue with H and Si.

The pseudopotentials and inputs are the same as those found in: https://github.com/OrderN/CONQUEST-release/tree/master/pseudo-and-pao

Without the same Intel compiler, FFTW and LibXC versions I have, do you successfully generate the basis? If so, could you let me know what compilers and libraries you're using? It's possible there is something wrong with my binary or libraries, but I have had success running CONQUEST in the past with these.

Code versions and compile environment:

bad-basis-gen.tar.gz

ayakon commented 3 years ago

I got the same problem. I could generate GGA basis, but failed for LDA basis. I used LibXC 3.3.8, and couldn't  solve this problem yet.

Ayako Nakata

I have been trying to generate some LDA basis sets and have found that for all elements and basis set sizes MakeIonFiles will SEGFAULT. The error isn't obvious to me, but I have included all files necessary to replicate the issue assuming it is not an issue with my binary or linked libraries. I have only included samples of the issue with H and Si.

The pseudopotentials and inputs are the same as those found in: https://github.com/OrderN/CONQUEST-release/tree/master/pseudo-and-pao

Without the same Intel compiler, FFTW and LibXC versions I have, do you successfully generate the basis? If so, could you let me know what compilers and libraries you're using? It's possible there is something wrong with my binary or libraries, but I have had success running CONQUEST in the past with these.

Code versions and compile environment:

bad-basis-gen.tar.gz https://github.com/OrderN/CONQUEST-release/files/4905816/bad-basis-gen.tar.gz

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OrderN/CONQUEST-release/issues/63, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADIRNHRKN3SHTSKIQ6FPN2TR26MXZANCNFSM4OW7Z4BA.

--

Ayako Nakata, Ph.D First-principles Simulation Group, Nano-Theory Field, International Center for Materials Nanoarchitectonics (MANA), National Institute for Materials Science (NIMS) 1-1 Namiki, Tsukuba, Ibaraki 305-0044, JAPAN Phone: +81-29-860-4980 Email: NAKATA.Ayako@nims.go.jp

smujahed commented 3 years ago

@ayakon Thank you for confirming.

davidbowler commented 3 years ago

I have no problem using GCC 9.3.0, FFTW 3.3.8 and LibXC 4.3.4.

@smujahed Where does it segfault? Please run with Iprint 6 and IO.WriteOutToFile F to help us identify where the fault is. @ayakon Which compiler did you use?

smujahed commented 3 years ago

@davidbowler How strange.

I have run with Iprint 6 and WriteOutToFile F, although this last flag seems to have been ignored (I can't see it in the input.log). Please find the output attached again for H and Si.

N.B. The directory in the zip file has the same name as the previous version, so take care when choosing an extraction location, sorry!

bad-basis-gen-2.tar.gz

davidbowler commented 3 years ago

OK - we both made mistakes! It should have been:

IO.WriteOutToFile F

but this is only for Conquest. Please save output (pipe to tee).

smujahed commented 3 years ago

@davidbowler Ah, I see! All output produced by MakeIonFiles is in the out-debug files, i.e.

~/bin/MakeIonFiles &> out-debug

davidbowler commented 3 years ago

OK - the problem is here:

https://github.com/OrderN/CONQUEST-release/blob/8dc94a8907b6a21b25f6a4340aeb990c8daa9bbf/tools/BasisGeneration/radial_xc_LibXC_module.f90#L218-L222

We should have exc_array declared always. Fix coming soon.

smujahed commented 3 years ago

I will test this now.

Thank you for the quick patch!

davidbowler commented 3 years ago

Please use the new branch:

https://github.com/OrderN/CONQUEST-release/tree/bugfix-ionfile-xc-error