Compiled sucessfully vasp.6.2.1 with D4(version 3.3). Tested many systems and had no issues to most of it. But there is some problem in some of the systems where I am getting NaN for Force and Energy values.
So tried installing vasp.6.2.1 with D4(version 2.5) with changing the source code similar to #52 #53 issues. Still getting the same error. Energy values are not getting printed at the last ionic step of the vasp+D4 calculation.
Attached Input and outputfiles of one of the systems which have problem.

ErNi.tar.gz