Compiling double precision on sp6

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
faffinito
Posts: 9
Joined: Tue Aug 31, 2010 9:55 am

Compiling double precision on sp6

Post by faffinito » Wed Oct 13, 2010 3:26 pm

Hi all,
I'm experiencing a problem when i compile yambo 3.2.2-rev.5 in double precision on our sp6 cluster. Everything is fine when i compile in single precision. This is my error:

Code: Select all

mpxlf90 -c -O2 -q64 -qstrict -qarch=pwr6 -qtune=pwr6 -qmaxmem=-1 -qsuffix=f=f   -I /gpfs/scratch/userinternal/cin0644a/yambo-3.2.2-rev.5/include -I/gpfs/scratch/userinternal/cin0644a/yambo-3.2.2-rev.5/include mod_functions.f) > /dev/null
xlf90_r: 1501-245 (W) Warning: Hard ulimit has been reduced to less than RLIM_INFINITY.  There may not be enough space to complete the compilation.
"mod_functions.f", line 95.14: 1513-041 (S) Arguments of the wrong type were specified for the INTRINSIC procedure "max".
** functions   === End of Compilation 1 ===
1501-511  Compilation failed for file mod_functions.f.
gmake[1]: *** [mod_functions.o] Error 1
gmake[1]: Leaving directory 
These are the configure instructions:

Code: Select all

./configure --prefix=/gpfs/scratch/userinternal/cin0644a/ \
                --with-fftw=/cineca/prod/libraries/fftw/3.2.2/xl--10.1/lib \
                --with-netcdf-lib=/cineca/prod/libraries/netcdf/4.0.1/xl--10.1/lib \
                --with-netcdf-include=/cineca/prod/libraries/netcdf/4.0.1/xl--10.1/include \
                --with-blacs=${BLACS_LIB} \
                --with-scalapack=${SCALAPACK_LIB} \
                --with-p2y=4.0 \
                --with-iotk=/cineca/prod/build/applications/QuantumESPRESSO/4.1/xl--10.1/BA_WORK/QuantumESPRESSO-4.1/iotk  \
                --build=powerpc-ibm \
                --enable-largedb \
                --enable-dp 
Any suggestions?
Fabio Affinito, PhD
CINECA - SCAI group
InterUniversity Computer Center
Via Magnanelli, 6/3
Casalecchio di Reno (Bologna) ITALY
+39/051/6171794 (Phone)

User avatar
myrta gruning
Posts: 240
Joined: Tue Mar 17, 2009 11:38 am
Contact:

Re: Compiling double precision on sp6

Post by myrta gruning » Thu Oct 14, 2010 11:52 pm

Hallo

I guess the problem is due to the compiler. It seems it complains about this line in src/modules/mod_functions.F

D=max(D,0._SP)

the function max should have the same type of the arguments. Since we are working in double precision, maybe the compiler assumes the intrinsic max is a double (???) and then it expects also the arguments to be a double, while they are single precision.

Unfortunately I do not have an account on the sp6 to test if this is the problem and fix it.

Regards,
m
Dr Myrta Grüning
School of Mathematics and Physics
Queen's University Belfast - Northern Ireland

http://www.researcherid.com/rid/B-1515-2009

faffinito
Posts: 9
Joined: Tue Aug 31, 2010 9:55 am

Re: Compiling double precision on sp6

Post by faffinito » Fri Oct 15, 2010 8:59 am

Hi Myrta
thanks for your answer. I fixed mod_functions but when I compiled I found a similar error in other parts of the code:

Code: Select all

"QP_fit_DB_values.f", line 70.20: 1513-041 (S) Arguments of the wrong type were specified for the INTRINSIC procedure "max".
"QP_fit_DB_values.f", line 73.20: 1513-041 (S) Arguments of the wrong type were specified for the INTRINSIC procedure "min".
** qp_fit_db_values   === End of Compilation 1 ===
1501-511  Compilation failed for file QP_fit_DB_values.f.
I wonder how many of these corrections could be necessary... It could be useful to find some compiler flag to overcome this problem.

(by the way the make clean doesn't work properly and each time I have to restart from the tarball...)

F
Fabio Affinito, PhD
CINECA - SCAI group
InterUniversity Computer Center
Via Magnanelli, 6/3
Casalecchio di Reno (Bologna) ITALY
+39/051/6171794 (Phone)

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

Re: Compiling double precision on sp6

Post by Daniele Varsano » Fri Oct 15, 2010 9:46 am

Dear Fabio,
could you fill your signature with affiliation in the preferences of your profile?
This is a rule of the forum.

Thanks a lot,

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/

User avatar
myrta gruning
Posts: 240
Joined: Tue Mar 17, 2009 11:38 am
Contact:

Re: Compiling double precision on sp6

Post by myrta gruning » Fri Oct 15, 2010 10:32 am

faffinito wrote:I fixed mod_functions but when I compiled I found a similar error in other parts of the code
Doh :?
faffinito wrote:I wonder how many of these corrections could be necessary... It could be useful to find some compiler flag to overcome this problem.
That will be easy indeed, but I do not know anything on xlf compiler. Maybe you can try to play with -qrealsize
Do other users have some experience on that?
myrta gruning wrote:(by the way the make clean doesn't work properly and each time I have to restart from the tarball...)
mmh..
what are the files that remain? Are the *.f
this could probably due to the naming of the files exiting from the preprocessing (not *.f90 but *.f).
From a first look to the autoconf files it seems that *.f90 is "hardcoded" in the objects that have to be cleaned (even though the autoconf takes into account there may be different F90SUFFIX).
If this is the case, probably you need just to delete these files instead of starting from the tarball each time.
you may also try this flag for the cpp (again I just googled, no experience on that/guarantee it worked)
-qsuffix=f=f90:cpp=F

Regards,
m
Dr Myrta Grüning
School of Mathematics and Physics
Queen's University Belfast - Northern Ireland

http://www.researcherid.com/rid/B-1515-2009

faffinito
Posts: 9
Joined: Tue Aug 31, 2010 9:55 am

Re: Compiling double precision on sp6

Post by faffinito » Fri Oct 15, 2010 1:53 pm

Hi Myrta,
I didn't find the compiler flag for this issue, but the problems seemed to be limited to 3 files:
mod_functions.F
QP_fit_DB_values.F
QP_apply_DB_interpolation.F

After solving this issue, I got another problem. When compiling it seems there's some (big) problem with the library symbols:

l

Code: Select all

d: 0711-317 ERROR: Undefined symbol: .caxpy
ld: 0711-317 ERROR: Undefined symbol: .cscal
ld: 0711-317 ERROR: Undefined symbol: .ccopy
ld: 0711-317 ERROR: Undefined symbol: .cdotu
ld: 0711-317 ERROR: Undefined symbol: .cdotc
ld: 0711-317 ERROR: Undefined symbol: .csscal
ld: 0711-317 ERROR: Undefined symbol: caxpy
ld: 0711-317 ERROR: Undefined symbol: ccopy
ld: 0711-317 ERROR: Undefined symbol: cswap
ld: 0711-317 ERROR: Undefined symbol: cgemv
ld: 0711-317 ERROR: Undefined symbol: chemv
ld: 0711-317 ERROR: Undefined symbol: ctrmv
[...]
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make[1]: *** [yambo] Error 8
make[1]: Leaving directory `/sp6/userinternal/cin0644a/yambo-3.2.2-rev.5/driver'
make: *** [yambo] Error 2
It guess there's some problem with the blacs linking....

Fabio
Fabio Affinito, PhD
CINECA - SCAI group
InterUniversity Computer Center
Via Magnanelli, 6/3
Casalecchio di Reno (Bologna) ITALY
+39/051/6171794 (Phone)

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

Re: Compiling double precision on sp6

Post by claudio » Fri Oct 15, 2010 2:06 pm

Dear Fabio

I compiled yambo in double precision on cesvima cluster with xlf.

You are right there are some bugs but limited to few files:

src/qp_ctl/QP_apply_DB_interpolation.F
src/qp_ctl/QP_fit_DB_values.F

about min and max functions, and

src/coulomb/bessel_J0.F

that I put in the attachment.

about the problem of linking the libraries I don't know, try to use the internal lapack and blas.
Cla
You do not have the required permissions to view the files attached to this post.
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

User avatar
myrta gruning
Posts: 240
Joined: Tue Mar 17, 2009 11:38 am
Contact:

Re: Compiling double precision on sp6

Post by myrta gruning » Fri Oct 15, 2010 3:04 pm

Hallo Fabio

That is a bit strange. I do not have the problem with linking you experienced.
The blas you listed are single precision and are indeed not compiled if you enable double precision, but they are also not called. Did you check whether the c preprocessor is working properly (no call to caxpy & co. in the processed .f files) or if some processed *.f files with single precision calls were not cleaned properly?

Regards,
m
Dr Myrta Grüning
School of Mathematics and Physics
Queen's University Belfast - Northern Ireland

http://www.researcherid.com/rid/B-1515-2009

faffinito
Posts: 9
Joined: Tue Aug 31, 2010 9:55 am

Re: Compiling double precision on sp6

Post by faffinito » Fri Oct 15, 2010 3:06 pm

Thanks Claudio,

In the while I found the desired flag: -qautodbl=dbl4 (see here for reference: http://publib.boulder.ibm.com/infocente ... utodbl.htm).

The problem when linking the blacs is still an open issue (by the way, it works with internal yambo libraries).

Fabio
Fabio Affinito, PhD
CINECA - SCAI group
InterUniversity Computer Center
Via Magnanelli, 6/3
Casalecchio di Reno (Bologna) ITALY
+39/051/6171794 (Phone)

User avatar
myrta gruning
Posts: 240
Joined: Tue Mar 17, 2009 11:38 am
Contact:

Re: Compiling double precision on sp6

Post by myrta gruning » Fri Oct 15, 2010 5:22 pm

Hallo again

I have tried to compile enabling double precision and using external lapack and blas with no problems (NB on a complete different platform and compiler). Also I am not using BLACS/SCALAPACK.
Maybe it is not a problem of Yambo itself (that in double precision does not call caxpy and co., but zaxpy and co. unless there is some preprocessing problem)
but of a library linked to Yambo that calls those blas subroutines, but then they are not there... or maybe you have to further link it to other libs.

Regards,
m
Dr Myrta Grüning
School of Mathematics and Physics
Queen's University Belfast - Northern Ireland

http://www.researcherid.com/rid/B-1515-2009

Post Reply