Hallo,
I'm compiling the last release of Yambo on Intel(R) Xeon(R) CPU E5-2670 (CentOS 6.9) in parallel (Openmpi version 1.8.) with a rather old fortran compiler gfortran gcc 4.4.7 but with the c-interoperability and fortran 2003 support and hdf5 support.
This is my configure
./configure FC=gfortran MPIFC=mpif90 --enable-3d-fft --enable-dp --enable-mpi --enable-internal-fftsg --enable-par-linalg --enable-int-linalg --enable-iotk --enable-netcdf --enable-etsf-io --enable-netcdf-hdf5
I get the following error
>>>[Linking p2y]<<<
make[2]: Entering directory `/home/pino/yambo-4.4.0/interfaces/p2y'
qeh5_module.f90:693.15:
buf = c_loc(text)
1
Error: CHARACTER argument 'text' to 'c_loc' at (1) must have a length of 1
qeh5_module.f90:484.16:
ptr = C_LOC(integer_data)
1
Error: Assumed-shape array 'integer_data' at (1) cannot be an argument to the procedure 'c_loc' because it is not C interoperable
make[2]: *** [qeh5_module.o] Error 1
make[2]: Leaving directory `/home/pino/yambo-4.4.0/interfaces/p2y'
make[1]: *** [p2y] Error 2
make[1]: Leaving directory `/home/pino/yambo-4.4.0'
p2y build failed
I've taken a look into the code and it seems to me that the routines where the error generates are not called anywhere (I'm not sure).
Do you have suggestions?
Thank you very much
Giuseppe
linking problem yambo4.4.0
Moderators: Davide Sangalli, andrea.ferretti, myrta gruning, andrea marini, Daniele Varsano, Conor Hogan, Nicola Spallanzani
Forum rules
If you have trouble compiling Yambo, please make sure to list:
(1) the compiler (vendor and release: e.g. intel 10.1)
(2) the architecture (e.g. 64-bit IBM SP5)
(3) if the problems occur compiling in serial/in parallel
(4) the version of Yambo (revision number/major release version)
(5) the relevant compiler error message
If you have trouble compiling Yambo, please make sure to list:
(1) the compiler (vendor and release: e.g. intel 10.1)
(2) the architecture (e.g. 64-bit IBM SP5)
(3) if the problems occur compiling in serial/in parallel
(4) the version of Yambo (revision number/major release version)
(5) the relevant compiler error message
-
- Posts: 214
- Joined: Fri Jan 31, 2014 11:13 am
Re: linking problem yambo4.4.0
Dear Giuseppe,
I have met the same problem recently, and I think it is related to the gcc version.
As far as I understand, the use of C_LOC that yambo does is in a fortran standard that is supported only by
recent versions of gcc.
In my case, upgrading to
gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC)
solved the problem.
hope it helps
Andrea
I have met the same problem recently, and I think it is related to the gcc version.
As far as I understand, the use of C_LOC that yambo does is in a fortran standard that is supported only by
recent versions of gcc.
In my case, upgrading to
gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC)
solved the problem.
hope it helps
Andrea
Andrea Ferretti, PhD
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it
CNR-NANO-S3 and MaX Centre
via Campi 213/A, 41125, Modena, Italy
Tel: +39 059 2055322; Skype: andrea_ferretti
URL: http://www.nano.cnr.it
-
- Posts: 8
- Joined: Thu Sep 19, 2019 11:04 am
Re: linking problem yambo4.4.0
Dear Andrea,
this was exactly my feeling. By defining the variable "text" as character(len=1) it is possible to solve the first problem. I've not been able to solve the second one even trying to replace ptr = C_LOC(integer_data) with ptr = C_LOC(integer_data(1,1)) (I understand that c_loc in my gcc version requires a scalar argument).
I think I will upgrade the gcc version.
Thank you very much.
Giuseppe
this was exactly my feeling. By defining the variable "text" as character(len=1) it is possible to solve the first problem. I've not been able to solve the second one even trying to replace ptr = C_LOC(integer_data) with ptr = C_LOC(integer_data(1,1)) (I understand that c_loc in my gcc version requires a scalar argument).
I think I will upgrade the gcc version.
Thank you very much.
Giuseppe