This thread is locked.Only browsing is available.
Top Page > Browsing
Segmentation fault in _IO_vfprintf with large basis
Date: 2017/05/05 20:19
Name: Daniil

Dear all,
I have experienced strange errors while trying to perform calculations with somewhat greater than usual basis sets and noncollinear dft. Even with single Nb atom with s9p8d5f3 basis I get following error after SCF convergence:

$mpirun -np 4 ~/openmx3.8_mpigcc/work/openmx nb.dat > log.log
[xeon2:25505] *** Process received signal ***
[xeon2:25505] Signal: Segmentation fault (11)
[xeon2:25505] Signal code: Address not mapped (1)
[xeon2:25505] Failing at address: 0xffffffff00000000
[xeon2:25505] [ 0] /lib64/libpthread.so.0(+0xf140) [0x7f97c150a140]
[xeon2:25505] [ 1] /lib64/libc.so.6(_IO_vfprintf+0x392c) [0x7f97c119debc]
[xeon2:25505] [ 2] /lib64/libc.so.6(_IO_fprintf+0x87) [0x7f97c11a4ec7]
[xeon2:25505] [ 3] /home/daniil/openmx3.8_mpigcc/work/openmx(OM_dual+0x2905) [0x55dbf5]
[xeon2:25505] [ 4] /home/daniil/openmx3.8_mpigcc/work/openmx(DFT+0x525c) [0x4692ec]
[xeon2:25505] [ 5] /home/daniil/openmx3.8_mpigcc/work/openmx(main+0x706) [0x41b986]
[xeon2:25505] [ 6] /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f97c1177455]
[xeon2:25505] [ 7] /home/daniil/openmx3.8_mpigcc/work/openmx() [0x41c5d5]
[xeon2:25505] *** End of error message ***

Log file ends with last successful SCF block with convergence achieved.
When level.of.stdout and level.of.fileout are increased to 2, calculations stop after the beginning of first SCF block, and error is different:

$mpirun -np 4 ~/openmx3.8_mpigcc/work/openmx nb.dat > log.log
[xeon2:25519] *** Process received signal ***
[xeon2:25519] Signal: Segmentation fault (11)
[xeon2:25519] Signal code: (128)
[xeon2:25519] Failing at address: (nil)
[xeon2:25519] [ 0] /lib64/libpthread.so.0(+0xf140) [0x7ff7114e7140]
[xeon2:25519] [ 1] /lib64/libc.so.6(_IO_vfprintf+0x392c) [0x7ff71117aebc]
[xeon2:25519] [ 2] /lib64/libc.so.6(_IO_fprintf+0x87) [0x7ff711181ec7]
[xeon2:25519] [ 3] /home/daniil/openmx3.8_mpigcc/work/openmx() [0x4cbcda]
[xeon2:25519] [ 4] /home/daniil/openmx3.8_mpigcc/work/openmx(Cluster_DFT+0x94) [0x4ccc34]
[xeon2:25519] [ 5] /home/daniil/openmx3.8_mpigcc/work/openmx(DFT+0x8a0) [0x464930]
[xeon2:25519] [ 6] /home/daniil/openmx3.8_mpigcc/work/openmx(main+0x706) [0x41b986]
[xeon2:25519] [ 7] /lib64/libc.so.6(__libc_start_main+0xf5) [0x7ff711154455]
[xeon2:25519] [ 8] /home/daniil/openmx3.8_mpigcc/work/openmx() [0x41c5d5]
[xeon2:25519] *** End of error message ***

My compilation parameters are:
CC = mpicc -O3 -fopenmp -I/usr/lib64/mpi/gcc/openmpi/include/
FC = mpif90 -O3 -fopenmp -I/usr/lib64/mpi/gcc/openmpi/include/
LIB = -L/usr/local/lib -lfftw3 -llapack -lblas -lgfortran -lmpi_f77 -lmpi_f90

Nb calculation files are available at https://www.dropbox.com/sh/yd6o7jh3kxoyd16/AABJorYgKhDdRzCbpDpNyWlta?dl=0

Best regards, Daniil
メンテ
Page: [1]

Re: Segmentation fault in _IO_vfprintf with large basis ( No.1 )
Date: 2017/05/06 16:02
Name: Kylin

Dear Daniil

I tested your file and identify the problem was attributed to the large multiplicity of s-oribital. In default Orbital_Moment.c and Cluster_DFT.c, there is a char point array of Name_Multiple which stored the Multiple name of NAO. However only the first 6 ones was initialized with " 0", " 1", " 2", " 3", " 4", " 5". Thus the NC DFT calculation with NAO multiplicity larger than 6 are possible cause a segment fault with (f)printf function.

Thus just change the way to print the obitial information would solve the problem. modify as
============== Cluster_DFT.C ==================
2530 fprintf(fp_EV,"%4d %3s %2d %s",
2531 Gc_AN,SpeName[wan1], mul,Name_Angular[l][m]);
2534 fprintf(fp_EV," %2d %s",
2535 mul, Name_Angular[l][m]);

============== Orbital_Moment.C ==================
625 fprintf(fp_OM," %s%2d %12.9f %9.4f %9.4f\n",
626 Name_Angular[l][m],
627 mul,

1047 fprintf(fp_OM," %s%2d %12.9f %9.4f %9.4f\n",
1048 Name_Angular[l][m],
1049 mul,
============================================
Cheers
Kylin
メンテ
Re: Segmentation fault in _IO_vfprintf with large basis ( No.2 )
Date: 2017/05/07 03:35
Name: Daniil

Thanks, that worked!

Interesting, if there was any reason to limit multiplicity by such a small value...

Best regards, Daniil
メンテ
Re: Segmentation fault in _IO_vfprintf with large basis ( No.3 )
Date: 2017/05/18 11:22
Name: T. Ozaki

Hi,

Thank you for reporting the problem and a way of fixing it.
I will update the code according to the way.

Regards,

TO
メンテ
Re: Segmentation fault in _IO_vfprintf with large basis ( No.4 )
Date: 2017/05/19 05:02
Name: Daniil

There is at least one more problem of same type in Cluster_DFT.C at lines 1381 and 1384. This one appears when scf.SpinPolarization=off
メンテ

Page: [1]