Isn’t phi(:,:) in the Fortran code not initialized to zero before entering the main loop?
Also, it may be useful to check the number of iterations used in the C and Fortran codes (which should be the same or similar if the two calculations are essentially “equivalent”…)