anchor.diff:      !DIR$ FORCEINLINE
       call add_comb(comb(i), computed, cps(1, cur_cp), N_mrcc_jobs, mrcc_jobs)
       
  -    if(mod(i, comb_per_cp) == 0 .or. N_mrcc_jobs == N_det_generators) then
  -      cps(:, cur_cp+1) = cps(:,  cur_cp)
  +    if(N_mrcc_jobs / gen_per_cp > (cur_cp-1) .or. N_mrcc_jobs == N_det_generators) then
  +    !if(mod(i, comb_per_cp) == 0 .or. N_mrcc_jobs == N_det_generators) then
  +      done_cp_at(N_mrcc_jobs) = cur_cp
  +      cps_N(cur_cp) = dfloat(i)
  +      if(N_mrcc_jobs /= N_det_generators) then
  +        cps(:, cur_cp+1) = cps(:,  cur_cp)
  +        cur_cp += 1
  +      end if
         !cps(:, cur_cp) = cps(:, cur_cp) / dfloat(i)
         
  -      done_cp_at(N_mrcc_jobs) = cur_cp
  -      cps_N(cur_cp) = dfloat(i)
  -      cur_cp += 1
         if (N_mrcc_jobs == N_det_generators) exit
       end if
       do while (computed(l))
  
positive.code:   logical, allocatable :: actually_computed(:)
    integer :: total_computed
    
    allocate(delta_det(N_states, N_det_non_ref, 0:comb_teeth, 2))
    allocate(cp(N_states, N_det_non_ref, N_cp, 2), mrcc_detail(N_states, N_det_generators))
    allocate(delta_loc(N_states, N_det_non_ref, 2))
    mrcc_detail = 0d0
  
negative.code:     N_mrcc_jobs = k
    enddo
    N_cp = cur_cp
    if(N_mrcc_jobs /= N_det_generators .or. N_cp > N_cps_max) then
      print *, N_mrcc_jobs, N_det_generators, N_cp, N_cps_max
      stop "carlo workcarlo_workbatch"
    end if
  
  