anchor.diff:    numMLMCcells    = numcellsLevel0
     M_optsamps(1,0) = bnumMLMCsamps
     M_optsamps(2,0) = 0
  +  M_optsamps(3,0) = 0
   
     Q_ufunctional = 0.0d0
     G_ufunctional = 0.0d0
  
positive.code: 
  
  
    !2 Using M~(current samples) solve V~(estimated variance) for each level L
  !  subroutine MLMCsolveEstVar( Level )
  
  
  !  end subroutine MLMCsolveEstVar
  
    !3 Using V~s(estimated variance), compute optimal M~s(estimated opt num of samples)
    subroutine MLMCcomputeOptSamps( Level )
    use MLMCvars, only: MLMC_TOLsplit, MLMC_TOL, C_alpha, Gave, Gvar, M_optsamps, &
  
negative.code: 
  print *,"new samps M_optsamps(1,:):",M_optsamps(1,:)
  print *,"new samps M_optsamps(2,:):",M_optsamps(2,:)
  print *,"new samps M_optsamps(3,:):",M_optsamps(3,:)
    do ilevel = 0,Level                                          !search each level
  print *,"ilevel:",ilevel
      if( M_optsamps(1,ilevel)>M_optsamps(2,ilevel) ) then       !if new samps to compute
  