Abinit 8.10.3 compiled with gnu 9.1: DFT calculation crash  [SOLVED]

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
davide.sangalli.82
Posts: 13
Joined: Wed Jan 27, 2010 6:34 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Abinit 8.10.3 compiled with gnu 9.1: DFT calculation crash

Post by davide.sangalli.82 » Mon Feb 03, 2020 10:43 am

Dear abinit developers,
I'm trying to run abinit to test the interface with the yambo code.

I've compiled the branch release-8-10 of gitlab.
the compilation is succesfull, however when I try to run the code it crashes with the message

Code: Select all

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:

#0  0x7f34a2c5ef1f in ???
#1  0x7f34a03a0070 in ???
Attached few files (Report.log is a tar.gz file):
- config.log (two different compilations, both give th esame result)
- .out and .log of the crash (crash folder) and two .log and .out which worked with an older version of abinit (reference folder)
- input file and pseudopotentials I used

Thank you in advance.
Best,
D.
Attachments
Report.log
This is a Report.tar.gz file
(72.7 KiB) Downloaded 215 times
Davide Sangalli, PhD
CNR-ISM, UOS di Montelibretti and MaX Centre
http://www.ism.cnr.it/en/
http://www.max-center.eu/

User avatar
jbeuken
Posts: 365
Joined: Tue Aug 18, 2009 9:24 pm
Contact:

Re: Abinit 8.10.3 compiled with gnu 9.1: DFT calculation crash

Post by jbeuken » Mon Feb 03, 2020 12:18 pm

Hi Davide,
I've compiled the branch release-8-10 of gitlab.
the compilation is succesfull, however when I try to run the code it crashes with the message
little question : abinit crahes with "abinit -b" and/or with fast tests suite ?
------
Jean-Michel Beuken
Computer Scientist

davide.sangalli.82
Posts: 13
Joined: Wed Jan 27, 2010 6:34 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: Abinit 8.10.3 compiled with gnu 9.1: DFT calculation crash

Post by davide.sangalli.82 » Mon Feb 03, 2020 6:25 pm

Code: Select all

abinit -b
works fine

Code: Select all

make check
instead produces errors similar to my DFT simulation.

See below.
Complete output attached.

Code: Select all

Command   /data/sangalli/Lavoro/Codici/abinit/abinit-git/releases/8.10/compile_netcdf/src/98_main/abinit < /data/sangalli/Lavoro/Codici/abinit/abinit-git/releases/8.10/compile_netcdf/tests/Test_suite/fast_t00/t00.stdin > /data/sangalli/Lavoro/Codici/abinit/abinit-git/releases/8.10/compile_netcdf/tests/Test_suite/fast_t00/t00.stdout 2> /data/sangalli/Lavoro/Codici/abinit/abinit-git/releases/8.10/compile_netcdf/tests/Test_suite/fast_t00/t00.stderr
 returned exit_code: 139

[fast][t00][np=1]: fldiff.pl fatal error:
The diff analysis cannot be done: the number of lines to be analysed differ.
File /data/sangalli/Lavoro/Codici/abinit/abinit-git/releases/8.10/tests/fast/Refs/t00.out: 171 lines, 47 ignored
File /data/sangalli/Lavoro/Codici/abinit/abinit-git/releases/8.10/compile_netcdf/tests/Test_suite/fast_t00/t00.out: 170 lines, 47 ignored [file=t00.out]
[fast][t00][np=1]Test was not expected to fail but subprocesses returned 139

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7fc12ac86f1f in ???
#1  0x7fc129a562e0 in ???
#2  0x7fc12cb18484 in ???
#3  0xa46e83 in __m_cgwf_MOD_cgwf
        at ../../../src/67_common/m_cgwf.F90:509
#4  0x57564a in __m_vtowfk_MOD_vtowfk
        at ../../../src/79_seqpar_mpi/m_vtowfk.F90:410
#5  0x55f161 in __m_vtorho_MOD_vtorho
        at ../../../src/79_seqpar_mpi/m_vtorho.F90:943
#6  0x52d908 in __m_scfcv_core_MOD_scfcv_core
        at ../../../src/94_scfcv/m_scfcv_core.F90:1552
#7  0x52249d in scfcv_scfcv
        at ../../../src/94_scfcv/m_scfcv.F90:746
#8  0x51ad47 in __m_mover_MOD_mover
        at ../../../src/95_drive/m_mover.F90:604
#9  0x50d878 in __m_gstate_MOD_gstate
        at ../../../src/95_drive/m_gstate.F90:1345
#10  0x422e61 in __m_gstateimg_MOD_gstateimg
        at ../../../src/95_drive/m_gstateimg.F90:573
#11  0x412ed1 in __m_driver_MOD_driver
        at ../../../src/95_drive/m_driver.F90:705
#12  0x40a30e in abinit
        at ../../../src/98_main/abinit.F90:444
#13  0x406d2c in main
        at ../../../src/98_main/abinit.F90:94
/usr/bin/timeout: the monitored command dumped core
Segmentation fault
Attachments
make_check.log
(185.02 KiB) Downloaded 207 times
Davide Sangalli, PhD
CNR-ISM, UOS di Montelibretti and MaX Centre
http://www.ism.cnr.it/en/
http://www.max-center.eu/

davide.sangalli.82
Posts: 13
Joined: Wed Jan 27, 2010 6:34 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: Abinit 8.10.3 compiled with gnu 9.1: DFT calculation crash  [SOLVED]

Post by davide.sangalli.82 » Tue Feb 04, 2020 12:52 pm

A follow up on the topic.

I figured out that the configure and linnkig of abinit were messing up in between the loaded gnu compilers and libraries (via module load) and the pre-installed compiler and libraries on my ubuntu desktop.

Moreover I found two problems.
1) I run the configure with

Code: Select all

--with-trio-flavor="netcdf" --enable-netcdf-default
and then compiled. abinit was ginving as error

Code: Select all

--netcdf-default is on but netcdf library does not support MPI-IO. Aborting now
the linked library was however with MPI-IO support.
The message error was due to the fact that

Code: Select all

HAVE_NETCDF_MPI
was not defined by the configure
Indeed simply adding also the option

Code: Select all

--enable-mpi-io
everything worked. A simple fix would be that

Code: Select all

--enable-netcdf-default
automatically activates the MPI-IO.

2) I'm testing the variable

Code: Select all

prtkbff
Setting it to 1 in the input abinit crashes, gives an error due to a bag.
Below the patch

Code: Select all

diff --git a/src/67_common/m_iowf.F90 b/src/67_common/m_iowf.F90
index 4691596c3..7f879f552 100644
--- a/src/67_common/m_iowf.F90
+++ b/src/67_common/m_iowf.F90
@@ -379,11 +379,11 @@ subroutine outwf(cg,dtset,psps,eigen,filnam,hdr,kg,kptns,mband,mcg,mkmem,&
                write(msg,'(a10,i5)') 'atype ',iat
                call wrtout(ab_out,msg,'COLL')
                do iproj=1,psps%lnmax
-                 write(msg,'(a10,i5,a,a10,e12.4,a,3(a10,2e12.4,a))') &
+                 write(msg,'(a10,i5,a,a10,e12.4,a,2(a10,2e12.4,a))') &
                         'projector ', iproj,ch10, &
                         'vkbsign   ', vkbsign(iproj,iat), ch10, &
-                        'vkb       ', vkb(1,iproj,iat),  vkb(npwk_disk,:,iat), ch10, &
-                        'vkbd      ', vkbd(1,iproj,iat), vkbd(npwk_disk,:,iat), ''
+                        'vkb       ', vkb(1,iproj,iat),  vkb(npwk_disk,iproj,iat), ch10, &
+                        'vkbd      ', vkbd(1,iproj,iat), vkbd(npwk_disk,iproj,iat), ''
                  call wrtout(ab_out,msg,'COLL')
                end do
              end do
Davide Sangalli, PhD
CNR-ISM, UOS di Montelibretti and MaX Centre
http://www.ism.cnr.it/en/
http://www.max-center.eu/

User avatar
pouillon
Posts: 651
Joined: Wed Aug 19, 2009 10:08 am
Location: Spain
Contact:

Re: Abinit 8.10.3 compiled with gnu 9.1: DFT calculation crash

Post by pouillon » Fri Feb 07, 2020 3:38 pm

Dear Davide,

Thank you for reaching out and for the patch. From what I see, this is already fixed in the development branch of ABINIT.

FYI, the --enable-netcdf-default option is only used for testing purposes and will be removed from the upcoming ABINIT 9.0.
Yann Pouillon
Simune Atomistics
Donostia-San Sebastián, Spain

davide.sangalli.82
Posts: 13
Joined: Wed Jan 27, 2010 6:34 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: Abinit 8.10.3 compiled with gnu 9.1: DFT calculation crash

Post by davide.sangalli.82 » Sat Feb 08, 2020 8:19 pm

Thanks Yann.

I used the --enable-netcdf-default because I needed the WFs to be printed in NETCDF format.
Is there an alternative/standard way to obtain that ?
Related, is it possible to have the WFs printed in NETCDF format without enabling parallel I/O ?

I'd like to create a page on the yambo website with the procedure to read the WFs from the abinit code (and thus which are the needed flags for the abinit configure).

Best,
D.
Davide Sangalli, PhD
CNR-ISM, UOS di Montelibretti and MaX Centre
http://www.ism.cnr.it/en/
http://www.max-center.eu/

davide.sangalli.82
Posts: 13
Joined: Wed Jan 27, 2010 6:34 pm
Location: Via Salaria Km 29.3, CP 10, 00016, Monterotondo Stazione, Italy
Contact:

Re: Abinit 8.10.3 compiled with gnu 9.1: DFT calculation crash

Post by davide.sangalli.82 » Sat Feb 15, 2020 9:21 am

Dear abinit developers,
any suggestion on how to obtain wave-functions in NETCDF format without the flag --enable-netcdf-default ?

Best,
D.
Davide Sangalli, PhD
CNR-ISM, UOS di Montelibretti and MaX Centre
http://www.ism.cnr.it/en/
http://www.max-center.eu/

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

Re: Abinit 8.10.3 compiled with gnu 9.1: DFT calculation crash

Post by gmatteo » Tue Feb 25, 2020 2:30 am

I confirm that the bug in the write statement has been fixed in Abinit9.
I'd like to create a page on the yambo website with the procedure to read the WFs from the abinit code (and thus which are the needed flags for the abinit configure).
I would suggest to wait for the release of Abinit9 as several options will change at the level of the configure script.
The default output format is still Fortran binary files but one can change it by setting iomode to 3 or via --enable-netcdf-default.

It's clear that producing large WKF.nc files for Yambo will require netcdf4/hdf5 with parallel-IO support but users should pass to the configure script C/Fortran libraries that are compatible with the software stack (Fortran compiler, MPI-library).
I started to work on a tutorial to explain how to compile from source all the libs and how to pass the correct options to configure but it will take some time before having this tutorial available on the internet because we are still working on the finalization of the new build system.

Olivier.5590
Posts: 6
Joined: Fri Nov 29, 2019 5:01 pm

Re: Abinit 8.10.3 compiled with gnu 9.1: DFT calculation crash

Post by Olivier.5590 » Fri Feb 28, 2020 4:28 pm

Thanks, I can now start working again! I was stuck with compilation compatibility issues, all while my boss demanded that I wrote a market analysis for these houses in Cannes (because working with windows and doors is the same thing as working in the real estate market, amirite?) and it made me lose time for both... Now it's fixed though, thanks again!

Locked