Ok. Time to keep diving further down the rabbit hole. In unix/memory/setmem.f, look for freallocfn( ) and change the code to look as follows:
! Compute length in integer*X recast to integer*4 for malloc
! X is either integer4 or integer8
point = length
longv = int((point*ipa + mod(point*ipa,ipr))/ipr)
if(n.eq.31) then
write(iow,*) 'point ',point,' longv ',longv
call iprint(mr(np(n)),ndf,numnp*2,ndf,'before frealloc')
end if
call freallocfn(np(n),longv,ip,ipr)
if(n.eq.31) then
call iprint(mr(np(n)),ndf,numnp*2,ndf,'after frealloc')
end if
so you are just adding the if blocks before and after the call to freallocfn. To run this, you will also have to add
include 'sdata.h'
at the top of the file.
Now re-run Ipt1newd and Ipt2newd