try to support specify port and srun port