Problem in mod_logo.f90

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
jmullen
Posts: 29
Joined: Wed Apr 01, 2009 6:29 pm

Problem in mod_logo.f90

Post by jmullen » Wed Sep 16, 2009 6:11 pm

Greetings all,

I am compiling yambo-3.2.1-r.448 on a Cray XT5 using pgf90. When compiling, I get an error, "unmatched quote" at line 255 in mod_logo.f90. The offending line is

ch(iA:iA)="\"

I tried changing it to ch(iA:iA)="\\", in order to escape the character, but my change is overwritten somewhere is the make process. Does anyone have a recommended fix for this?

Thanks
Jeff Mullen
Physics
North Carolina State University

jmullen
Posts: 29
Joined: Wed Apr 01, 2009 6:29 pm

Re: Problem in mod_logo.f90

Post by jmullen » Wed Sep 16, 2009 6:51 pm

Dear all

I resolved the problem. The flag required is -Mbackslash which was set during configure for FCFLAGS but seems to have not been fed to the compiler appropriately. I set it again as a compiler argument to make
make pf90flags="-Mbackslash" all

and everything compiled properly

Regards
Jeff
Jeff Mullen
NCSU Physics

User avatar
andrea marini
Posts: 325
Joined: Mon Mar 16, 2009 4:27 pm
Contact:

Re: Problem in mod_logo.f90

Post by andrea marini » Wed Sep 16, 2009 8:16 pm

jmullen wrote: I resolved the problem. The flag required is -Mbackslash which was set during configure for FCFLAGS but seems to have not been fed to the compiler appropriately. I set it again as a compiler argument to make
make pf90flags="-Mbackslash" all and everything compiled properly
Dear Jeff, I am happy you resolved the bug alone. I did not even have enough time to check your post that you had fixed it :lol:

Anyway, to help us to fix permanently the bug, could please post
  • the options you passed to configure in the case with/without error message
  • the corresponding files config/report and config/setup
Thanks !
Andrea MARINI
Istituto di Struttura della Materia, CNR, (Italy)

jmullen
Posts: 29
Joined: Wed Apr 01, 2009 6:29 pm

Re: Problem in mod_logo.f90

Post by jmullen » Thu Sep 17, 2009 1:48 am

I ran into a few problems with configuration and compilation. I do not know how common the system is, but the system in question is a Cray XT5 with the PGI suite (wrappers ftn and CC). For configuration,
setenv MPICC cc
setenv CC cc
setenv F77 ftn
setenv CPP "gcc -E"
setenv FCFLAGS "-O2 -fast -Munroll -Mnoframe -Mdalign -Mbackslash "
setenv FC ftn

./configure --with-mpi --with-iotk=/dir/for/espresso-4.0.4/iotk --with-p2y=4.0

which failed with an error:
checking for Fortran flag to compile .f90 files... unknown
configure: error: Fortran could not compile .f90 files

so we patched the configuration file with

--- yambo-3.2.1-r.448/configure 2009-07-07 07:58:52.000000000 -0400
+++ yambo-3.2.1-r.448.new/configure 2009-09-16 11:51:00.971536000 -0400
@@ -7575,13 +7575,13 @@
! Replace "S" with "\" and find the max length of
end program
EOF_
-(eval $CPP $CPPFLAGS conftest.F > conftest.${F90SUFFIX}) 2> conftest.er1
+(eval $CPP $CPPFLAGS conftest.F > conftest${F90SUFFIX}) 2> conftest.er1

if ! test -s conftest.er1 || test -n "`grep successful conftest.er1`" ; then
eval $CPP $CPPFLAGS conftest.F > conftest.${F90SUFFIX}
- eval $FC $FCFLAGS -c conftest.${F90SUFFIX} 2> conftest.er2
+ eval $FC $FCFLAGS -c conftest${F90SUFFIX} 2> conftest.er2
if test -s conftest.er2 ; then
- if ! test -n "`grep successful conftest.er2`" ; then
+ if ! test -n "`grep linux conftest.er2`" ; then
acx_F90_ok=no ;
CPP_TESTS_PASSED=no;
fi

and applying the patch successfully completed configuration. The compilation problem (seen in the first email) was a surprise because the compiler flag I used to resolve the problem was set in the FCFLAGS variable, but it did not seem "to take", so I used
make pf90flags="-O2 -Mbackslash -Mnomain" all

where nomain takes care of an "multiple definition of MAIN_".

This, as confusing as it may seem, successfully compiled the codebase. Feel free to post any questions.

--jeff
Jeff Mullen
NCSU Physics

User avatar
Conor Hogan
Posts: 111
Joined: Tue Mar 17, 2009 12:17 pm
Contact:

Re: Problem in mod_logo.f90

Post by Conor Hogan » Thu Sep 17, 2009 5:40 pm

Thanks for the information Jeff, we will put this kind of information available on the web page documention (some day...)

Just on this, in case you have problems again with changing files:
jmullen wrote: but my change is overwritten somewhere is the make process. Does anyone have a recommended fix for this?
you can make changes stick by modifying the *.F files - these get precompiled into the .f90 files before actual compilation. Don't forget to remove any *.f90 files that are lying about if you do this!
Dr. Conor Hogan
CNR-ISM, via Fosso del Cavaliere, 00133 Roma, Italy;
Department of Physics and European Theoretical Spectroscopy Facility (ETSF),
University of Rome "Tor Vergata".

Post Reply