diff --git a/src/graph/graph_comm.f90 b/src/graph/graph_comm.f90 index d107df1d..67f9633a 100644 --- a/src/graph/graph_comm.f90 +++ b/src/graph/graph_comm.f90 @@ -35,7 +35,7 @@ subroutine monolis_com_get_comm_table(monolis, N, NP, nid) integer(kint), allocatable :: counts(:), outer_node_id_local(:), local_nid(:) integer(kint), allocatable :: outer_node_id_all(:), outer_dom_id_all(:), temp(:) integer(kint), allocatable :: displs(:), internal_node_id(:), is_neib(:), neib_id(:) - integer(kint), allocatable :: send_n_list(:), rbuf(:) + integer(kint), allocatable :: send_n_list(:) integer(kint), allocatable :: ws(:), wr(:) integer(kint), allocatable :: sta1(:,:) integer(kint), allocatable :: sta2(:,:) @@ -170,7 +170,6 @@ subroutine monolis_com_get_comm_table(monolis, N, NP, nid) !> send の作成 !> slave から master に個数を送信 allocate(send_n_list(commsize), source = 0) - allocate(rbuf(commsize), source = 0) do i = 1, n_neib_recv id = recv_list(i)%domid @@ -178,9 +177,8 @@ subroutine monolis_com_get_comm_table(monolis, N, NP, nid) send_n_list(id + 1) = in enddo - call mpi_alltoall(send_n_list, 1, MPI_INTEGER, & - rbuf, 1, MPI_INTEGER, monolis%COM%comm, ierr) - send_n_list = rbuf + call mpi_alltoall(MPI_IN_PLACE, 1, MPI_INTEGER, & + send_n_list, 1, MPI_INTEGER, monolis%COM%comm, ierr) !> send 個数の確保 n_neib_send = 0 @@ -309,7 +307,7 @@ subroutine monolis_com_get_comm_table_analysis(N, NP, nid, & integer(kint), allocatable :: counts(:), outer_node_id_local(:), local_nid(:) integer(kint), allocatable :: outer_node_id_all(:), outer_dom_id_all(:) integer(kint), allocatable :: displs(:), internal_node_id(:), is_neib(:), neib_id(:) - integer(kint), allocatable :: send_n_list(:), rbuf(:) + integer(kint), allocatable :: send_n_list(:) myrank = monolis_global_myrank() commsize = monolis_global_commsize() @@ -417,7 +415,6 @@ subroutine monolis_com_get_comm_table_analysis(N, NP, nid, & !> send の作成 !> slave から master に個数を送信 allocate(send_n_list(commsize), source = 0) - allocate(rbuf(commsize), source = 0) do i = 1, n_neib_recv id = recv_list(i)%domid @@ -425,9 +422,8 @@ subroutine monolis_com_get_comm_table_analysis(N, NP, nid, & send_n_list(id + 1) = in enddo - call mpi_alltoall(send_n_list, 1, MPI_INTEGER, & - rbuf, 1, MPI_INTEGER, comm, ierr) - send_n_list = rbuf + call mpi_alltoall(MPI_IN_PLACE, 1, MPI_INTEGER, & + send_n_list, 1, MPI_INTEGER, comm, ierr) !> send 個数の確保 n_neib_send = 0 @@ -508,7 +504,7 @@ subroutine monolis_com_get_comm_table_set(monolis, N, NP, nid) integer(kint), allocatable :: counts(:), outer_node_id_local(:), local_nid(:) integer(kint), allocatable :: outer_node_id_all(:), outer_dom_id_all(:), temp(:) integer(kint), allocatable :: displs(:), internal_node_id(:), is_neib(:), neib_id(:) - integer(kint), allocatable :: send_n_list(:), rbuf(:) + integer(kint), allocatable :: send_n_list(:) integer(kint), allocatable :: ws(:), wr(:) integer(kint), allocatable :: sta1(:,:) integer(kint), allocatable :: sta2(:,:) @@ -643,7 +639,6 @@ subroutine monolis_com_get_comm_table_set(monolis, N, NP, nid) !> send の作成 !> slave から master に個数を送信 allocate(send_n_list(commsize), source = 0) - allocate(rbuf(commsize), source = 0) do i = 1, n_neib_recv id = recv_list(i)%domid @@ -651,9 +646,8 @@ subroutine monolis_com_get_comm_table_set(monolis, N, NP, nid) send_n_list(id + 1) = in enddo - call mpi_alltoall(send_n_list, 1, MPI_INTEGER, & + call mpi_alltoall(MPI_IN_PLACE, 1, MPI_INTEGER, & send_n_list, 1, MPI_INTEGER, monolis%COM%comm, ierr) - send_n_list = rbuf !> send 個数の確保 n_neib_send = 0