OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
rad_spmd_send.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/.
23C
24!||====================================================================
25!|| rad_spmd_send ../engine/source/mpi/generic/rad_spmd_send.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_send(A,SIZ,ISPMD,IT_SPMD,MSGTAG,INTSIZE)
34C routine speciale smp
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38 use spmd_comm_world_mod, only: spmd_comm_world
39 implicit none
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 :: 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 INTEGER STATUS(MPI_STATUS_SIZE),IERROR
55C segment de memoire partagee doit etre superieur a 10 MB
56 DATA bufsizmax/10000000/
57C-----------------------------------------------
58C S o u r c e L i n e s
59C-----------------------------------------------
60 add = 1
61 siz_i = siz
62 1 len = min(siz_i,bufsizmax)
63
64 CALL mpi_send(a(add),len,mpi_byte,it_spmd(ispmd+1),msgtag,
65 . spmd_comm_world,ierror)
66
67 add = add + len/intsize
68 siz_i = siz_i - len
69C wait for acknowledge
70
71 CALL mpi_recv(a,0,mpi_byte,it_spmd(ispmd+1),msgtag,
72 . spmd_comm_world,status,ierror)
73
74 IF (siz_i>0) GO TO 1
75#endif
76 RETURN
77 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_send(a, siz, ispmd, it_spmd, msgtag, intsize)