OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
rad_spmd_recv.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!|| rad_spmd_recv ../engine/source/mpi/generic/rad_spmd_recv.F
26!||--- called by ------------------------------------------------------
27!|| aniskewf ../engine/source/output/anim/generate/aniskewf.F
28!|| printime ../engine/source/system/timer.F
29!||--- calls -----------------------------------------------------
30!||--- uses -----------------------------------------------------
31!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
32!||====================================================================
33 SUBROUTINE rad_spmd_recv(A,SIZ,ISPMD,IT_SPMD,MSGTAG,INTSIZE)
34C-----------------------------------------------
35C I m p l i c i t T y p e s
36C-----------------------------------------------
37 use spmd_comm_world_mod, only: spmd_comm_world
38 implicit none
39C#include "implicit_f.inc"
40C-----------------------------------------------
41C M e s s a g e P a s s i n g
42C-----------------------------------------------
43#include "spmd.inc"
44C-----------------------------------------------
45C D u m m y A r g u m e n t s
46C-----------------------------------------------
47 INTEGER SIZ,ISPMD,IT_SPMD(*),MSGTAG,INTSIZE
48 INTEGER, INTENT(INOUT) :: A(*)
49C-----------------------------------------------
50C L o c a l V a r i a b l e s
51C-----------------------------------------------
52#ifdef MPI
53 INTEGER INFO,BUFSIZMAX,ADD,LEN,SIZ_I,
54 . ATID,ATAG,ALEN
55 INTEGER STATUS(MPI_STATUS_SIZE),IERROR
56C segment de memoire partagee doit etre superieur a 10 MB
57 DATA bufsizmax/10000000/
58C-----------------------------------------------
59C S o u r c e L i n e s
60C-----------------------------------------------
61 add = 1
62 siz_i = siz
63 1 len = min(siz_i,bufsizmax)
64
65 CALL mpi_recv(a(add),len,mpi_byte,it_spmd(ispmd+1),msgtag,
66 . spmd_comm_world,status,ierror)
67 CALL mpi_send(a,0,mpi_byte,it_spmd(ispmd+1),msgtag,
68 . spmd_comm_world,ierror)
69
70 add = add + len/intsize
71 siz_i = siz_i - len
72 IF (siz_i>0) GO TO 1
73#endif
74 RETURN
75 END
#define min(a, b)
Definition macros.h:20
subroutine mpi_recv(buf, cnt, datatype, source, tag, comm, status, ierr)
Definition mpi.f:461
subroutine mpi_send(buf, cnt, datatype, dest, tag, comm, ierr)
Definition mpi.f:480
subroutine rad_spmd_recv(a, siz, ispmd, it_spmd, msgtag, intsize)