OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_ialltoallv_int.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_int ../engine/source/mpi/generic/spmd_ialltoallv_int.F
26!||--- called by ------------------------------------------------------
27!|| spmd_coarse_cell_exchange ../engine/source/mpi/interfaces/spmd_coarse_cell_exchange.F
28!|| spmd_sphgat ../engine/source/mpi/sph/spmd_sphgat.F
29!|| spmd_sphgetv ../engine/source/mpi/sph/spmd_sphgetv.F
30!||--- calls -----------------------------------------------------
31!||====================================================================
32 SUBROUTINE spmd_ialltoallv_int(SENDBUF,RECVBUF,SEND_SIZE,TOTAL_SEND_SIZE,SDISPLS,
33 . TOTAL_RCV_SIZE,RCV_SIZE,RDISPLS,
34 . REQUEST,COMM,NB_PROC)
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38#include "implicit_f.inc"
39C-----------------------------------------------------------------
40C M e s s a g e P a s s i n g
41C-----------------------------------------------
42#include "spmd.inc"
43C-----------------------------------------------
44C D u m m y A r g u m e n t s
45C-----------------------------------------------
46 INTEGER, INTENT(in) :: REQUEST,COMM
47 INTEGER, INTENT(in) :: TOTAL_SEND_SIZE,TOTAL_RCV_SIZE,NB_PROC
48 INTEGER, DIMENSION(NB_PROC), INTENT(in) :: SEND_SIZE
49 INTEGER, DIMENSION(NB_PROC), INTENT(in) :: RCV_SIZE
50 INTEGER, DIMENSION(NB_PROC), INTENT(in) :: SDISPLS,RDISPLS
51 INTEGER, DIMENSION(TOTAL_SEND_SIZE), INTENT(in) :: SENDBUF
52 INTEGER, DIMENSION(TOTAL_RCV_SIZE), INTENT(out) :: RECVBUF
53
54#ifdef MPI
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58 INTEGER :: error
59! ----------------------------------------
60
61! ------------------------------------------
62! processor P(m) :
63! send buffer
64! to proc : P(1) P(2) P(n)
65! | s1 | s2 | ... | sn |
66! size = N(1) N(2) N(n)
67!
68! rcv buffer
69! from proc : P(1) P(2) P(n)
70! | r1 | r2 | ... | rn |
71! size = M(1) M(2) M(n)
72! ------------------------------------------
73
74! PLMPI uses MPI-2.x version : MPI_IALLTOALLV was introduced in MPI-3.0 version
75#if _PLMPI
76! ------------------
77! mpi comm alltoall with different amount of data
78 CALL mpi_alltoallv(sendbuf,send_size,sdispls,mpi_integer,
79 . recvbuf,rcv_size,rdispls,mpi_integer,
80 . comm,error)
81! ------------------
82#else
83! ------------------
84! mpi comm alltoall with different amount of data
85 CALL mpi_ialltoallv(sendbuf,send_size,sdispls,mpi_integer,
86 . recvbuf,rcv_size,rdispls,mpi_integer,
87 . comm,request,error)
88! ------------------
89#endif
90#else
91 recvbuf = 0
92#endif
93 RETURN
94 END SUBROUTINE spmd_ialltoallv_int
95
96
97! ----------------------------------------
subroutine spmd_ialltoallv_int(sendbuf, recvbuf, send_size, total_send_size, sdispls, total_rcv_size, rcv_size, rdispls, request, comm, nb_proc)