Comment 3 for bug 1081598

Revision history for this message
Fiona Reid (fiona-3) wrote :

Okay, I've now the flml file on HECToR too and it's identical to that in longtests.

I've also checked the value of neumann as suggested using ewrite statements inserted in several places including directly before the if (neumann) block and also inside the conditional to see if we ever enter this block.

neumann is always ***FALSE*** which means that as Stephan says this block of code should not be executed. The ewrite statements I inserted inside the if(neumann) block don't appear in the output. FWIW I've also tried commenting out the call to addto and inserting a ewrite statement instead, e.g.

if (neumann) then
    ewrite(1,*)"FR debug: inside neumann if SHOULD NOT BE here, neumann = ",neumann," threadid = ",omp_get_thread_num()
! call addto(RHS_diff, T_face, shape_rhs(T_shape, detwei * ele_val_at_quad(bc_value, face)))
end if

The performance with the ewrite replacing the addto call is still poor (just as bad as with addto) which suggests something very odd is going on here. I am struggling to believe that an if/endif test that is never true should cause such a big performance problem. I'm starting to wonder if the compiler/ OpenMP runtime is doing something odd as the performance of the MPI version compiled without --enable-openmp is unchanged.