The fix I suggested and its syntax were for C code. If you use the Fortran variant of the cs_user_parameters file, you need to adapt it. I'll let you check the equivalences in the Doxygen documentation, but is is something like this
Thank you for your code! Besides this, I found an easier way to solve this problem, which is your suggested "Standard I/O serial" method.
Before I mistakenly thought this method would not work, because I only changed this setting in the current case, not in the case that I want to restart from. I found I should use this serial I/O for both the current case and the previous result.
So now my restarting problem has been partially solved. But there is another bug when restarting LES from RANS. I have reported it in one neighboring post.