Page 1 of 2

Compiling double precision on sp6

Posted: Wed Oct 13, 2010 3:26 pm
by faffinito
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?

Re: Compiling double precision on sp6

Posted: Thu Oct 14, 2010 11:52 pm
by myrta gruning
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

Re: Compiling double precision on sp6

Posted: Fri Oct 15, 2010 8:59 am
by faffinito
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

Re: Compiling double precision on sp6

Posted: Fri Oct 15, 2010 9:46 am
by Daniele Varsano
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

Re: Compiling double precision on sp6

Posted: Fri Oct 15, 2010 10:32 am
by myrta gruning
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

Re: Compiling double precision on sp6

Posted: Fri Oct 15, 2010 1:53 pm
by faffinito
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

Re: Compiling double precision on sp6

Posted: Fri Oct 15, 2010 2:06 pm
by claudio
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

Re: Compiling double precision on sp6

Posted: Fri Oct 15, 2010 3:04 pm
by myrta gruning
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

Re: Compiling double precision on sp6

Posted: Fri Oct 15, 2010 3:06 pm
by faffinito
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

Re: Compiling double precision on sp6

Posted: Fri Oct 15, 2010 5:22 pm
by myrta gruning
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