cut3d error when extracting wave functions from _WFK file

MULTIBINIT, aTDEP, ANADDB, optics, cut3d, mrg* postprocessors

Moderators: MMNSchmitt, gonze

Locked
boubacar
Posts: 5
Joined: Sun May 07, 2017 5:15 pm

cut3d error when extracting wave functions from _WFK file

Post by boubacar » Sun May 07, 2017 5:49 pm

Hi all,

I would like to extract wavefunctions at specific k points from abinit _WFK file using cut3d. However, cut3d issues error at the stage where I enter spinor component that I am interested in.
I am using abinit8.2.2 and it is the first time that I encounter this problem.

Below is the error message. Does anyone have any idea what could possibly be the problem?
----

This file is a WF file.

For which k-points? (1 to 2)
1
=> Your k-point is : 1


For which band ? (1 to 1620)
1592
=> Your band number is : 1592

=> Your spin polarisation number is : 1

nspinor = 2

For which spinor component ?
1
=> Your spinor component is : 1

[login3:20504:0] Caught signal 11 (Segmentation fault)
==== backtrace ====
2 0x00000000000686ec mxm_handle_error() /var/tmp/OFED_topdir/BUILD/mxm-3.5.3093/src/mxm/util/debug/debug.c:641
3 0x0000000000068c3c mxm_error_signal_handler() /var/tmp/OFED_topdir/BUILD/mxm-3.5.3093/src/mxm/util/debug/debug.c:616
4 0x0000000000035250 killpg() ??:0
5 0x00000000000421b0 __intel_avx_rep_memcpy() ??:0
6 0x00000000000310e4 ADIOI_GEN_ReadStrided() /gestconf/project/hpcdelivery/build/current_SCS5R1/obj/x86_64_rhel7_r1/topdir/BUILD/openmpi-2.0.1/ompi/mca/io/romio314/romio/adio/common/ad_read_str.c:299
7 0x000000000000d6b3 MPIOI_File_read() /gestconf/project/hpcdelivery/build/current_SCS5R1/obj/x86_64_rhel7_r1/topdir/BUILD/openmpi-2.0.1/ompi/mca/io/romio314/romio/mpi-io/read.c:166
8 0x000000000000d453 mca_io_romio314_dist_MPI_File_read() /gestconf/project/hpcdelivery/build/current_SCS5R1/obj/x86_64_rhel7_r1/topdir/BUILD/openmpi-2.0.1/ompi/mca/io/romio314/romio/mpi-io/read.c:55
9 0x00000000000812d2 PMPI_File_read() /gestconf/project/hpcdelivery/build/current_SCS5R1/obj/x86_64_rhel7_r1/topdir/BUILD/openmpi-2.0.1/ompi/mpi/c/profile/pfile_read.c:68
10 0x000000000004b0c1 ompi_file_read_f() /gestconf/project/hpcdelivery/build/current_SCS5R1/obj/x86_64_rhel7_r1/topdir/BUILD/openmpi-2.0.1/ompi/mpi/fortran/mpif-h/profile/pfile_read_f.c:82
11 0x000000000070fd08 m_mpiotk_mp_mpiotk_read_fsuba_dp2d_() /scratch/cnusc/adci/acirou/abinit-8.2.2/src/27_toolbox_oop/m_mpiotk.F90:360
12 0x000000000047763e m_wfk_mp_wfk_read_band_block_() /scratch/cnusc/adci/acirou/abinit-8.2.2/src/62_iowfdenpot/m_wfk.F90:1404
13 0x000000000042d84f m_cut3d_mp_cut3d_wffile_() /scratch/cnusc/adci/acirou/abinit-8.2.2/src/83_cut3d/m_cut3d.F90:1985
14 0x000000000040747a MAIN__() /scratch/cnusc/adci/acirou/abinit-8.2.2/src/98_main/cut3d.F90:253
15 0x00000000004052be main() ??:0
16 0x0000000000021b35 __libc_start_main() ??:0
17 0x00000000004051c9 _start() ??:0
===================
Segmentation fault

----------

Thanks for your help,
Boubacar

mverstra
Posts: 655
Joined: Wed Aug 19, 2009 12:01 pm

Re: cut3d error when extracting wave functions from _WFK fil

Post by mverstra » Tue May 09, 2017 10:37 pm

Hello Boubacar,

your WFK file is probably corrupted somehow. As your k-point is towards the end, the header may be intact but not all of the file (or it may have been truncated because your disk quota ran out?)

Other possibility: was it made on the same system as the cut3d you are running? The binary files may not be compatible.

good luck
Matthieu Verstraete
University of Liege, Belgium

boubacar
Posts: 5
Joined: Sun May 07, 2017 5:15 pm

Re: cut3d error when extracting wave functions from _WFK fil

Post by boubacar » Tue May 09, 2017 11:26 pm

Hello Mathieu,

Thank you for your reply!

I don't think that it is a disk space problem because I still have much space left. I have tried the same cut3d with the density file *_DEN and it works.
It may indeed be that my _WFK file is corrupted but I don't know how to check that (how would I check that)?

I was thinking that the RAM may not be enough when running cut3d since the _WFK file is huge (47 GB) with 1620 bands. So I was wondering if it could not be related to that?
Any ideas ...?

Thanks,
Boubacar

boubacar
Posts: 5
Joined: Sun May 07, 2017 5:15 pm

Re: cut3d error when extracting wave functions from _WFK fil

Post by boubacar » Fri May 12, 2017 3:36 pm

Hello,

I have just run cut3d on a machine with 100GB of RAM and I still have a segmentation fault. The caclulations with abinit 8.2.2 goes to the end and finishes properly. But I don't see why cut3d fails. I am suspecting the problem to be related to cut3d (in abinit 8.2.2) in extracting the wavefunctions. I note that it works with the density file _DEN without problem.
Below is the error message with _WFK file :

---
This file is a WF file.

For which k-points? (1 to 2)
1
=> Your k-point is : 1


For which band ? (1 to 1632)
1592
=> Your band number is : 1592

=> Your spin polarisation number is : 1

nspinor = 2

For which spinor component ?
1
=> Your spinor component is : 1

forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
cut3d 000000000088C65D Unknown Unknown Unknown
cut3d 000000000088A4F7 Unknown Unknown Unknown
cut3d 0000000000833CA4 Unknown Unknown Unknown
cut3d 0000000000833AB6 Unknown Unknown Unknown
cut3d 00000000007BCC49 Unknown Unknown Unknown
cut3d 00000000007C27B0 Unknown Unknown Unknown
Unknown 00000036CB60F7E0 Unknown Unknown Unknown
libmpifort.so.12 00002B766B2CF597 Unknown Unknown Unknown
libmpi.so.12 00002B766B65AB94 Unknown Unknown Unknown
libmpi.so.12 00002B766B8DF3B6 Unknown Unknown Unknown
libmpi.so.12 00002B766B8DF0D2 Unknown Unknown Unknown
libmpifort.so.12 00002B766B27C559 Unknown Unknown Unknown
cut3d 0000000000701D29 Unknown Unknown Unknown
cut3d 00000000004722A9 Unknown Unknown Unknown
cut3d 000000000042C572 Unknown Unknown Unknown
cut3d 000000000040E7E2 Unknown Unknown Unknown
cut3d 000000000040D35E Unknown Unknown Unknown
libc.so.6 00000036CB21ED5D Unknown Unknown Unknown
cut3d 000000000040D1E9 Unknown Unknown Unknown
---


Any ideas?

Thanks,
Boubacar

User avatar
gmatteo
Posts: 291
Joined: Sun Aug 16, 2009 5:40 pm

Re: cut3d error when extracting wave functions from _WFK fil

Post by gmatteo » Tue May 16, 2017 9:00 am

Can you try to set `ulimit -s unlimited` before running cut3d?

If the error persists, change cut3d to enforce Fortran-IO (see patch below), recompile with `make` and rerun

diff --git a/src/83_cut3d/m_cut3d.F90 b/src/83_cut3d/m_cut3d.F90
index 3004f171..81e67c84 100644
--- a/src/83_cut3d/m_cut3d.F90
+++ b/src/83_cut3d/m_cut3d.F90
@@ -1981,6 +1981,7 @@ subroutine cut3d_wffile(wfk_fname,ecut,exchn2n3d,istwfk,kpt,natom,nband,nkpt,npw
! FIXME
! nband depends on (kpt,spin)
iomode = iomode_from_fname(wfk_fname)
+ iomode = IO_MODE_FORTRAN
call wfk_open_read(Wfk,wfk_fname,formeig0,iomode,get_unit(),xmpi_comm_self)
call wfk_read_band_block(Wfk,[1,nband(ckpt)],ckpt,csppol,xmpio_single,cg_k=cg_k,eig_k=eig_k,occ_k=occ_k)
call wfk_close(Wfk)

boubacar
Posts: 5
Joined: Sun May 07, 2017 5:15 pm

Re: cut3d error when extracting wave functions from _WFK fil

Post by boubacar » Fri May 19, 2017 6:03 pm

Hi gmatteo,

Thank you for your response.
It did not work with ulimit.

I will see with the cluster administrator to apply the patch that you provided. I will be back to you with the feedback when done!

Thanks,
Boubacar

boubacar
Posts: 5
Joined: Sun May 07, 2017 5:15 pm

Re: cut3d error when extracting wave functions from _WFK fil

Post by boubacar » Tue May 23, 2017 4:06 pm

Hi gmatteo,

Your patch worked well !

I managed to extract the wavefunctions from *_WFK file using cut3d of abinit8.2.2.
Thank you for your responses !

Best regards,
Boubacar

Locked