mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 21:40:33 +05:00
fix for sequential curved elements
This commit is contained in:
parent
910b336d7b
commit
26b5b8564c
@ -10,75 +10,6 @@ namespace netgen
|
||||
|
||||
// bool rational = true;
|
||||
|
||||
|
||||
template <typename T>
|
||||
inline void MyMPI_ExchangeTableTmp (TABLE<T> & send_data,
|
||||
TABLE<T> & recv_data, int tag,
|
||||
MPI_Comm comm = MPI_COMM_WORLD)
|
||||
{
|
||||
int ntasks, rank;
|
||||
MPI_Comm_size(comm, &ntasks);
|
||||
MPI_Comm_rank(comm, &rank);
|
||||
|
||||
Array<int> send_sizes(ntasks);
|
||||
Array<int> recv_sizes(ntasks);
|
||||
for (int i = 0; i < ntasks; i++)
|
||||
send_sizes[i] = send_data[i].Size();
|
||||
|
||||
cout << "id = " << rank << ", sendsize = " << send_sizes << endl;
|
||||
MPI_Alltoall (&send_sizes[0], 1, MPI_INT,
|
||||
&recv_sizes[0], 1, MPI_INT, comm);
|
||||
/*
|
||||
// in-place is buggy !
|
||||
MPI_Alltoall (MPI_IN_PLACE, 1, MPI_INT,
|
||||
&recv_sizes[0], 1, MPI_INT, comm);
|
||||
*/
|
||||
MPI_Barrier(comm);
|
||||
cout << "id = " << rank << ", recvsize = " << recv_sizes << endl;
|
||||
MPI_Barrier(comm);
|
||||
|
||||
cout << "recv_table = " << recv_data << endl;
|
||||
|
||||
for (int i = 0; i < ntasks; i++)
|
||||
if (recv_sizes[i])
|
||||
recv_data.SetEntrySize (i, recv_sizes[i], sizeof(T));
|
||||
|
||||
cout << "recv_table2 = " << recv_data << endl;
|
||||
|
||||
|
||||
MPI_Barrier(comm);
|
||||
for (int i = 0; i < ntasks; i++)
|
||||
cout << "id = " << rank << ", recvtagsize(" << i << ") = " << recv_data[i].Size() << endl;
|
||||
MPI_Barrier(comm);
|
||||
|
||||
for (int i = 0; i < ntasks; i++)
|
||||
if (recv_data[i].Size())
|
||||
recv_data[i] = 0;
|
||||
|
||||
Array<MPI_Request> requests(0);
|
||||
for (int dest = 0; dest < ntasks; dest++)
|
||||
if ( (dest != rank) && send_data[dest].Size())
|
||||
requests.Append (MyMPI_ISend (send_data[dest], dest, tag, comm));
|
||||
|
||||
for (int dest = 0; dest < ntasks; dest++)
|
||||
if ( (dest != rank) && recv_data[dest].Size())
|
||||
requests.Append (MyMPI_IRecv (recv_data[dest], dest, tag, comm));
|
||||
|
||||
MPI_Barrier(comm);
|
||||
cout << "comm started, id = " << rank << ", num requ = " << requests.Size() << endl;
|
||||
MPI_Barrier(comm);
|
||||
|
||||
if (requests.Size())
|
||||
MPI_Waitall (requests.Size(), &requests[0], MPI_STATUS_IGNORE);
|
||||
MPI_Barrier(comm);
|
||||
cout << "table done, id = " << rank << endl;
|
||||
sleep(1);
|
||||
MPI_Barrier(comm);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static void ComputeGaussRule (int n, Array<double> & xi, Array<double> & wi)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user