Fixed the rank and chunk split issue. Error in script file not the code.
Rule 2 : Name all the executables with .ex extension.