Adventures compiling YAMBO in an IBM powerpc (HUYGENS)

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
obm
Posts: 7
Joined: Thu Aug 23, 2012 12:36 pm
Location: ULg

Adventures compiling YAMBO in an IBM powerpc (HUYGENS)

Post by obm » Wed Sep 12, 2012 8:52 am

Dear all,
I am struggling compiling YAMBO 3.2.5 using XLF compilers (V13 for fortran V11 for C) in a LINUX machine. (The HUYGENS supercomputer of Netherlands)

This is the configure line
./configure --with-blas="-lessl" --with-lapack="-lessl ../espresso/lapack-3.2/lapack.a" --with-iotk="../espresso/iotk" PFC="mpfort" FC="mpfort" FCFLAGS="-q64 -qthreaded -O4 -qsuffix=cpp=f90 -qdpc -qalias=nointptr -Q -qfree=f90" FFLAGS="-q64 -qthreaded -O4 -qsuffix=cpp=f90 -qdpc -qalias=nointptr -Q" --with-fftw-lib="-lessl" --with-netcdf-include="/sara/sw/netcdf-mp/4.1.2/include/" --with-netcdf-lib="/sara/sw/netcdf-mp/4.1.2/lib/" --enable-netcdf-LFS --enable-netcdf-hdf5

Notice that F77 and F90 behaviour seperately.

1st question: I tried many tricks to make YAMBO use essl as much as possible, but lapack is still being ignored

1st problem: "Do not optimize" (NoOpt) flags for free style fortran files do not contain -qfree=f90 and compilation of NoOpt modules fail with Syntax errors. Is there a way to control this on configure stage? I am really tired of editing Makefile

2nd problem: The xlf compilers also work in Linux. For example in yambo-3.2.5/src/modules/mod_logo.F one requires aix mentioned style otherwise xlf compilers fail with syntax error.


I will update this as I go

Any help is appreciated.
Cheers



update1:
adding -qsource in order to understand why exactly xlf is complaining actually solves the problem in mod_QP.F

very very strange

update2: No, it does not, mod_QP.f does not compile with xlf
You either have
181 | call degeneration_finder(Eo_sorted,QP_n_states,first_el,n_of_el,n_deg_grp,0.0001/HA2EV)
................................................................................a............
a - "mod_QP.f", line 181.80: 1513-061 (S) Actual argument attributes do not match those specified by an accessible explicit interface.
** qp_m === End of Compilation 1 ===
1501-511 Compilation failed for file mod_QP.f.
make: *** [mod_QP.o] Error 1

or
22 |module QP_m
"mod_QP.f", line 22.0: 1515-005 (S) Continuation line is not permitted at beginning of program or after INCLUDE, EJECT, @PROCESS statements or comment directive. Line is ignored.

update 3: (BUG)
modules makefile uses f77 flags while the source code is in f90

update 4: (BUG)
the -I directives for external mods (such as netcdf) are not passed to the compiler.

update 5: (BUG) (XLF_ONLY)
changed degeneration_finder(Eo_sorted,QP_n_states,first_el,n_of_el,n_deg_grp,0.0001/HA2EV) to
degeneration_finder(Eo_sorted,QP_n_states,first_el,n_of_el,n_deg_grp,3.6749326019E-06_SP)
(_SP) is not inherited

update 6: (BUG?)
replaced every number ending with . to ._SP

update 7: (BUG)
setting CC=xlcc makes configure fail complaining about precompiler,
settting CC=xlcc and CPP=cpp has the same result ??
looking at configure there are two "precompiler checks" one is for cpp, another one is "gcc -E -traditional"
if you set CPP=cpp second one fails, if you set CPP=gcc first one fails


I am giving up at this moment.
Last edited by obm on Wed Sep 12, 2012 4:41 pm, edited 3 times in total.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Dr. O. Baris Malcioglu,
University of Liege,
Belgique
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

User avatar
claudio
Posts: 456
Joined: Tue Mar 31, 2009 11:33 pm
Location: Marseille
Contact:

Re: Adventures compiling YAMBO in an IBM powerpc (HUYGENS)

Post by claudio » Wed Sep 12, 2012 10:58 am

Dear Dr. O. Baris Malcioglu

first of all you can try to modify by hand the file config/setup that is generated by the configure
in such a way to include all the flags and options that you like.

for lapack and blas try to use --with-blas="-lessl" --with-lapack="../espresso/lapack-3.2/lapack.a"

for the others errors I will check a make you know

regards
Claudio Attaccalite
Claudio Attaccalite
[CNRS/ Aix-Marseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com

obm
Posts: 7
Joined: Thu Aug 23, 2012 12:36 pm
Location: ULg

Re: Adventures compiling YAMBO in an IBM powerpc (HUYGENS)

Post by obm » Wed Sep 12, 2012 11:13 am

After configuring for different handling of F77 and F90 files in configure, and after compiling files which actually use F77 style commenting (c )
I re-modify this file so that F77 and F90 compiler flags have the same settings, since the make file tries to compile free formatted fortran files with F77 compiler.

I also add missing -I for netcdf, and Yambo Includes to here

C.

claudio wrote:Dear Dr. O. Baris Malcioglu

first of all you can try to modify by hand the file config/setup that is generated by the configure
in such a way to include all the flags and options that you like.

for lapack and blas try to use --with-blas="-lessl" --with-lapack="../espresso/lapack-3.2/lapack.a"

for the others errors I will check a make you know

regards
Claudio Attaccalite
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Dr. O. Baris Malcioglu,
University of Liege,
Belgique
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

obm
Posts: 7
Joined: Thu Aug 23, 2012 12:36 pm
Location: ULg

Fresh start today

Post by obm » Thu Sep 13, 2012 1:19 pm

Today
  1. I've started with configure line (modified according to suggestions of Claudio)

    Code: Select all

    ./configure 
    --with-blas="-lessl" 
    --with-lapack="-lessl  -llapack" 
    --with-iotk="../espresso/iotk" 
    PFC="mpfort" 
    FC="mpfort" 
    FCFLAGS="-q64 -qthreaded -O4 -qsuffix=cpp=f90 -qdpc -qalias=nointptr -Q -qfree=f90" 
    FFLAGS="-q64 -qthreaded -O4 -qsuffix=cpp=f90 -qdpc -qalias=nointptr -Q " 
    --with-netcdf-include="/sara/sw/netcdf/4.1.2/include/" 
    --with-netcdf-lib="/sara/sw/netcdf/4.1.2/lib/"  
    --enable-netcdf-LFS 
    --enable-netcdf-hdf5
    
  2. then edited the config/setup
    1. I set f90suffix=.f90 (the bug was it was set to .f, and make was mistaking them as f77 files)
    2. I set the c compiler manually, due to bug in configure checks regarding cpp
    3. I add the -D flags (later to be edited out for linking) and -I flags to FCFLAGS and FFLAGS. The configure script fails if I add it at that stage.
    4. I set the noopt flags to use fflags and fcflags with -O0
    5. I modify incorrect lnetcdf variable to contain hdf5 correctly
  3. then I added a precompiler flag XLF_SP to some .F source code which adds necessary _SP flags to parameters of some functions that are being called.
...and now I am almost there, just a few missing dependencies to certain HDF libraries in linking. No idea if the code is sane though.

Update: Since Yambo does preprocessing manually, it is better to move -D flags to cppflags.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Dr. O. Baris Malcioglu,
University of Liege,
Belgique
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

User avatar
claudio
Posts: 456
Joined: Tue Mar 31, 2009 11:33 pm
Location: Marseille
Contact:

Re: Adventures compiling YAMBO in an IBM powerpc (HUYGENS)

Post by claudio » Tue Jan 29, 2013 3:09 pm

Dear Baris Malcioglu

please check the last version of Yambo, where we improved the configuration scripts:

http://qe-forge.org/gf/project/yambo/fr ... ase_id=127
Claudio Attaccalite
[CNRS/ Aix-Marseille Université/ CINaM laborarory / TSN department
Campus de Luminy – Case 913
13288 MARSEILLE Cedex 09
web site: http://www.attaccalite.com

Post Reply