Possible bug in interface for several files  [SOLVED]

option, parallelism,...

Moderators: fgoudreault, mcote

Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Locked
zeroth
Posts: 12
Joined: Fri Jan 24, 2014 5:12 pm

Possible bug in interface for several files  [SOLVED]

Post by zeroth » Fri Apr 04, 2014 11:38 am

Dear developers,

I am compiling abinit and looking at the output I found a couple of warnings (which I agree with ;) ).

Here is an outline of an example code that has a bug (starting from line 573 in 68_dmft/m_hu.F90):

Code: Select all

subroutine rotatevee_hu(cryst_struc,hu,nspinor,nsppol,pawprtvol,rot_mat,udens_atoms)
... lots of code ...
 type(coeff2_type),intent(out) :: udens_atoms(cryst_struc%natom)
 ... start of code ...
   write(std_out,*)"udens before vee2udensaomt", udens_atoms(1)%value
... down to end of code ...

As you can see the udens_atoms is defined with intent(out). However, it is only used as a print-out statement.
I regard this as a bug as the udens_atoms *could* be undefined on return.
Looking at the remaining code it seems like it previously was set, hence I would recommend that you change the interface to intent(inout).

This is also the case for these files:
src/70_gw/m_screen.F90 (line 1651, routine screen_times_ket), variable "sigcme" * this is unimportant as it has to do with an unimplemented feature *, should be "intent(inout)"
src/69_wfdesc/m_oscillators.F90 (line 1288, routine calc_pw_oscillator), variable "Osc", should be "intent(in)" or "intent(inout)", it gets deferred further down in other calls
src/65_lotf_base/m_glue_lotf.F90 (line 192, routine glue_pair_devs), variable "r_au", should be "intent(in)"

Kind regards Nick
/ Nick Papior

User avatar
gmatteo
Posts: 291
Joined: Sun Aug 16, 2009 5:40 pm

Re: Possible bug in interface for several files

Post by gmatteo » Fri Apr 04, 2014 11:22 pm

I am compiling abinit and looking at the output I found a couple of warnings (which I agree with ;) ).


and I agree with you as well ;)
Solved in 7.6.3.

For the record, many other similar problems have been solved in v7.7 but we are not going
to backport these changes (it would be too difficult).

Many thank for reporting these problems.
Best regards,
Matteo

zeroth
Posts: 12
Joined: Fri Jan 24, 2014 5:12 pm

Re: Possible bug in interface for several files

Post by zeroth » Fri Apr 04, 2014 11:40 pm

Ok. Thanks for the response!
I regard this as closed then... :)

Regards Nick
/ Nick Papior

Locked