Closed andrea-ferretti closed 1 month ago
Just one comment for eval_G_minus_G
I see you replaced the G_m_G_maxval_tmp
procedure with the call to G_m_G_maxval=maxval(G_m_G)
However, this is done before the PP_redux(G_m_G)
, where G_m_G
might be distributed of the MPI tasks. This would result in different MPI tasks having different values.
One should either move the maxval after the PP_Redux or (maybe more efficient ?) code
allocate(G_m_G_maxval_tmp(ncpu)
G_m_G_maxval_tmp(myid)=maxval(G_m_G)
PP_redux(G_m_G_maxval_tmp)
G_m_G_maxval=maxval(G_m_G_maxval_tmp)
Absolutely, this needs fixing (I forgot to do it). I'll implement the second option with the redux (nicer not to have to do reductions with the max function).
Rethinking. Rather than the second option, which anyway would do a redux on the whole G_m_G, I'd move back to the previous structure
YAMBO_ALLOC(G_m_G_maxval_tmp,(iGo_))
G_m_G_maxval_tmp=0
with later
do i2=1,oGo_
..
G_m_G_maxval_tmp(i2)=maxval(G_m_G(:,i2))
enddo
PP_redux(G_m_G_maxval_tmp)
G_m_G_maxval=maxval(G_m_G_maxval_tmp)
I agree, this is better ! coded and under testing now
This branch contains several developments: