Page 1 of 1

Compile Yambo 3.4.1 rev61 with ETSF-IO

Posted: Thu Jul 02, 2015 9:10 am
by TheGreatFox
Hi there,

I ran into an issue compiling Yambo 3.4.1 rev61 with ETSF-IO and found a potential solution. Additionally, I have included the patch file to patch your own version.

Error: Type mismatch

Code: Select all

>>>[Linking e2y]<<<
make[1]: Entering directory `/home/balldritt/software/yambo/yambo-3.4.1-rev61/interfaces/e2y'
e2y_db1.f90:376.30:

      call sort(G_mod,indx_m1=G_mod_indx)
                              1
Error: Type mismatch in argument 'indx_m1' at (1); passed INTEGER(8) to INTEGER(4)
make[1]: *** [e2y_db1.o] Error 1
etsf_data.F e2y_i.F make[1]: Leaving directory `/home/balldritt/software/yambo/yambo-3.4.1-rev61/interfaces/e2y'
make: *** [interfaces] Error 2
Possible solution

Code: Select all

Index: src/modules/mod_vec_operate.F
===================================================================
--- src/modules/mod_vec_operate.F	(revision 89)
+++ src/modules/mod_vec_operate.F	(working copy)
@@ -213,7 +213,7 @@
      real(SP)::  arrin(:)
      real(SP), optional::  arrout(:)
      integer,  optional::  indx(:)
-     integer,  optional::  indx_m1(:)
+     integer(SP),  optional::  indx_m1(:)
      !
      ! local variables
      !
Configuration
OS: Ubuntu 14.04 LTS
ETSF-IO version: 1.0.4
Yambo version: 3.4.1 rev61
Fortran: gfortran 4.8.4
Configure flags:

Code: Select all

--with-fftw=/usr/lib --with-lapack=/usr/lib --with-blas=/usr/lib --enable-open-mp --enable-dp --enable-netcdf-hdf5 --enable-netcdf-LFS --with-netcdf-lib=/usr/lib --with-netcdf-include=/usr/include --with-netcdf-link="-lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lcurl -lz -ldl" --with-etsf-io-include=/opt/include/gcc --with-etsf-io-lib=/opt/lib FCFLAGS=-cpp
Summary
We were trying to compile with ETSF-IO support (along with other packages which already work), but were running into an issue of a type mismatch in e2y. This was traced back to the sort() function from mod_vec_operate. There was a missing precision flag to indx_m1. This is the first patch to Yambo that I have ever made, so I am not certain if this is the correct solution, but adding this change allows the program to build and run. This has not been tested on Intel Fortran or other platforms, only gfortran. This was also sent to the general Yambo email list, but was told to post my findings here.

Hope this helps anyone in need.

Re: Compile Yambo 3.4.1 rev61 with ETSF-IO

Posted: Fri Jul 03, 2015 11:38 am
by andrea.ferretti
Dear Benjamin,

thanks for the nice and detailed report.

Indeed the use of integer(SP) in e2y_db1.F is a misprint (generating the problem you have found,
probably in connection with a double precision implementation, --enable-dp, I guess)

the way to fix the problem is to simply use defaults integer at line 279 of e2y_db1.F (yambo v 3.4.1-r61),
since there is no reason to switch to 8 Bytes integer there

take care
Andrea