Hello Everyone,
Thank you all for your suggestions. I tried installing the model again and found that the error came about due to line 922 of the mod_savefile.F90Â in the Main directory. I changed the line from : Â
Â
                         "ncstatus = nf90_put_att(ncid,nf90_global,'idatex',toint10(idate))" to
                         "ncstatus = nf90_put_att(ncid,nf90_global,'idatex',int(toint10(idate),ik4))"
and then followed the standard installation process i.e bootstrap > configure > make and the make install. After this, the restart files were successfully made. I hope this helps anyone who runs into a similar issue.