This can only work when I manually log in the every compute node involved and execute the directive in every compute node
python3 -m torch.distributed.launch --nproc_per_node=2 --nnodes=2 --node_rank=0  --master_addr=gpu1 --master_port=1027 /share/home/bjiangch/group-zyl/zyl/pytorch/multi-GPU/program/eann/ >out

However, it is very inconvenient to do this in a  cluster-management system. Do you have any idea to submit this by a general script in cluster-management system?