Changeset 9fc7e1 for src/comm/comm_mpi.cpp
- Timestamp:
- Feb 10, 2012, 3:19:51 PM (14 years ago)
- Children:
- 322469
- Parents:
- 32ff22
- File:
-
- 1 edited
-
src/comm/comm_mpi.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/comm/comm_mpi.cpp
r32ff22 r9fc7e1 400 400 401 401 Index index; 402 int global_extent[6*size], send_sizes[size], recv_sizes[size]; 403 Index begin_remote[size], end_remote[size]; 404 std::vector<int> pos_indices[size], charge_indices[size]; 405 MPI_Datatype dt_temp; 402 std::vector<int> global_extent, send_sizes, recv_sizes; 403 std::vector<Index> begin_remote, end_remote; 404 std::vector< std::vector<int> > pos_indices, charge_indices; 406 405 std::vector<vmg_float> buffer_x, buffer_q; 407 406 std::vector<vmg_int> buffer_ind; 407 MPI_Datatype dt_temp; 408 409 global_extent.resize(6*size); 410 send_sizes.resize(size); 411 recv_sizes.resize(size); 412 begin_remote.resize(size); 413 end_remote.resize(size); 414 pos_indices.resize(size); 415 charge_indices.resize(size); 408 416 409 417 std::memcpy(&global_extent[6*rank], grid.Global().BeginLocal().vec(), 3*sizeof(int)); 410 418 std::memcpy(&global_extent[6*rank+3], grid.Global().EndLocal().vec(), 3*sizeof(int)); 411 419 412 MPI_Allgather(MPI_IN_PLACE, 6, MPI_INT, global_extent, 6, MPI_INT, MPI_COMM_WORLD);420 MPI_Allgather(MPI_IN_PLACE, 6, MPI_INT, &global_extent.front(), 6, MPI_INT, MPI_COMM_WORLD); 413 421 414 422 for (int i=0; i<size; ++i) { … … 433 441 send_sizes[i] = charge_indices[i].size(); 434 442 435 MPI_Alltoall( send_sizes, 1, MPI_INT, recv_sizes, 1, MPI_INT, comm_global);443 MPI_Alltoall(&send_sizes.front(), 1, MPI_INT, &recv_sizes.front(), 1, MPI_INT, comm_global); 436 444 437 445 /*
Note:
See TracChangeset
for help on using the changeset viewer.
