Hi,
I have two OpenMP loops that ifort (Version 16.0.1.150 Build 20151021) refuses to parallelize. I've added "-qopenmp -opt-report-file=stdout -opt-report-phase:openmp " to my compile/link commands and see this in the output:
Begin optimization report for: MODULE_VARSOLVER_QG::VAR_SOLVER
Report from: OpenMP optimizations [openmp]
Optimization 'PRE' reduced: function size or variable count limit exceeded: use -override_limits / -Qoverride_limits to override
===========================================================================
I am not sure what that is telling me. Is it saying that the function/subroutine calls inside the loop are too big for the compiler to generate threaded code? If I add the " -override_limits" option, which does not appear to be documented in the man page or anywhere online, the error goes away, but I also do not get an OpenMP optimization report for those loops. I have previously never encountered any limits to the "stuff" one can put inside a threaded region before that would cause this, and have seen functioning OpenMP loops with huge amounts of stuff in them.
I have included one of the the loops for reference even though it's probably too complicated because I haven't yet reduced it to a small "reproducer".
!$OMP PARALLEL DO SHARED (bkg_len,bht_ino,bkg_cov,brh_cov,bkg_vec,anl_vec,tlm_vec,new_vec,tim_len,alph,mthd,B,Q,bkg_config) DEFAULT(PRIVATE) do t=tim_len,1,-1 tim_bkc(:,:)=bkg_cov(t,:,:) tim_hrh(:,:)=brh_cov(t,:,:) tim_htr(:)=bht_ino(t,:,1) tim_bkv(:)=bkg_vec(t,:) if(t.eq.tim_len) then mdl_vec(:)=tlm_vec(t,:) if(mthd > 3) mdl_vec(:)=0.5*(tlm_vec(t,:)+anl_vec(t,:)) else if (mthd.eq.3) mdl_vec(:)=tlm_vec(t+1,:) if (mthd > 3) mdl_vec(:)=anl_vec(t+1,:) model = qg_model_type(bkg_config, state_vector=mdl_vec(:), step=t) call model%adv_nsteps(1) model_ADJ = qg_adj_type(bkg_config, state_vector=model%get_state_vector(), trajectory_vector=model%get_state_vector() - mdl_vec(:), step = t + 1) call model_ADJ%adv_nsteps(4) mdl_vec(:) = model_ADJ%get_state_vector() end if if(mthd < 4) ges_vec(:)=mdl_vec(:) if(mthd > 3) ges_vec(:)=0.5*(tlm_vec(t,:)+mdl_vec(:)) tmp_vec(:)=(ges_vec(:)-tim_bkv(:))*(B+Q) dif_vec(:)=(ges_vec(:)-tim_bkv(:))*(B+Q) call pre_con_dif(tim_bkc,tmp_vec) pre_dif(:)=tmp_vec(:) call dgemv("N", bkg_len, bkg_len, 1.d0, tim_hrh, bkg_len, dif_vec, 1, 0.d0, tmp_vec, 1) tmp_vec(:)=pre_dif(:)+tmp_vec(:)-tim_htr(:) call dgemv("N", bkg_len, bkg_len, 1.d0, tim_bkc, bkg_len, tmp_vec, 1, 0.d0, grd_jvc, 1) new_vec(t,:)=ges_vec(:)-grd_jvc(:)*alph if(mthd < 4) tlm_vec(t,:)=new_vec(t,:) end do !$OMP END PARALLEL DO