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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_printcpuinfo (hostname, lenh, cpunam, lenc, frequence, mem, swap)

Function/Subroutine Documentation

◆ spmd_printcpuinfo()

subroutine spmd_printcpuinfo ( character*256 hostname,
integer lenh,
character*256 cpunam,
integer lenc,
integer frequence,
integer mem,
integer swap )

Definition at line 32 of file spmd_printcpuinfo.F.

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#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 C o m m o n B l o c k s
45C-----------------------------------------------
46#include "task_c.inc"
47#include "com01_c.inc"
48#include "units_c.inc"
49C-----------------------------------------------
50C D u m m y A r g u m e n t s
51C-----------------------------------------------
52 CHARACTER*256 HOSTNAME,CPUNAM
53 INTEGER LENH, LENC, FREQUENCE,MEM,SWAP
54C-----------------------------------------------
55C L o c a l V a r i a b l e s
56C-----------------------------------------------
57#ifdef MPI
58 INTEGER STATUS(MPI_STATUS_SIZE),IERROR,MSGTYP,
59 . MSGOFF,MSGOFF2,MSGOFF3,I
60 DATA msgoff/190/
61 DATA msgoff2/191/
62 DATA msgoff3/192/
63 CHARACTER*256 CBUF1,CBUF2
64 INTEGER LENR(5)
65
66 IF (ispmd==0) THEN
67 DO i=2,nspmd
68 msgtyp = msgoff
69 CALL mpi_recv(
70 . lenr,5,mpi_integer,it_spmd(i),msgtyp,
71 . spmd_comm_world,status,ierror)
72
73 msgtyp = msgoff2
74 CALL mpi_recv(
75 . cbuf1,lenr(1),mpi_character,it_spmd(i),msgtyp,
76 . spmd_comm_world,status,ierror)
77
78 msgtyp = msgoff3
79 CALL mpi_recv(
80 . cbuf2,lenr(2),mpi_character,it_spmd(i),msgtyp,
81 . spmd_comm_world,status,ierror)
82
83 IF (mem>-1)THEN
84 WRITE(iout,'(I4,A,A,A,A,A,I4,A,I6,A,I6,A)') i,' ',
85 . cbuf1(1:lenr(1)),' ',cbuf2(1:lenr(2)),', ',lenr(3),
86 . ' MHz, ',lenr(4),' MB RAM, ',lenr(5),' MB swap'
87 ELSE
88 WRITE(iout,'(I4,A,A,A,A,A,I4,A)') i,' ',
89 . cbuf1(1:lenr(1)),' ',cbuf2(1:lenr(2)),', ',lenr(3),' MHz '
90 ENDIF
91
92 ENDDO
93 ELSE
94 lenr(1) = lenh
95 lenr(2) = lenc
96 lenr(3) = frequence
97 lenr(4) = mem
98 lenr(5) = swap
99
100 msgtyp = msgoff
101 CALL mpi_send(lenr,5,mpi_integer,it_spmd(1),msgtyp,
102 . spmd_comm_world,ierror)
103
104 msgtyp = msgoff2
105 CALL mpi_send(hostname,lenh,mpi_character,it_spmd(1),msgtyp,
106 . spmd_comm_world,ierror)
107
108 msgtyp = msgoff3
109 CALL mpi_send(cpunam,lenc,mpi_character,it_spmd(1),msgtyp,
110 . spmd_comm_world,ierror)
111 ENDIF
112
113#endif
114 RETURN
#define swap(a, b, tmp)
Definition macros.h:40
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