Compilation error in mod_stderr.f90 (function real2ch)

Having trouble compiling the Yambo source? Using an unusual architecture? Problems with the "configure" script? Problems in GPU architectures? This is the place to look.

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
Post Reply
faerie
Posts: 3
Joined: Mon Jul 09, 2012 12:55 pm

Compilation error in mod_stderr.f90 (function real2ch)

Post by faerie » Mon Jul 09, 2012 1:21 pm

Dear everyone,

I am trying to compile yambo (3.2.5, rev26) using the Intel compilers (v. 12.1.2) in parallel version.
In the part "making modules" of the make yambo interfaces command, I get the following error message:

mod_stderr.f90(232): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ) ,
write(real2ch,'('
----------------------^
mod_stderr.f90(232): error #7094: Unmatched parentheses within a character format specifier. ['(']
write(real2ch,'('
--------------------^
compilation aborted for mod_stderr.f90 (code 1)

Taking a look at the code, the relevant function indeed seems to be missing something:

character(schlen) function real2ch(r)
!
real(SP), intent(in) :: r
character(schlen) :: fmt_
!
fmt_=gen_fmt(r_v=(/r/))
write(real2ch,'('
!
end function real2ch

How should the function be modified, or, in case the error lies somewhere else (i.e. might be system-specific), would anyone have any suggestions how to solve this?

Best wishes,

Mari Ijäs
Department of Applied Physics, Aalto University School of Sciences, Finland
Mari Ijäs
Department of Applied Physics
Aalto University School of Science
Espoo, Finland

User avatar
Daniele Varsano
Posts: 3816
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: Compilation error in mod_stderr.f90 (function real2ch)

Post by Daniele Varsano » Mon Jul 09, 2012 3:27 pm

Dear Mari,
it seems to me a precompiler problem,
yours .f90 source looks truncated. What precompiler did you use?
Please post yours config.log file, and we will try to understand what's happening.

Cheers,

Daniele
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

faerie
Posts: 3
Joined: Mon Jul 09, 2012 12:55 pm

Re: Compilation error in mod_stderr.f90 (function real2ch)

Post by faerie » Tue Jul 10, 2012 9:35 am

Dear Daniele,

thank you for your reply. config.log and ./configure/setup files are attached (.txt added in order to be able to upload the file). It seems the problem is related to the Intel pre compilers (I'm assuming the Intel compiler set uses those - I'm not sure how to find out exactly), as the code produces a binary if I change the compiler set to be gnu-based (gcc, gfortran,..).

I would, however, prefer to compile using the Intel set, as I'm planning to use the PWscf interface and while compiling QuantumESPRESSO, I encountered iotk problems if gfortran was used. The p2y interface compilation seems to require both codes/the iotk library to be compiled using the same compiler set, and thus a gnu-based yambo compilation does not yet help me much...

Please let me know if you have any suggestions or need any additional information.

Best,

Mari
You do not have the required permissions to view the files attached to this post.
Mari Ijäs
Department of Applied Physics
Aalto University School of Science
Espoo, Finland

User avatar
Daniele Varsano
Posts: 3816
Joined: Tue Mar 17, 2009 2:23 pm
Contact:

Re: Compilation error in mod_stderr.f90 (function real2ch)

Post by Daniele Varsano » Tue Jul 10, 2012 1:12 pm

Dear Mari,
I do not know what can be the problem with the intel.
You can try to compile using different precompiler:
./configure FC=ifort F77=ifort CC=icc CPP=gcc --enable-msgs-comps
or
try to specify directly the intel precompiler:
CPP="icc -E -ansi"

if does not work, look if you can find some useful information in the forum, if any,
or may be someone can give you more useful information.

Cheers,

Daniele

PS: Please, fill the signature filed in your user profile with your affiliation.
Dr. Daniele Varsano
S3-CNR Institute of Nanoscience and MaX Center, Italy
MaX - Materials design at the Exascale
http://www.nano.cnr.it
http://www.max-centre.eu/

Post Reply