OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_th.F File Reference
#include "implicit_f.inc"
#include "spmd.inc"
#include "task_c.inc"
#include "com01_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_all_dmin (v, len)
subroutine spmd_glob_dsum (v, len, vtmp)
subroutine spmd_glob_dpsum (v, len, vtmp)
subroutine spmd_glob_fsum (v, len, vtmp)
subroutine spmd_part_com (tag, main, icomv)
subroutine spmd_glob_fsum9 (v, len)
subroutine spmd_glob_dsum9 (v, len)
subroutine spmd_glob_dpsum9 (v, len)
subroutine spmd_glob_isum9 (v, len)
subroutine spmd_glob_min (v, len)
subroutine spmd_glob_max (v, len)

Function/Subroutine Documentation

◆ spmd_all_dmin()

subroutine spmd_all_dmin ( v,
integer len )

Definition at line 29 of file spmd_th.F.

30C min tableau V de taille LEN de type my_real
31C resultat dans VTMP de taille LEN
32C-----------------------------------------------
33C I m p l i c i t T y p e s
34C-----------------------------------------------
35 USE spmd_comm_world_mod, ONLY : spmd_comm_world
36#include "implicit_f.inc"
37C-----------------------------------------------------------------
38C M e s s a g e P a s s i n g
39C-----------------------------------------------
40#include "spmd.inc"
41C-----------------------------------------------
42C C o m m o n B l o c k s
43C-----------------------------------------------
44#include "task_c.inc"
45C-----------------------------------------------
46C D u m m y A r g u m e n t s
47C-----------------------------------------------
48 INTEGER LEN
50 . v(len)
51C-----------------------------------------------
52C L o c a l V a r i a b l e s
53C-----------------------------------------------
54#ifdef MPI
55 INTEGER STATUS(MPI_STATUS_SIZE), I, IERROR
57 . vtmp(len)
58C-----------------------------------------------
59C S o u r c e L i n e s
60C-----------------------------------------------
61 IF (len > 0) THEN
62 CALL mpi_allreduce(v,vtmp,len,real,mpi_min,
63 . spmd_comm_world,ierror)
64 IF(ispmd==0)THEN
65 DO i = 1, len
66 v(i) = vtmp(i)
67 END DO
68 END IF
69 ENDIF
70C
71#endif
72 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine mpi_allreduce(sendbuf, recvbuf, cnt, datatype, operation, comm, ierr)
Definition mpi.f:103

◆ spmd_glob_dpsum()

subroutine spmd_glob_dpsum ( double precision, dimension(len) v,
integer len,
double precision, dimension(*) vtmp )

Definition at line 136 of file spmd_th.F.

137C gather tableau V de taille LEN de type my_dp
138C-----------------------------------------------
139C I m p l i c i t T y p e s
140C-----------------------------------------------
141 USE spmd_comm_world_mod, ONLY : spmd_comm_world
142#include "implicit_f.inc"
143
144C-----------------------------------------------------------------
145C M e s s a g e P a s s i n g
146C-----------------------------------------------
147#include "spmd.inc"
148C-----------------------------------------------
149C C o m m o n B l o c k s
150C-----------------------------------------------
151#include "task_c.inc"
152C-----------------------------------------------
153C D u m m y A r g u m e n t s
154C-----------------------------------------------
155 INTEGER LEN
156 DOUBLE PRECISION V(LEN),VTMP(*)
157C-----------------------------------------------
158C L o c a l V a r i a b l e s
159C-----------------------------------------------
160#ifdef MPI
161 INTEGER MSGOFF,MSGTYP,INFO,I,K,ATID,ATAG,ALEN
162 INTEGER STATUS(MPI_STATUS_SIZE),IERROR
163C-----------------------------------------------
164C S o u r c e L i n e s
165C-----------------------------------------------
166 IF (len > 0) THEN
167 CALL mpi_reduce(v,vtmp,len,
168 . mpi_double_precision,mpi_sum,it_spmd(1),
169 . spmd_comm_world,ierror)
170 ENDIF
171 IF (ispmd==0) THEN
172 DO i=1,len
173 v(i) = vtmp(i)
174 END DO
175 ENDIF
176C
177#endif
178 RETURN
subroutine mpi_reduce(sendbuf, recvbuf, cnt, datatype, op, root, comm, ierr)
Definition mpi.f:120

◆ spmd_glob_dpsum9()

subroutine spmd_glob_dpsum9 ( double precision, dimension(len) v,
integer len )

Definition at line 436 of file spmd_th.F.

437C gather tableau V de taille LEN de type double precision
438C-----------------------------------------------
439C I m p l i c i t T y p e s
440C-----------------------------------------------
441 USE spmd_comm_world_mod, ONLY : spmd_comm_world
442#include "implicit_f.inc"
443C-----------------------------------------------------------------
444C M e s s a g e P a s s i n g
445C-----------------------------------------------
446#include "spmd.inc"
447C-----------------------------------------------
448C C o m m o n B l o c k s
449C-----------------------------------------------
450#include "task_c.inc"
451C-----------------------------------------------
452C D u m m y A r g u m e n t s
453C-----------------------------------------------
454 INTEGER LEN
455 double precision
456 . v(len)
457C-----------------------------------------------
458C L o c a l V a r i a b l e s
459C-----------------------------------------------
460#ifdef MPI
461 INTEGER I, IERROR,
462 . STATUS(MPI_STATUS_SIZE)
463 double precision
464 . vtmp(len)
465C-----------------------------------------------
466C S o u r c e L i n e s
467C-----------------------------------------------
468 IF (len > 0) THEN
469 CALL mpi_reduce(v,vtmp,len,
470 . mpi_double_precision,mpi_sum,it_spmd(1),
471 . spmd_comm_world,ierror)
472 ENDIF
473 IF (ispmd==0) THEN
474 DO i=1,len
475 v(i) = vtmp(i)
476 END DO
477 ENDIF
478C
479#endif
480 RETURN

◆ spmd_glob_dsum()

subroutine spmd_glob_dsum ( v,
integer len,
vtmp )

Definition at line 86 of file spmd_th.F.

87C gather tableau V de taille LEN de type my_real
88C-----------------------------------------------
89C I m p l i c i t T y p e s
90C-----------------------------------------------
91 USE spmd_comm_world_mod, ONLY : spmd_comm_world
92#include "implicit_f.inc"
93C-----------------------------------------------------------------
94C M e s s a g e P a s s i n g
95C-----------------------------------------------
96#include "spmd.inc"
97C-----------------------------------------------
98C C o m m o n B l o c k s
99C-----------------------------------------------
100#include "task_c.inc"
101C-----------------------------------------------
102C D u m m y A r g u m e n t s
103C-----------------------------------------------
104 INTEGER LEN
105 my_real v(len),vtmp(*)
106C-----------------------------------------------
107C L o c a l V a r i a b l e s
108C-----------------------------------------------
109#ifdef MPI
110 INTEGER MSGOFF,MSGTYP,INFO,I,K,ATID,ATAG,ALEN
111 INTEGER STATUS(MPI_STATUS_SIZE),IERROR
112C-----------------------------------------------
113C S o u r c e L i n e s
114C-----------------------------------------------
115 IF (len > 0) THEN
116 CALL mpi_reduce(v,vtmp,len,
117 . real,mpi_sum,it_spmd(1),
118 . spmd_comm_world,ierror)
119 ENDIF
120 IF (ispmd==0) THEN
121 DO i=1,len
122 v(i) = vtmp(i)
123 END DO
124 ENDIF
125C
126#endif
127 RETURN

◆ spmd_glob_dsum9()

subroutine spmd_glob_dsum9 ( v,
integer len )

Definition at line 379 of file spmd_th.F.

380C gather tableau V de taille LEN de type my_real
381C-----------------------------------------------
382C I m p l i c i t T y p e s
383C-----------------------------------------------
384 USE spmd_comm_world_mod, ONLY : spmd_comm_world
385#include "implicit_f.inc"
386C-----------------------------------------------------------------
387C M e s s a g e P a s s i n g
388C-----------------------------------------------
389#include "spmd.inc"
390C-----------------------------------------------
391C C o m m o n B l o c k s
392C-----------------------------------------------
393#include "task_c.inc"
394C-----------------------------------------------
395C D u m m y A r g u m e n t s
396C-----------------------------------------------
397 INTEGER LEN
398 my_real
399 . v(len)
400C-----------------------------------------------
401C L o c a l V a r i a b l e s
402C-----------------------------------------------
403#ifdef MPI
404 INTEGER I, IERROR,
405 . STATUS(MPI_STATUS_SIZE)
406 my_real
407 . vtmp(len)
408C-----------------------------------------------
409C S o u r c e L i n e s
410C-----------------------------------------------
411 IF (len > 0) THEN
412 CALL mpi_reduce(v,vtmp,len,
413 . real,mpi_sum,it_spmd(1),
414 . spmd_comm_world,ierror)
415 ENDIF
416 IF (ispmd==0) THEN
417 DO i=1,len
418 v(i) = vtmp(i)
419 END DO
420 ENDIF
421C
422#endif
423 RETURN

◆ spmd_glob_fsum()

subroutine spmd_glob_fsum ( real*4, dimension(len) v,
integer len,
real*4, dimension(*) vtmp )

Definition at line 187 of file spmd_th.F.

188C gather tableau V de taille LEN de type REAL*4
189C-----------------------------------------------
190C I m p l i c i t T y p e s
191C-----------------------------------------------
192 USE spmd_comm_world_mod, ONLY : spmd_comm_world
193#include "implicit_f.inc"
194C-----------------------------------------------------------------
195C M e s s a g e P a s s i n g
196C-----------------------------------------------
197#include "spmd.inc"
198C-----------------------------------------------
199C C o m m o n B l o c k s
200C-----------------------------------------------
201#include "task_c.inc"
202C-----------------------------------------------
203C D u m m y A r g u m e n t s
204C-----------------------------------------------
205 INTEGER LEN
206 real*4 v(len),vtmp(*)
207C-----------------------------------------------
208C L o c a l V a r i a b l e s
209C-----------------------------------------------
210#ifdef MPI
211 INTEGER MSGOFF,MSGTYP,INFO,I,K,ATID,ATAG,ALEN
212 INTEGER STATUS(MPI_STATUS_SIZE),IERROR
213C-----------------------------------------------
214C S o u r c e L i n e s
215C-----------------------------------------------
216 IF (len > 0) THEN
217 CALL mpi_reduce(v,vtmp,len,
218 . mpi_real4,mpi_sum,it_spmd(1),
219 . spmd_comm_world,ierror)
220 ENDIF
221 IF (ispmd==0) THEN
222 DO i=1,len
223 v(i) = vtmp(i)
224 END DO
225 ENDIF
226C
227#endif
228 RETURN

◆ spmd_glob_fsum9()

subroutine spmd_glob_fsum9 ( real, dimension(len) v,
integer len )

Definition at line 301 of file spmd_th.F.

302C gather tableau V de taille LEN de type real
303C-----------------------------------------------
304C I m p l i c i t T y p e s
305C-----------------------------------------------
306 USE my_alloc_mod
307 USE spmd_comm_world_mod, ONLY : spmd_comm_world
308#include "implicit_f.inc"
309C-----------------------------------------------------------------
310C M e s s a g e P a s s i n g
311C-----------------------------------------------
312#include "spmd.inc"
313C-----------------------------------------------
314C C o m m o n B l o c k s
315C-----------------------------------------------
316#include "task_c.inc"
317C-----------------------------------------------
318C D u m m y A r g u m e n t s
319C-----------------------------------------------
320 INTEGER LEN
321 real
322 . v(len)
323C-----------------------------------------------
324C L o c a l V a r i a b l e s
325C-----------------------------------------------
326#ifdef MPI
327 INTEGER I, IERROR,
328 . STATUS(MPI_STATUS_SIZE)
329 REAL, DIMENSION(:),ALLOCATABLE :: VTMP
330C-----------------------------------------------
331C S o u r c e L i n e s
332C-----------------------------------------------
333 CALL my_alloc(vtmp,len)
334 IF (len > 0) THEN
335 CALL mpi_reduce(v,vtmp,len,
336 . mpi_real,mpi_sum,it_spmd(1),
337 . spmd_comm_world,ierror)
338 ENDIF
339 IF (ispmd==0) THEN
340 DO i=1,len
341 v(i) = vtmp(i)
342 END DO
343 ENDIF
344C
345 DEALLOCATE(vtmp)
346#endif
347 RETURN

◆ spmd_glob_isum9()

subroutine spmd_glob_isum9 ( integer, dimension(len) v,
integer len )

Definition at line 522 of file spmd_th.F.

523C gather tableau V de taille LEN de type integer
524C-----------------------------------------------
525C I m p l i c i t T y p e s
526C-----------------------------------------------
527 USE spmd_comm_world_mod, ONLY : spmd_comm_world
528#include "implicit_f.inc"
529C-----------------------------------------------------------------
530C M e s s a g e P a s s i n g
531C-----------------------------------------------
532#include "spmd.inc"
533C-----------------------------------------------
534C C o m m o n B l o c k s
535C-----------------------------------------------
536#include "task_c.inc"
537C-----------------------------------------------
538C D u m m y A r g u m e n t s
539C-----------------------------------------------
540 INTEGER LEN, V(LEN)
541C-----------------------------------------------
542C L o c a l V a r i a b l e s
543C-----------------------------------------------
544#ifdef MPI
545 INTEGER MSGOFF,MSGTYP,INFO,I,K,ATID,ATAG,ALEN,IERROR,
546 . VTMP(LEN),STATUS(MPI_STATUS_SIZE)
547C-----------------------------------------------
548C S o u r c e L i n e s
549C-----------------------------------------------
550 IF (len > 0) THEN
551 CALL mpi_reduce(v,vtmp,len,
552 . mpi_integer,mpi_sum,it_spmd(1),
553 . spmd_comm_world,ierror)
554 ENDIF
555 IF (ispmd==0) THEN
556 DO i=1,len
557 v(i) = vtmp(i)
558 END DO
559 ENDIF
560C
561#endif
562 RETURN

◆ spmd_glob_max()

subroutine spmd_glob_max ( v,
integer len )

Definition at line 621 of file spmd_th.F.

622C gather tableau V de taille LEN de type reel
623C-----------------------------------------------
624C I m p l i c i t T y p e s
625C-----------------------------------------------
626 USE spmd_comm_world_mod, ONLY : spmd_comm_world
627#include "implicit_f.inc"
628C-----------------------------------------------------------------
629C M e s s a g e P a s s i n g
630C-----------------------------------------------
631#include "spmd.inc"
632C-----------------------------------------------
633C C o m m o n B l o c k s
634C-----------------------------------------------
635#include "task_c.inc"
636C-----------------------------------------------
637C D u m m y A r g u m e n t s
638C-----------------------------------------------
639 INTEGER LEN
640 my_real
641 . v(len),vtmp(len)
642C-----------------------------------------------
643C L o c a l V a r i a b l e s
644C-----------------------------------------------
645#ifdef MPI
646
647 INTEGER MSGOFF,MSGTYP,INFO,I,K,ATID,ATAG,ALEN,IERROR,
648 . STATUS(MPI_STATUS_SIZE)
649C-----------------------------------------------
650C S o u r c e L i n e s
651C-----------------------------------------------
652 IF (len > 0) THEN
653 CALL mpi_reduce(v,vtmp,len,
654 . real,mpi_max,it_spmd(1),
655 . spmd_comm_world,ierror)
656 ENDIF
657 IF (ispmd==0) THEN
658 DO i=1,len
659 v(i) = vtmp(i)
660 END DO
661 ENDIF
662C
663#endif
664 RETURN

◆ spmd_glob_min()

subroutine spmd_glob_min ( v,
integer len )

Definition at line 571 of file spmd_th.F.

572C gather tableau V de taille LEN de type reel
573C-----------------------------------------------
574C I m p l i c i t T y p e s
575C-----------------------------------------------
576 USE spmd_comm_world_mod, ONLY : spmd_comm_world
577#include "implicit_f.inc"
578C-----------------------------------------------------------------
579C M e s s a g e P a s s i n g
580C-----------------------------------------------
581#include "spmd.inc"
582C-----------------------------------------------
583C C o m m o n B l o c k s
584C-----------------------------------------------
585#include "task_c.inc"
586C-----------------------------------------------
587C D u m m y A r g u m e n t s
588C-----------------------------------------------
589 INTEGER LEN
590 my_real
591 . v(len),vtmp(len)
592C-----------------------------------------------
593C L o c a l V a r i a b l e s
594C-----------------------------------------------
595#ifdef MPI
596 INTEGER MSGOFF,MSGTYP,INFO,I,K,ATID,ATAG,ALEN,IERROR,
597 . STATUS(MPI_STATUS_SIZE)
598C-----------------------------------------------
599C S o u r c e L i n e s
600C-----------------------------------------------
601 IF (len > 0) THEN
602 CALL mpi_reduce(v,vtmp,len,
603 . real,mpi_min,it_spmd(1),
604 . spmd_comm_world,ierror)
605 ENDIF
606 IF (ispmd==0) THEN
607 DO i=1,len
608 v(i) = vtmp(i)
609 END DO
610 ENDIF
611C
612#endif
613 RETURN

◆ spmd_part_com()

subroutine spmd_part_com ( integer tag,
integer main,
integer, dimension(*) icomv )

Definition at line 239 of file spmd_th.F.

240C rempli sur pmain le tableau ICOMV suivant la valeur de TAG locale
241C ie sur main : ICOMV(P) = "TAG sur p"
242C-----------------------------------------------
243C I m p l i c i t T y p e s
244C-----------------------------------------------
245 USE spmd_comm_world_mod, ONLY : spmd_comm_world
246#include "implicit_f.inc"
247C-----------------------------------------------------------------
248C M e s s a g e P a s s i n g
249C-----------------------------------------------
250#include "spmd.inc"
251C-----------------------------------------------
252C C o m m o n B l o c k s
253C-----------------------------------------------
254#include "com01_c.inc"
255#include "task_c.inc"
256C-----------------------------------------------
257C D u m m y A r g u m e n t s
258C-----------------------------------------------
259 INTEGER TAG, MAIN, ICOMV(*)
260C-----------------------------------------------
261C L o c a l V a r i a b l e s
262C-----------------------------------------------
263#ifdef MPI
264 INTEGER MSGOFF,MSGTYP,K,LOC_PROC
265 DATA msgoff/8001/
266 INTEGER STATUS(MPI_STATUS_SIZE),IERROR
267C-----------------------------------------------
268C S o u r c e L i n e s
269C-----------------------------------------------
270 loc_proc = ispmd+1
271 IF (loc_proc/=main) THEN
272 msgtyp=msgoff
273 CALL mpi_send(tag,1,mpi_integer,it_spmd(main),
274 . msgtyp,spmd_comm_world,ierror)
275 ELSE
276 icomv(main) = tag
277 DO k=1,nspmd
278 IF(k/=main) THEN
279 msgtyp=msgoff
280 CALL mpi_recv(tag,1,mpi_integer,it_spmd(k),
281 . msgtyp,spmd_comm_world,status,ierror)
282 icomv(k) = tag
283 END IF
284 END DO
285 ENDIF
286C
287#endif
288 RETURN
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
int main(int argc, char *argv[])