for para in $*
do
    if [[ $para == --profiling* ]];then
        profiling=${para#*=}
        export GPU_FLUSH_ON_EXECUTION=1
        export HIP_DIRECT_DISPATCH=0
    fi
done

mpirun -np 32 --hostfile hostfile_deepseekv3_671B \
              --allow-run-as-root \
              --bind-to none \
              --mca plm_rsh_no_tree_spawn 1 \
              train_deepseekv3_671B_4nodes.sh node010 --profiling=$profiling > output.log 2>&1

wait

rm -rf output