Page 1 of 1

Problem in mod_logo.f90

Posted: Wed Sep 16, 2009 6:11 pm
by jmullen
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

Re: Problem in mod_logo.f90

Posted: Wed Sep 16, 2009 6:51 pm
by jmullen
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

Re: Problem in mod_logo.f90

Posted: Wed Sep 16, 2009 8:16 pm
by andrea marini
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 !

Re: Problem in mod_logo.f90

Posted: Thu Sep 17, 2009 1:48 am
by jmullen
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

Re: Problem in mod_logo.f90

Posted: Thu Sep 17, 2009 5:40 pm
by Conor Hogan
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!