From 270c2b687183c828b1e88d08a452549b35001177 Mon Sep 17 00:00:00 2001 From: zhangshuai Date: Mon, 27 May 2019 16:10:02 +0800 Subject: [PATCH] modify the mpi scripts 2 --- Gazebo_Distributed_MPI/mpi_run/MPI_Gazebo_launch.sh | 8 +++++++- Gazebo_Distributed_MPI/mpi_run/hostfile | 2 +- Gazebo_Distributed_MPI/mpi_run/命令例子 | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 Gazebo_Distributed_MPI/mpi_run/命令例子 diff --git a/Gazebo_Distributed_MPI/mpi_run/MPI_Gazebo_launch.sh b/Gazebo_Distributed_MPI/mpi_run/MPI_Gazebo_launch.sh index 3c4c3bc..951d8a2 100755 --- a/Gazebo_Distributed_MPI/mpi_run/MPI_Gazebo_launch.sh +++ b/Gazebo_Distributed_MPI/mpi_run/MPI_Gazebo_launch.sh @@ -12,6 +12,12 @@ workspace_path=$3 world_file=$4 host_file=$5 +echo $packdge_name +echo $launch_file_name +echo $workspace_path +echo $world_file +echo $host_file + host_count=0 hosts=() @@ -45,7 +51,7 @@ done sleep 5s #登入第一个节点启动MPI的gzserver,并成为各自节点上的ROS node -ssh -f -n ${hosts[0]} "cd ~/MPI; +ssh -f -n ${hosts[0]} "cd ~/Git/Gazebo_Distributed_MPI/mpi_run; mpiexec -hostfile $host_file -np 1 mygzserver $world_file $workspace_path : -np 1 mygzserver $world_file $workspace_path; echo mpiexec_done!" echo "${hosts[0]}:mpiexec_good" diff --git a/Gazebo_Distributed_MPI/mpi_run/hostfile b/Gazebo_Distributed_MPI/mpi_run/hostfile index a9821ff..164812c 100644 --- a/Gazebo_Distributed_MPI/mpi_run/hostfile +++ b/Gazebo_Distributed_MPI/mpi_run/hostfile @@ -1,4 +1,4 @@ anwen slots=1 -zhangshuai-ThinkPad-X250 slots=1 +airc02-PowerEdge-T640 slots=1 diff --git a/Gazebo_Distributed_MPI/mpi_run/命令例子 b/Gazebo_Distributed_MPI/mpi_run/命令例子 new file mode 100644 index 0000000..8dc1bf3 --- /dev/null +++ b/Gazebo_Distributed_MPI/mpi_run/命令例子 @@ -0,0 +1 @@ +./MPI_Gazebo_launch.sh hector_quadrotor_gazebo hector_2_single_gazebo_mpi_spawn_test.launch ~/Git/Gazebo_Hector_Test ~/Git/Gazebo_Hector_Test/src/hector_quadrotor/hector_quadrotor_gazebo/worlds/kunming_airport_distribution_2hector_mpi_test.world hostfile