Page 1 of 1

Compilation error in mod_stderr.f90 (function real2ch)

Posted: Mon Jul 09, 2012 1:21 pm
by faerie
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

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

Posted: Mon Jul 09, 2012 3:27 pm
by Daniele Varsano
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

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

Posted: Tue Jul 10, 2012 9:35 am
by faerie
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

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

Posted: Tue Jul 10, 2012 1:12 pm
by Daniele Varsano
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.