Having realized that saving and reading restart files with history variables does not work properly in FEAPpv 3.1 I observed the following in restrt.f:
nh1 and nh2 match for write and read but they don't point to the right place. This means that history data is not written to the restart file (hr(point), point=nh1,nh2 is zero) and thus either can be read. The problem could be solved by replacing the existing write and read commands by
write(ios) rnmax,nh1,nh2,(hr(point),point=np(50),np(50)+2*nh1-1)
read(ios) rnmax,nh1,nh2,(hr(point),point=np(50),np(50)+2*nh1-1)
where nh1 is the number of history variables at t_n.
After having found this solution, I read in another topic that a passage in pgetd.f has to be replaced by
c Assign pointer, length, and precision
if( pcomp(dname, dict(i), 5) ) then
point = np(dlist(i))
lengt = ipoint(i)
prec = iprec(i)
flag = .true.
return
endif
So I tried again if restart would work with this correction and therefore canceled my adaptations in restrt.f. Now, nh1 and nh2 still match for write and read. Saving the history data is working and nh1 is now the pointer to the first history entry (np(50)=nh1).
But when reading the restart file I get a segmentation fault and np(50) is not equal to nh1. I tried to add the line
setvar = palloc( 50,'H ',nh2-nh1,2)
but this does not help.
Of course, I could go back to the original pgetd.f and use my first solution which is sufficient for my actual demand. Nevertheless I am interested in a solution that works with the revised version of pgetd and would appreciate if anyone had a suggestion.