Dear Daniyal,
I think you can simply do the following, after you convert the BCs:
imid=1 ! Set mesh to support midside nodes
call gen_re2(imid) ! Output new .re2 file
call exitti('quit after gen_re2$',imid)
Then, use the new .re2 file but also regenerate your map or ma2 file.
The point is that periodic BCs change the mesh topology, which is reflected in the ma2 or map file, so that has to be regenerated if you add or delete periodic BCs.
Note that you should not continue the simulation after calling gen_re2 because it clobbers some arrays when it outputs the file. Also, all MPI ranks must call those two routines above, so the calls should not be in any if-block that would not allow all ranks
to execute that statement.
hth,
Paul