Compling the code setting '--enable-dp=yes'

Having trouble compiling the Yambo source? Using an unusual architecture? Problems with the "configure" script? This is the place to look.

Moderators: Daniele Varsano, andrea.ferretti, andrea marini, Conor Hogan, myrta gruning

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

Compling the code setting '--enable-dp=yes'

Postby Gembob » Mon Jun 01, 2009 12:24 pm

Dear all,
I tried to complie the code with double precision but failed. Following are the detailed information:

First, I typed in this command "./configure --enable-dp="yes" ", and then followed "make all".

The corresponding error says,
fortcom: Error: mod_logo.f90, line 82: The type of the actual argument differs from the type of the dummy argument. [10.]
ID_logo=pickup_a_random(10.)
----------------------------------^
fortcom: Error: mod_logo.f90, line 83: The type of the actual argument differs from the type of the dummy argument. [6.]
ID_logo_stderr=10+pickup_a_random(6.)
--------------------------------------------^
compilation aborted for mod_logo.f90 (code 1)
make[1]: *** [mod_logo.o] Error 1


It seems that there is just something wrong caused by the precision setting, but I am too green to modify the source code. It works all fine when the double precision is not activated, that is "./configure" and then "make all".

Could anyone give me some suggestions? Thanks very much in advance!

Best Regards,
Gembob
Shanghai Institute of Ceramics, Chinese Academy of Sciences
1295 DingXi Road. Shanghai,200050,China
Gembob
 
Posts: 2
Joined: Wed Mar 25, 2009 10:04 am

Re: Compling the code setting '--enable-dp=yes'

Postby andrea marini » Wed Jun 03, 2009 10:05 am

Gembob wrote:It seems that there is just something wrong caused by the precision setting, but I am too green to modify the source code. It works all fine when the double precision is not activated, that is "./configure" and then "make all".

Could anyone give me some suggestions? Thanks very much in advance!


In a few days I will have a look at the problem. The double precision compilation of Yambo is, anyway, tricky and not deeply tested. While I try to fix the problem may I ask you why do you want to run in double precision ? Databases' size is doubled, memory is doubled and,in general, unless you are not doing very tricky calculations you do not get any precision improvement. GW, BSE and all the machinery implemented in Yambo has some intrinsic precision that will be never as good as the chemistry codes.
Andrea MARINI
Istituto di Struttura della Materia, CNR, (Italy)
User avatar
andrea marini
 
Posts: 447
Joined: Mon Mar 16, 2009 4:27 pm

Re: Compling the code setting '--enable-dp=yes'

Postby andrea marini » Thu Jun 04, 2009 11:39 am

Dear Gembob,

please install subversion and use the latest snapshot (rev. 424) of the Yambo source to compile in double precision.
Andrea MARINI
Istituto di Struttura della Materia, CNR, (Italy)
User avatar
andrea marini
 
Posts: 447
Joined: Mon Mar 16, 2009 4:27 pm

Re: Compling the code setting '--enable-dp=yes'

Postby Gembob » Mon Jun 08, 2009 1:22 am

Dear andrea marini,

Thank you very much for your kind help!

I want to compile the code with double precision because I usually got some "unreal peaks" (I think so, maybe there were something wrong with my calculation) compared to the experiment, I wanted to check out if they were come from the precison setting. As you said, it seems unnecessary to do so.

Anyway, thank you very much.

Best Regards,
Gembob
Shanghai Institute of Ceramics, Chinese Academy of Sciences
1295 DingXi Road. Shanghai,200050,China
Gembob
 
Posts: 2
Joined: Wed Mar 25, 2009 10:04 am

Re: Compling the code setting '--enable-dp=yes'

Postby narzate » Tue Oct 27, 2009 8:09 pm

Dear All

I configured and compiled yambo with the --enable-dp option and I just got the same type
of error message as Gembob. I made the changes described below in 7, and the code compiled
succesfully. The question is: Are those changes OK?

After doing this, I realized of the topic message of Gembob.
Then I compiled without the --enable-dp option.
The code, again, compiled susccesfully; anyway I just wanted to reply to this topic.

Below I describe the characteristics of the configuration and compilation.

Best Regards
Norberto

Optical Research Center, Leon, Mexico

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1. Compiler: Intel Fortran Compiler 9.1
gcc version 3.4.4
2. Architecture: Itanium 2, ia64
3. Compilation in parallel
4. Yambo: yambo-3.2.1-r.448

5. Configure options:

$ ./configure --prefix=/home/prog/yambo-3.2.1-r.448_itanium
FC=ifort CC=gcc
--enable-dp --with-p2y=4.0 --with-blacs=no
--with-blas=/home/prog/yambo-3.2.1-r.448_itanium/lib/blas/libblas.a
--with-lapack=/home/prog/yambo-3.2.1-r.448_itanium/lib/lapack.a
--with-mpi=/home/mpich_itanium/lib/libmpich.a
--with-iotk=/home/prog/espresso-4.1_itanium/iotk
FCFLAGS=-O2 -Bstatic -parallel -tpp2
-L/home/mpich_itanium/lib -I/home/mpich_itanium/include
-L/home/prog/etsf-libs/libxc-1.0-alpha_itanium/lib
-L/home/prog/espresso-4.1_itanium/iotk
CFLAGS=-L/home/mpich_itanium/lib -I/home/mpich_itanium/include
-L/home/prog/etsf-libs/libxc-1.0-alpha_itanium/lib
-L/home/prog/espresso-4.1_itanium/iotk

6. Error: compilation aborted for a2y_i.f90 (code 1)

The error message was:
################>>>>>>>>>>>>>>>>>>>>>

>>>[Linking a2y]<<<
make[1]: Entering directory `/home/prog/yambo-3.2.1-r.448_itanium/interfaces/a2y'
make[1]: Warning: File `Makefile' has modification time 2.3e+03 s in the future
defs_datatypes.F hdr_io.F a2y_KSS_file_name.F fortcom: Error: a2y_i.f90, line 66: The type of the actual argument differs from the type of the dummy argument. [10000.]
serial_number=pickup_a_random(10000.)
-------------------------------^
compilation aborted for a2y_i.f90 (code 1)
make[1]: *** [a2y_i.o] Error 1
make[1]: Leaving directory `/home/prog/yambo-3.2.1-r.448_itanium/interfaces/a2y'
make: *** [interfaces] Error 2

################<<<<<<<<<<<<<<<<<<<<<<


7. Fix to the problem:

I made the following three changes

i. In file ./interfaces/a2y/a2y_i.F

I changed the line

serial_number=pickup_a_random(10000.)

to

serial_number=pickup_a_random(10000.d0)


ii. In file ./interfaces/p2y/p2y_i.F

I changed the line

serial_number=pickup_a_random(10000.)

to

serial_number=pickup_a_random(10000.d0)


iii. In file ./src/modules/mod_logo.F

I changed the line

real(SP) :: rand_range

to

real(DP) :: rand_range

%%%%%%%%%%%%%%%%%%%%%%%%
narzate
 
Posts: 3
Joined: Wed Oct 07, 2009 5:06 pm

Re: Compling the code setting '--enable-dp=yes'

Postby myrta gruning » Wed Oct 28, 2009 11:26 am

Dear Norberto,

Thank you very much for bringing this error to our attention.

In fact this problem has been solved in other parts of the code, but not in the interfaces. :?

Regards your changes, it is not necessary to set the rand_range variable (the argument of pickup_a_random) to double precision. It is just the range of reals where to pick a random number (that will use as serial number to identify the database).

So it is sufficient to change in a2y_i.F and p2y_i.F

serial_number=pickup_a_random(10000.)

to

serial_number=pickup_a_random(10000._SP)

Without touching modules/mod_logo.F

We will fix that in the next revisions.

Regards,

Myrta
Dr Myrta GrĂ¼ning
Atomistic Simulation Centre
Queen's University Belfast - Northern Ireland

http://www.researcherid.com/rid/B-1515-2009
User avatar
myrta gruning
 
Posts: 303
Joined: Tue Mar 17, 2009 11:38 am

Re: Compling the code setting '--enable-dp=yes'

Postby marco.govoni » Wed Apr 28, 2010 4:21 pm

Dear yambo developers,
by compiling yambo on IMB POWER 6 with double precision, we successfully compiled by modifing the file /src/coulomb/bessel_J0.F in the following way:

Code: Select all
function bessel_J0(s)
 use pars,          ONLY:SP
 use R_lattice,     ONLY:cyl_vr_save,cyl_zz_save
 implicit none
 !
 real(SP) ::bessel_J0
 !
 ! Work Space
 !
#if defined _DOUBLE
 real(SP), external :: DBESJ0_
#else
 real(SP), external :: BESJ0
#endif
 real(SP) ::  s,arg
 !
 arg=cyl_vr_save*s
 if(cyl_zz_save==0) then
#if defined _DOUBLE
   bessel_J0=DBESJ0_(arg)
#else
   bessel_J0=BESJ0(arg)
#endif
 else
#if defined _DOUBLE
   bessel_J0=DBESJ0_(arg)*s/sqrt(s**2+cyl_zz_save**2)
#else
   bessel_J0=BESJ0(arg)*s/sqrt(s**2+cyl_zz_save**2)
#endif
 endif
end function


and by defining SP a couple of variables.

Cheers!

Marco Govoni and Ivan Marri
Marco Govoni
Physics Department, University of Modena and Reggio Emilia (Italy)
marco.govoni
 
Posts: 35
Joined: Thu May 21, 2009 3:46 pm

Re: Compling the code setting '--enable-dp=yes'

Postby andrea marini » Thu Apr 29, 2010 8:57 am

Dear Marco & Ivan,

what revision are you working on ? Could you send us/me the files you have changes so that I can patch the source in the repository ?

THX!

Andrea
Andrea MARINI
Istituto di Struttura della Materia, CNR, (Italy)
User avatar
andrea marini
 
Posts: 447
Joined: Mon Mar 16, 2009 4:27 pm


Return to Compilation

Who is online

Users browsing this forum: No registered users and 1 guest

cron