From your explaination, the values updated/stored in hr can only be recovered later for plot/print if the update is done in isw=3,6 or14, using this fact I went through the element routine to see where the storage in hr takes place, here is the essential workflow of the element
if(isw.eq.1) then
nh1 = 21 ( assign number of history terms)
elseif(isw.eq.2)
check mesh
elseif(isw.eq. 3 .or. isw.eq. 4 .or. isw.eq. 6 .or. isw.eq. 8 .or. isw.eq.14) then
assign integration points(lint)
if(isw.eq.14) then
initialize some of history variables
do i = 1,lint
hr(nh1+ni + (i-1)*nhv + 3) = 1.0d0/9.0d0/d(uprm+1)
hr(nh2+ni + (i-1)*nhv + 3) = hr(nh1+ni + (i-1)*nhv + 3)
enddo ! i
endif !(isw.eq.14)
get values from hr(nh1 + ..) and hr(nh2+..) for some calculations
e.g stress interpolation parameters
do i = 1,ni
bet(i) = hr(nh2-1+i)
write(*,*)'bet(i)',bet(i)
betn(i) = hr(nh1-1+i)
end do
computing strain,jacobi and other stuff
if(isw.eq.3 .or. isw.eq.6 .or. isw.eq.14) then
if(isw.eq.3 .or. isw.eq.6) then
here the tangent stiffness and residual is calculated
and history variables at tn+1 are updated (among other variables)e.g. the newly
computed bet(i) (in isw.eq.3 .or. isw.eq.6) is assigned to hr array
do i = 1,ni
hr(nh2-1+i) = bet(i)
end do
endif !( isw = 3 or 6 )
elseif(isw.eq.4 .or. isw.eq.

then
get values from hr(nh2+..) for output
and plotting
HERE IS THE PROBLEM: ALL VALUES ARE ZERO in hr
endif !(isw = 4 or

endif !(isw = 3 or 4 or 6 or 8 or 14 or 16)
what I have understood from the code that the storage in hr does take place in (isw = 3 or 6) and in (isw = 4 or

I only retrieve the values in hr(nh2+..) and do not modify them, however they are all zero, even though I had updated them during (isw = 3 or 6) or am I missing some thing in understanding
Thanks for your patience and advice