OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_ialltoallv.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23
24!||====================================================================
25!|| spmd_ialltoallv ../engine/source/mpi/generic/spmd_ialltoallv.F
26!||--- called by ------------------------------------------------------
27!|| spmd_sphgetv ../engine/source/mpi/sph/spmd_sphgetv.F
28!|| spmd_sphvox ../engine/source/mpi/sph/spmd_sphvox.F
29!||--- calls -----------------------------------------------------
30!||====================================================================
31 SUBROUTINE spmd_ialltoallv(SENDBUF,RECVBUF,SEND_SIZE,TOTAL_SEND_SIZE,SDISPLS,
32 . TOTAL_RCV_SIZE,RCV_SIZE,RDISPLS,
33 . REQUEST,COMM,NB_PROC)
34C-----------------------------------------------
35C I m p l i c i t T y p e s
36C-----------------------------------------------
37#include "implicit_f.inc"
38C-----------------------------------------------
39C C o m m o n B l o c k s
40C-----------------------------------------------
41#include "task_c.inc"
42C-----------------------------------------------
43C D u m m y A r g u m e n t s
44C-----------------------------------------------
45 INTEGER, INTENT(in) :: REQUEST,COMM
46 INTEGER, INTENT(in) :: TOTAL_SEND_SIZE,TOTAL_RCV_SIZE,NB_PROC
47 INTEGER, DIMENSION(NB_PROC), INTENT(in) :: SEND_SIZE
48 INTEGER, DIMENSION(NB_PROC), INTENT(in) :: RCV_SIZE
49 INTEGER, DIMENSION(NB_PROC), INTENT(in) :: SDISPLS,RDISPLS
50 my_real, DIMENSION(TOTAL_SEND_SIZE), INTENT(in) :: sendbuf
51 my_real, DIMENSION(TOTAL_RCV_SIZE), INTENT(out) :: recvbuf
52
53#ifdef MPI
54C-----------------------------------------------
55C L o c a l V a r i a b l e s
56C-----------------------------------------------
57 INTEGER :: error
58! ----------------------------------------
59
60! ------------------------------------------
61! processor P(m) :
62! send buffer
63! to proc : P(1) P(2) P(n)
64! | s1 | s2 | ... | sn |
65! size = N(1) N(2) N(n)
66!
67! rcv buffer
68! from proc : P(1) P(2) P(n)
69! | r1 | r2 | ... | rn |
70! size = M(1) M(2) M(n)
71! ------------------------------------------
72
73! PLMPI uses MPI-2.x version : MPI_IALLTOALLV was introduced in MPI-3.0 version
74#if _PLMPI
75! ------------------
76! mpi comm alltoall with different amount of data
77 CALL mpi_alltoallv(sendbuf,send_size,sdispls,real,
78 . recvbuf,rcv_size,rdispls,real,
79 . comm,error)
80! ------------------
81#else
82! ------------------
83! mpi comm alltoall with different amount of data
84 CALL mpi_ialltoallv(sendbuf,send_size,sdispls,real,
85 . recvbuf,rcv_size,rdispls,real,
86 . comm,request,error)
87! ------------------
88#endif
89#else
90 recvbuf = 0
91#endif
92 RETURN
93 END SUBROUTINE spmd_ialltoallv
94
95
96! ----------------------------------------
#define my_real
Definition cppsort.cpp:32
subroutine spmd_ialltoallv(sendbuf, recvbuf, send_size, total_send_size, sdispls, total_rcv_size, rcv_size, rdispls, request, comm, nb_proc)