do while (iorder.ge.0)
c write (*,*) 'Processor',fg_rank,' CG group',kolor,
c & ' receives order from Master'
+#ifdef MPI
time00=MPI_Wtime()
call MPI_Bcast(iorder,1,MPI_INTEGER,king,FG_COMM,IERR)
time_Bcast=time_Bcast+MPI_Wtime()-time00
if (icall.gt.4 .and. iorder.ge.0)
& time_order(iorder)=time_order(iorder)+MPI_Wtime()-time00
+#endif
icall=icall+1
c write (*,*)
c & 'Processor',fg_rank,' completed receive MPI_BCAST order',iorder
cd print *,'func',nf,nfl,icg
call var_to_geom(n,x)
call zerograd
- call chainbuild
+ call chainbuild_extconf
cd write (iout,*) 'ETOTAL called from FUNC'
call etotal(energia(0))
call sum_gradient
icg=mod(nf,2)+1
call var_to_geom_restr(n,x)
call zerograd
- call chainbuild
+ call chainbuild_extconf
cd write (iout,*) 'ETOTAL called from FUNC'
call etotal(energia(0))
call sum_gradient
#ifdef MPI
include 'mpif.h'
#endif
+ include 'COMMON.CONTROL'
include 'COMMON.SETUP'
include 'COMMON.IOUNITS'
include 'COMMON.VAR'
enddo
endif
enddo
+c-----
+c write (iout,*) "checkgrad before SUMSL"
+c icheckgrad=1
+c aincr=1.0d-7
+c call exec_checkgrad
+c-----
call sumsl(k,d,x,func_dc,grad_dc,iv,liv,lv,v,idum,rdum,fdum)
+c-----
+c write (iout,*) "checkgrad after SUMSL"
+c call exec_checkgrad
+c-----
k=0
do i=1,nres-1